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.
This commit is contained in:
Campbell Barton
2013-06-10 10:55:57 +00:00
parent e8408efdba
commit bff8a4c594
3 changed files with 11 additions and 3 deletions

View File

@@ -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;

View File

@@ -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");

View File

@@ -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);
}
}