diff --git a/release/scripts/save_theme.py b/release/scripts/save_theme.py index 7b21b5c74f7..a99050b404d 100644 --- a/release/scripts/save_theme.py +++ b/release/scripts/save_theme.py @@ -73,7 +73,11 @@ theme = Theme.Get()[0] # get current theme # default filename: theme's name + '_theme.py' in user's scripts dir: default_fname = Blender.Get("scriptsdir") -default_fname = Blender.sys.join(default_fname, theme.name + '_theme.py') +if (default_fname): + default_fname = Blender.sys.join(default_fname, theme.name + '_theme.py') +else: + default_fname = theme.name + '_theme.py' + default_fname = default_fname.replace(' ','_') def write_theme(filename): 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 ) diff --git a/source/blender/src/drawimage.c b/source/blender/src/drawimage.c index bd293663bde..c68f81a8675 100644 --- a/source/blender/src/drawimage.c +++ b/source/blender/src/drawimage.c @@ -583,8 +583,8 @@ void draw_uvs_sima(void) switch (G.sima->dt_uvstretch) { case SI_UVDT_STRETCH_AREA: { - float totarea, totuvarea, areadiff, uvarea, area, col[3]; - int uvarea_error = 0; + float totarea=0.0f, totuvarea=0.0f, areadiff, uvarea, area, col[3]; + for (efa= em->faces.first; efa; efa= efa->next) { tface= CustomData_em_get(&em->fdata, efa->data, CD_MTFACE); @@ -601,16 +601,18 @@ void draw_uvs_sima(void) } if (totarea==0.0 || totarea==0.0) { - col[0] - 1.0; + col[0] = 1.0; col[1] = col[2] = 0.0; glColor3fv(col); for (efa= em->faces.first; efa; efa= efa->next) { - glBegin(efa->v4?GL_QUADS:GL_TRIANGLES); - glVertex2fv(tface->uv[0]); - glVertex2fv(tface->uv[1]); - glVertex2fv(tface->uv[2]); - if(efa->v4) glVertex2fv(tface->uv[3]); - glEnd(); + if ((tface=(MTFace *)efa->tmp.p)) { + glBegin(efa->v4?GL_QUADS:GL_TRIANGLES); + glVertex2fv(tface->uv[0]); + glVertex2fv(tface->uv[1]); + glVertex2fv(tface->uv[2]); + if(efa->v4) glVertex2fv(tface->uv[3]); + glEnd(); + } } } @@ -652,7 +654,6 @@ void draw_uvs_sima(void) if (simaFaceDraw_Check(efa, tface)) { efa->tmp.p = tface; - if (efa->v4) { uvang1 = VecAngle3_2D(tface->uv[3], tface->uv[0], tface->uv[1]); ang1 = VecAngle3(efa->v4->co, efa->v1->co, efa->v2->co);