From 717090f40e1aa12be26522df350d01a50d7b6316 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 11 Jan 2018 16:08:55 +1100 Subject: UI: option not to show screen splitting widgets Request for simplified Blender template, this may be extended to limit access to other UI changes that could be pressed by accident. --- source/blender/makesrna/intern/rna_userdef.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/makesrna/intern/rna_userdef.c') diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 71c53579585..3aed3a1edb1 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -155,6 +155,12 @@ static void rna_userdef_dpi_update(Main *bmain, Scene *UNUSED(scene), PointerRNA WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */ } +static void rna_userdef_update_ui(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) +{ + WM_main_add_notifier(NC_WINDOW, NULL); + WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); /* refresh region sizes */ +} + static void rna_userdef_language_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) { BLF_cache_clear(); @@ -3389,6 +3395,11 @@ static void rna_def_userdef_view(BlenderRNA *brna) RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE); RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup"); + prop = RNA_def_property(srna, "show_layout_ui", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_LOCK_UI_LAYOUT); + RNA_def_property_ui_text(prop, "Show Layout Widgets", "Show screen layout editing UI"); + RNA_def_property_update(prop, 0, "rna_userdef_update_ui"); + prop = RNA_def_property(srna, "show_playback_fps", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_FPS); RNA_def_property_ui_text(prop, "Show Playback FPS", -- cgit v1.2.3