[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35374] trunk/blender/source/blender/ editors/transform/transform_conversions.c: Fix #26324: proportional editing and armature applied to editing cage during edit mode works strangely

Sergey Sharybin g.ulairi at gmail.com
Sun Mar 6 18:03:25 CET 2011


Revision: 35374
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35374
Author:   nazgul
Date:     2011-03-06 17:03:25 +0000 (Sun, 06 Mar 2011)
Log Message:
-----------
Fix #26324: proportional editing and armature applied to editing cage during edit mode works strangely

Not sure why proportional editing used to disable crazyspace corrections,
but from that time hwn it was done transform stuff was changed a lot.
I've made several tests (with file from report and sintel from durian
data files) and it worked nice.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/transform/transform_conversions.c

Modified: trunk/blender/source/blender/editors/transform/transform_conversions.c
===================================================================
--- trunk/blender/source/blender/editors/transform/transform_conversions.c	2011-03-06 13:11:57 UTC (rev 35373)
+++ trunk/blender/source/blender/editors/transform/transform_conversions.c	2011-03-06 17:03:25 UTC (rev 35374)
@@ -2056,27 +2056,25 @@
 	if(propmode) editmesh_set_connectivity_distance(em, mtx);
 
 	/* detect CrazySpace [tm] */
-	if(propmode==0) {
-		if(modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
-			if(modifiers_isCorrectableDeformed(t->obedit)) {
-				/* check if we can use deform matrices for modifier from the
-				   start up to stack, they are more accurate than quats */
-				totleft= editmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
+	if(modifiers_getCageIndex(t->scene, t->obedit, NULL, 1)>=0) {
+		if(modifiers_isCorrectableDeformed(t->obedit)) {
+			/* check if we can use deform matrices for modifier from the
+			   start up to stack, they are more accurate than quats */
+			totleft= editmesh_get_first_deform_matrices(t->scene, t->obedit, em, &defmats, &defcos);
 
-				/* if we still have more modifiers, also do crazyspace
-				   correction with quats, relative to the coordinates after
-				   the modifiers that support deform matrices (defcos) */
-				if(totleft > 0) {
-					mappedcos= crazyspace_get_mapped_editverts(t->scene, t->obedit);
-					quats= MEM_mallocN( (t->total)*sizeof(float)*4, "crazy quats");
-					crazyspace_set_quats_editmesh(em, (float*)defcos, mappedcos, quats);
-					if(mappedcos)
-						MEM_freeN(mappedcos);
-				}
-
-				if(defcos)
-					MEM_freeN(defcos);
+			/* if we still have more modifiers, also do crazyspace
+			   correction with quats, relative to the coordinates after
+			   the modifiers that support deform matrices (defcos) */
+			if(totleft > 0) {
+				mappedcos= crazyspace_get_mapped_editverts(t->scene, t->obedit);
+				quats= MEM_mallocN( (t->total)*sizeof(float)*4, "crazy quats");
+				crazyspace_set_quats_editmesh(em, (float*)defcos, mappedcos, quats);
+				if(mappedcos)
+					MEM_freeN(mappedcos);
 			}
+
+			if(defcos)
+				MEM_freeN(defcos);
 		}
 	}
 




More information about the Bf-blender-cvs mailing list