Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_script/space_script.c
| Show First 20 Lines • Show All 139 Lines • ▼ Show 20 Lines | |||||
| { | { | ||||
| /* draw entirely, view changes should be handled here */ | /* draw entirely, view changes should be handled here */ | ||||
| SpaceScript *sscript = (SpaceScript *)CTX_wm_space_data(C); | SpaceScript *sscript = (SpaceScript *)CTX_wm_space_data(C); | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| /* clear and setup matrix */ | /* clear and setup matrix */ | ||||
| UI_ThemeClearColor(TH_BACK); | UI_ThemeClearColor(TH_BACK); | ||||
| glClear(GL_COLOR_BUFFER_BIT); | glClear(GL_COLOR_BUFFER_BIT); | ||||
| UI_view2d_view_ortho(v2d); | UI_view2d_view_ortho(v2d); | ||||
| /* data... */ | if (sscript->link_flag & SPACE_LINK_FLAG_IS_DYNAMIC) { | ||||
| // BPY_script_exec(C, "/root/blender-svn/blender25/test.py", NULL); | struct SpaceTypeDyn *ds = BKE_screen_dynspace_from_index(SPACE_SCRIPT, sscript->space_subtype); | ||||
| if (ds) { | |||||
| #ifdef WITH_PYTHON | BKE_screen_dynspace_call_main_region_draw(ds, C, ar); | ||||
| if (sscript->script) { | } | ||||
| // BPY_run_script_space_draw(C, sscript); | else { | ||||
| printf("MISSING\n"); | |||||
| } | |||||
| } | } | ||||
| #else | |||||
| (void)sscript; | |||||
| #endif | |||||
| /* reset view matrix */ | /* reset view matrix */ | ||||
| UI_view2d_view_restore(C); | UI_view2d_view_restore(C); | ||||
| /* scrollers? */ | /* scrollers? */ | ||||
| } | } | ||||
| /* add handlers, stuff you only do once or on area/region changes */ | /* add handlers, stuff you only do once or on area/region changes */ | ||||
| static void script_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) | static void script_header_region_init(wmWindowManager *UNUSED(wm), ARegion *ar) | ||||
| { | { | ||||
| ED_region_header_init(ar); | ED_region_header_init(ar); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 56 Lines • Show Last 20 Lines | |||||