diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-06-10 14:55:57 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-06-10 14:55:57 +0400 |
commit | bff8a4c594c84d2ab14111897afedd0d8a8804d9 (patch) | |
tree | fa180918e76ca8cfb7418eaae9bfd7b717996918 | |
parent | e8408efdba5cbae770fc6f9a0347440401587be1 (diff) |
correction to typo in r57327, ui-load wasnt working on splash screen.
also minor changes:
- update the load-UI flag when changing in the preferences.
- remove unused initialization values for subdivide.
-rw-r--r-- | source/blender/bmesh/operators/bmo_subdivide.c | 4 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 8 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_operators.c | 2 |
3 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/bmesh/operators/bmo_subdivide.c b/source/blender/bmesh/operators/bmo_subdivide.c index be0b7eed971..7fbc6f48350 100644 --- a/source/blender/bmesh/operators/bmo_subdivide.c +++ b/source/blender/bmesh/operators/bmo_subdivide.c @@ -209,8 +209,8 @@ static void alter_co(BMVert *v, BMEdge *UNUSED(origed), const SubDParams *params } if (params->use_fractal) { - float len = len_v3v3(vsta->co, vend->co); - float normal[3] = {0.0f, 0.0f, 0.0f}, co2[3], base1[3], base2[3]; + const float len = len_v3v3(vsta->co, vend->co); + float normal[3], co2[3], base1[3], base2[3]; fac = params->fractal * len; diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 14aa6631d1f..347c57f9044 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -152,6 +152,13 @@ static void rna_userdef_script_autoexec_update(Main *UNUSED(bmain), Scene *UNUSE else G.f |= G_SCRIPT_AUTOEXEC; } +static void rna_userdef_load_ui_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) +{ + UserDef *userdef = (UserDef *)ptr->data; + if (userdef->flag & USER_FILENOUI) G.fileflags |= G_FILE_NO_UI; + else G.fileflags &= ~G_FILE_NO_UI; +} + static void rna_userdef_mipmap_update(Main *bmain, Scene *scene, PointerRNA *ptr) { GPU_set_mipmap(!(U.gameflags & USER_DISABLE_MIPMAP)); @@ -3907,6 +3914,7 @@ static void rna_def_userdef_filepaths(BlenderRNA *brna) prop = RNA_def_property(srna, "use_load_ui", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", USER_FILENOUI); RNA_def_property_ui_text(prop, "Load UI", "Load user interface setup when loading .blend files"); + RNA_def_property_update(prop, 0, "rna_userdef_load_ui_update"); prop = RNA_def_property(srna, "font_directory", PROP_STRING, PROP_DIRPATH); RNA_def_property_string_sdna(prop, NULL, "fontdir"); diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index d832e84d7f0..3d4bd2a1bc6 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1922,7 +1922,7 @@ static void open_set_load_ui(wmOperator *op, bool use_prefs) if (!RNA_property_is_set(op->ptr, prop)) { RNA_property_boolean_set(op->ptr, prop, use_prefs ? (U.flag & USER_FILENOUI) == 0 : - (G.fileflags |= G_FILE_NO_UI) == 0); + (G.fileflags & G_FILE_NO_UI) == 0); } } |