[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17239] branches/animsys2/source/blender/ src/editobject.c: AnimSys2: ShapeKeys Recentering tweak
Joshua Leung
aligorith at gmail.com
Fri Oct 31 06:41:47 CET 2008
Revision: 17239
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17239
Author: aligorith
Date: 2008-10-31 06:41:45 +0100 (Fri, 31 Oct 2008)
Log Message:
-----------
AnimSys2: ShapeKeys Recentering tweak
* Removed the check for pinned shapekeys (not really worth enforcing it)
* Replaced the check with one for multiuser meshes. Multiuser meshes being recentered have more issues than recentering shapekeys do.
Modified Paths:
--------------
branches/animsys2/source/blender/src/editobject.c
Modified: branches/animsys2/source/blender/src/editobject.c
===================================================================
--- branches/animsys2/source/blender/src/editobject.c 2008-10-31 05:29:54 UTC (rev 17238)
+++ branches/animsys2/source/blender/src/editobject.c 2008-10-31 05:41:45 UTC (rev 17239)
@@ -1851,7 +1851,7 @@
int a, total= 0;
/* keep track of what is changed */
- int tot_change=0, tot_lib_error=0, tot_key_error=0, tot_multiuser_arm_error=0;
+ int tot_change=0, tot_lib_error=0, tot_multiuser_mesh_error=0, tot_multiuser_arm_error=0;
MVert *mvert;
if(G.scene->id.lib || G.vd==NULL) return;
@@ -1913,18 +1913,8 @@
tot_lib_error++;
}
else if(G.obedit==0 && (me=get_mesh(base->object)) ) {
- short skey_bad= 0;
-
- /* not all shapekeys are bad... just the pinned ones */
- if (me->key) {
- if (base->object->shapeflag & OB_SHAPE_LOCK)
- skey_bad= 1;
- }
-
- if (skey_bad) {
- /*error("Can't change the center of a mesh with vertex keys");
- return;*/
- tot_key_error++;
+ if (me->id.us > 1) {
+ tot_multiuser_mesh_error++;
} else if (me->id.lib) {
tot_lib_error++;
} else {
@@ -2144,14 +2134,14 @@
}
/* Warn if any errors occured */
- if (tot_lib_error+tot_key_error+tot_multiuser_arm_error) {
+ if (tot_lib_error+tot_multiuser_mesh_error+tot_multiuser_arm_error) {
char err[512];
sprintf(err, "Warning %i Object(s) Not Centered, %i Changed:", tot_lib_error+tot_key_error+tot_multiuser_arm_error, tot_change);
if (tot_lib_error)
sprintf(err+strlen(err), "|%i linked library objects", tot_lib_error);
- if (tot_key_error)
- sprintf(err+strlen(err), "|%i mesh key object(s)", tot_key_error);
+ if (tot_multiuser_mesh_error)
+ sprintf(err+strlen(err), "|%i multiuser mesh object(s)", tot_multiuser_mesh_error);
if (tot_multiuser_arm_error)
sprintf(err+strlen(err), "|%i multiuser armature object(s)", tot_multiuser_arm_error);
More information about the Bf-blender-cvs
mailing list