[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36857] branches/soc-2011-pepper/source/ blender/editors/armature/poseobject.c: == Paste Poses ==

Joshua Leung aligorith at gmail.com
Tue May 24 12:15:03 CEST 2011


Revision: 36857
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36857
Author:   aligorith
Date:     2011-05-24 10:15:02 +0000 (Tue, 24 May 2011)
Log Message:
-----------
== Paste Poses ==
"On Selected Only" option is now on by default. Stored poses only get
pasted on to bones that are selected when pasting, instead of on the
bones that were selected when copying.

(First GSoC11 commit. Yay!)

Modified Paths:
--------------
    branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c

Modified: branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c
===================================================================
--- branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c	2011-05-24 08:11:51 UTC (rev 36856)
+++ branches/soc-2011-pepper/source/blender/editors/armature/poseobject.c	2011-05-24 10:15:02 UTC (rev 36857)
@@ -1002,6 +1002,14 @@
 		return OPERATOR_CANCELLED;
 	}
 	
+	/* if selOnly option is enabled, if user hasn't selected any bones, 
+	 * just go back to default behaviour to be more in line with other pose tools
+	 */
+	if (selOnly) {
+		if (CTX_DATA_COUNT(C, selected_pose_bones) == 0)
+			selOnly = 0;
+	}
+	
 	/* Safely merge all of the channels in the buffer pose into any existing pose */
 	for (chan= g_posebuf->chanbase.first; chan; chan=chan->next) {
 		if (chan->flag & POSE_KEY) {
@@ -1169,7 +1177,7 @@
 	
 	/* properties */
 	RNA_def_boolean(ot->srna, "flipped", 0, "Flipped on X-Axis", "Paste the stored pose flipped on to current pose");
-	RNA_def_boolean(ot->srna, "selected_mask", 0, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
+	RNA_def_boolean(ot->srna, "selected_mask", 1, "On Selected Only", "Only paste the stored pose on to selected bones in the current pose");
 }
 
 /* ********************************************** */




More information about the Bf-blender-cvs mailing list