[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17322] branches/etch-a-ton/source/blender /src: Properly unselect copied bones (it wasn't clearing active flag)

Martin Poirier theeth at yahoo.com
Tue Nov 4 20:10:54 CET 2008


Revision: 17322
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17322
Author:   theeth
Date:     2008-11-04 20:10:54 +0100 (Tue, 04 Nov 2008)

Log Message:
-----------
Properly unselect copied bones (it wasn't clearing active flag)
Remove double undo push

Modified Paths:
--------------
    branches/etch-a-ton/source/blender/src/editarmature_retarget.c
    branches/etch-a-ton/source/blender/src/editarmature_sketch.c

Modified: branches/etch-a-ton/source/blender/src/editarmature_retarget.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_retarget.c	2008-11-04 14:40:45 UTC (rev 17321)
+++ branches/etch-a-ton/source/blender/src/editarmature_retarget.c	2008-11-04 19:10:54 UTC (rev 17322)
@@ -412,7 +412,7 @@
 	ctrl->flag = src_ctrl->flag;
 
 	ctrl->bone = duplicateEditBone(src_ctrl->bone, rg->editbones, rg->ob);
-	ctrl->bone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
+	ctrl->bone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL|BONE_ACTIVE);
 	BLI_ghash_insert(ptr_hash, src_ctrl->bone, ctrl->bone);
 	
 	ctrl->link = src_ctrl->link;
@@ -453,7 +453,7 @@
 		if (src_edge->bone != NULL)
 		{
 			edge->bone = duplicateEditBone(src_edge->bone, rg->editbones, rg->ob);
-			edge->bone->flag &= ~(BONE_SELECTED|BONE_ROOTSEL|BONE_TIPSEL);
+			edge->bone->flag &= ~(BONE_TIPSEL|BONE_SELECTED|BONE_ROOTSEL|BONE_ACTIVE);
 			BLI_ghash_insert(ptr_hash, src_edge->bone, edge->bone);
 		}
 
@@ -1684,7 +1684,7 @@
 
 		bone->roll = rollBoneByQuatAligned(bone, edge->up_axis, qrot, qroll, up_axis);
 		
-		QuatMul(qrot, qrot, qroll);
+		QuatMul(qrot, qroll, qrot);
 	}
 	else
 	{

Modified: branches/etch-a-ton/source/blender/src/editarmature_sketch.c
===================================================================
--- branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-04 14:40:45 UTC (rev 17321)
+++ branches/etch-a-ton/source/blender/src/editarmature_sketch.c	2008-11-04 19:10:54 UTC (rev 17322)
@@ -355,7 +355,7 @@
 }
 /*********************** CONVERSION ***************************/
 
-ReebNode *pointToNode(SK_Point *pt)
+ReebNode *sk_pointToNode(SK_Point *pt)
 {
 	ReebNode *node;
 	
@@ -370,14 +370,14 @@
 	return node;
 }
 
-ReebArc *strokeToArc(SK_Stroke *stk)
+ReebArc *sk_strokeToArc(SK_Stroke *stk)
 {
 	ReebArc *arc;
 	int i;
 	
 	arc = MEM_callocN(sizeof(ReebArc), "reeb arc");
-	arc->head = pointToNode(stk->points);
-	arc->tail = pointToNode(sk_lastStrokePoint(stk));
+	arc->head = sk_pointToNode(stk->points);
+	arc->tail = sk_pointToNode(sk_lastStrokePoint(stk));
 	
 	arc->bcount = stk->nb_points - 2; /* first and last are nodes, don't count */
 	arc->buckets = MEM_callocN(sizeof(EmbedBucket) * arc->bcount, "Buckets");
@@ -394,9 +394,9 @@
 	return arc;
 }
 
-void retargetStroke(SK_Stroke *stk)
+void sk_retargetStroke(SK_Stroke *stk)
 {
-	ReebArc *arc = strokeToArc(stk);
+	ReebArc *arc = sk_strokeToArc(stk);
 	
 	BIF_retargetArc(arc);
 	
@@ -2331,14 +2331,14 @@
 			{
 				if (G.scene->toolsettings->bone_sketching_convert == SK_CONVERT_RETARGET)
 				{
-					retargetStroke(stk);
+					sk_retargetStroke(stk);
 				}
 				else
 				{
 					sk_convertStroke(stk);
+					BIF_undo_push("Convert Sketch");
 				}
 				sk_removeStroke(sketch, stk);
-				BIF_undo_push("Convert Sketch");
 				allqueue(REDRAWBUTSEDIT, 0);
 			}
 			





More information about the Bf-blender-cvs mailing list