diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-03-09 10:35:12 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-03-09 10:35:12 +0300 |
commit | d9da14d8a72aa99ea09d979de154798d30e653cb (patch) | |
tree | 389478476e3437c91c18efbd035f4d8cbaf1d9c6 /source/blender/python | |
parent | a339bca9a137eb3fc7cea546094dbc88e7bce06d (diff) |
fix for uninitialized variables in uv stretch drawing,
[#8428] 'Editmesh_active' theme colour not accessible via Python
bugfix problem where saving a theme would raise and error when ~/.blender didnt exist.
bugfix for file selector staying open (introduced with own undo resistant scripts)
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/api2_2x/Window.c | 11 | ||||
-rw-r--r-- | source/blender/python/api2_2x/windowTheme.c | 3 |
2 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/python/api2_2x/Window.c b/source/blender/python/api2_2x/Window.c index 46f696b2c74..5cfe796add8 100644 --- a/source/blender/python/api2_2x/Window.c +++ b/source/blender/python/api2_2x/Window.c @@ -527,8 +527,9 @@ static void getSelectedFile( char *name ) } else Py_DECREF(result); - if (script->py_browsercallback == pycallback) - script->py_browsercallback = NULL; + if (script->py_browsercallback == pycallback) { + SCRIPT_SET_NULL(script); + } /* else another call to selector was made inside pycallback */ Py_DECREF(pycallback); @@ -599,8 +600,12 @@ static PyObject *M_Window_FileSelector( PyObject * self, PyObject * args ) } script->py_browsercallback = pycallback; + /* if were not running a script GUI here alredy, then dont make this script persistant */ + if ((script->flags & SCRIPT_GUI)==0) { + script->scriptname[0] = '\0'; + script->scriptarg[0] = '\0'; + } activate_fileselect( FILE_BLENDER, title, filename, getSelectedFile ); - Py_RETURN_NONE; } diff --git a/source/blender/python/api2_2x/windowTheme.c b/source/blender/python/api2_2x/windowTheme.c index 98894c9a0ec..b345cd0ae0f 100644 --- a/source/blender/python/api2_2x/windowTheme.c +++ b/source/blender/python/api2_2x/windowTheme.c @@ -1,5 +1,5 @@ /* - * $Id: windowTheme.c 12139 2007-09-25 03:31:12Z campbellbarton $ + * $Id$ * * ***** BEGIN GPL/BL DUAL LICENSE BLOCK ***** * @@ -252,6 +252,7 @@ static int ThemeSpace_setAttr( BPy_ThemeSpace * self, char *name, ELSEIF_TSP_RGBA( edge_select ) ELSEIF_TSP_RGBA( edge_seam ) ELSEIF_TSP_RGBA( edge_sharp ) + ELSEIF_TSP_RGBA( editmesh_active ) ELSEIF_TSP_RGBA( edge_facesel ) ELSEIF_TSP_RGBA( face ) ELSEIF_TSP_RGBA( face_select ) |