Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_screen.c
| Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | |||||
| static void rna_Area_type_update(bContext *C, PointerRNA *ptr) | static void rna_Area_type_update(bContext *C, PointerRNA *ptr) | ||||
| { | { | ||||
| wmWindowManager *wm = CTX_wm_manager(C); | wmWindowManager *wm = CTX_wm_manager(C); | ||||
| wmWindow *win; | wmWindow *win; | ||||
| bScreen *sc = (bScreen *)ptr->id.data; | bScreen *sc = (bScreen *)ptr->id.data; | ||||
| ScrArea *sa = (ScrArea *)ptr->data; | ScrArea *sa = (ScrArea *)ptr->data; | ||||
| if (!ED_screen_is_editable(sc)) { | |||||
| sa->butspacetype = sa->spacetype; | |||||
| return; | |||||
| } | |||||
| /* XXX this call still use context, so we trick it to work in the right context */ | /* XXX this call still use context, so we trick it to work in the right context */ | ||||
| for (win = wm->windows.first; win; win = win->next) { | for (win = wm->windows.first; win; win = win->next) { | ||||
| if (sc == win->screen) { | if (sc == win->screen) { | ||||
| wmWindow *prevwin = CTX_wm_window(C); | wmWindow *prevwin = CTX_wm_window(C); | ||||
| ScrArea *prevsa = CTX_wm_area(C); | ScrArea *prevsa = CTX_wm_area(C); | ||||
| ARegion *prevar = CTX_wm_region(C); | ARegion *prevar = CTX_wm_region(C); | ||||
| CTX_wm_window_set(C, win); | CTX_wm_window_set(C, win); | ||||
| ▲ Show 20 Lines • Show All 236 Lines • ▼ Show 20 Lines | static void rna_def_screen(BlenderRNA *brna) | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Screen_is_animation_playing_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Screen_is_animation_playing_get", NULL); | ||||
| RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active"); | RNA_def_property_ui_text(prop, "Animation Playing", "Animation playback is active"); | ||||
| prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_fullscreen", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | RNA_def_property_clear_flag(prop, PROP_EDITABLE); | ||||
| RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL); | RNA_def_property_boolean_funcs(prop, "rna_Screen_fullscreen_get", NULL); | ||||
| RNA_def_property_ui_text(prop, "Maximize", "An area is maximized, filling this screen"); | RNA_def_property_ui_text(prop, "Maximize", "An area is maximized, filling this screen"); | ||||
| #ifdef WITH_INPUT_HMD | |||||
| prop = RNA_def_property(srna, "is_hmd_running", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_clear_flag(prop, PROP_EDITABLE); | |||||
| RNA_def_property_ui_text(prop, "HMD Session Running", "This screen is running an HMD session"); | |||||
| #endif | |||||
| /* Define Anim Playback Areas */ | /* Define Anim Playback Areas */ | ||||
| prop = RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_play_top_left_3d_editor", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_REGION); | RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_REGION); | ||||
| RNA_def_property_ui_text(prop, "Top-Left 3D Editor", ""); | RNA_def_property_ui_text(prop, "Top-Left 3D Editor", ""); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Screen_redraw_update"); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_TIME, "rna_Screen_redraw_update"); | ||||
| prop = RNA_def_property(srna, "use_play_3d_editors", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_play_3d_editors", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_3D_WIN); | RNA_def_property_boolean_sdna(prop, NULL, "redraws_flag", TIME_ALL_3D_WIN); | ||||
| ▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines | |||||