- Stopping jobs on undo wasnt fixing undo/redo while with render previews as it was supposed to: needed WM_jobs_stop_all rather then WM_jobs_stop because it ends the thread rather then just setting 'stop'.

- gpl header + warning fix
This commit is contained in:
Campbell Barton 2009-11-04 20:50:09 +00:00
parent e73a2bd55a
commit 08bbda5005
4 changed files with 23 additions and 3 deletions

View File

@ -1,3 +1,23 @@
# ##### BEGIN GPL LICENSE BLOCK #####
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software Foundation,
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#
# ##### END GPL LICENSE BLOCK #####
# <pep8-80 compliant>
import bpy
from bpy.props import *

View File

@ -44,7 +44,7 @@ void copy_defgroups (struct ListBase *lb1, struct ListBase *lb2);
struct bDeformGroup *copy_defgroup (struct bDeformGroup *ingroup);
struct bDeformGroup *get_named_vertexgroup (Object *ob, char *name);
int get_defgroup_num (struct Object *ob, struct bDeformGroup *dg);
int get_named_vertexgroup_num (Object *ob, char *name);
int get_named_vertexgroup_num (Object *ob, const char *name);
void unique_vertexgroup_name (struct bDeformGroup *dg, struct Object *ob);
float deformvert_get_weight(const struct MDeformVert *dvert, int group_num);

View File

@ -537,7 +537,7 @@ static int read_undosave(bContext *C, UndoElem *uel)
int success=0, fileflags;
/* This is needed so undoing/redoing doesnt crash with threaded previews going */
WM_jobs_stop(CTX_wm_manager(C), CTX_wm_screen(C));
WM_jobs_stop_all(CTX_wm_manager(C));
strcpy(scestr, G.sce); /* temporal store */
fileflags= G.fileflags;

View File

@ -110,7 +110,7 @@ bDeformGroup *get_named_vertexgroup (Object *ob, char *name)
return NULL;
}
int get_named_vertexgroup_num (Object *ob, char *name)
int get_named_vertexgroup_num (Object *ob, const char *name)
{
/* Return the location of the named deform group within the list of
* deform groups. This function is a combination of get_defgroup_num and