[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [24891] trunk/blender: selected_pchans --> selected_pose_bones, same for visible_pchans

Campbell Barton ideasman42 at gmail.com
Wed Nov 25 16:00:29 CET 2009


Revision: 24891
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=24891
Author:   campbellbarton
Date:     2009-11-25 16:00:29 +0100 (Wed, 25 Nov 2009)

Log Message:
-----------
selected_pchans --> selected_pose_bones, same for visible_pchans
added use_ prefix to bools offset --> use_offset, tail --> use_tail for eg.

Modified Paths:
--------------
    trunk/blender/release/scripts/ui/properties_object_constraint.py
    trunk/blender/source/blender/blenkernel/BKE_context.h
    trunk/blender/source/blender/blenkernel/intern/context.c
    trunk/blender/source/blender/editors/animation/keyingsets.c
    trunk/blender/source/blender/editors/armature/editarmature.c
    trunk/blender/source/blender/editors/armature/poseSlide.c
    trunk/blender/source/blender/editors/armature/poseobject.c
    trunk/blender/source/blender/editors/object/object_constraint.c
    trunk/blender/source/blender/editors/screen/screen_context.c
    trunk/blender/source/blender/makesrna/intern/rna_constraint.c

Modified: trunk/blender/release/scripts/ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_object_constraint.py	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/release/scripts/ui/properties_object_constraint.py	2009-11-25 15:00:29 UTC (rev 24891)
@@ -187,16 +187,16 @@
             col.label(text="Weight:")
             col.prop(con, "weight", text="Position", slider=True)
             sub = col.column()
-            sub.active = con.rotation
+            sub.active = con.use_rotation
             sub.prop(con, "orient_weight", text="Rotation", slider=True)
 
             if wide_ui:
                 col = split.column()
-            col.prop(con, "tail")
-            col.prop(con, "stretch")
+            col.prop(con, "use_tail")
+            col.prop(con, "use_stretch")
             col.separator()
-            col.prop(con, "targetless")
-            col.prop(con, "rotation")
+            col.prop(con, "use_target")
+            col.prop(con, "use_rotation")
 
     def IK_COPY_POSE(self, context, layout, con, wide_ui):
         self.target_template(layout, con, wide_ui)
@@ -217,13 +217,13 @@
         row.prop(con, "pos_lock_x", text="X")
         row.prop(con, "pos_lock_y", text="Y")
         row.prop(con, "pos_lock_z", text="Z")
-        split.active = con.position
+        split.active = con.use_position
 
         split = layout.split(percentage=0.33)
         split.row().prop(con, "rotation")
         row = split.row()
         row.prop(con, "orient_weight", text="Weight", slider=True)
-        row.active = con.rotation
+        row.active = con.use_rotation
         split = layout.split(percentage=0.33)
         row = split.row()
         row.label(text="Lock:")
@@ -231,7 +231,7 @@
         row.prop(con, "rot_lock_x", text="X")
         row.prop(con, "rot_lock_y", text="Y")
         row.prop(con, "rot_lock_z", text="Z")
-        split.active = con.rotation
+        split.active = con.use_rotation
 
     def IK_DISTANCE(self, context, layout, con, wide_ui):
         self.target_template(layout, con, wide_ui)
@@ -257,7 +257,7 @@
         if con.use_fixed_position:
             col.prop(con, "offset_factor", text="Offset")
         else:
-            col.prop(con, "offset")
+            col.prop(con, "use_offset")
 
         row = layout.row()
         if wide_ui:
@@ -419,7 +419,7 @@
         sub.active = con.rotate_like_z
         sub.prop(con, "invert_z", text="Invert")
 
-        layout.prop(con, "offset")
+        layout.prop(con, "use_offset")
 
         self.space_template(layout, con, wide_ui)
 
@@ -446,7 +446,7 @@
         sub.active = con.locate_like_z
         sub.prop(con, "invert_z", text="Invert")
 
-        layout.prop(con, "offset")
+        layout.prop(con, "use_offset")
 
         self.space_template(layout, con, wide_ui)
 
@@ -458,7 +458,7 @@
         row.prop(con, "size_like_y", text="Y")
         row.prop(con, "size_like_z", text="Z")
 
-        layout.prop(con, "offset")
+        layout.prop(con, "use_offset")
 
         self.space_template(layout, con, wide_ui)
 

Modified: trunk/blender/source/blender/blenkernel/BKE_context.h
===================================================================
--- trunk/blender/source/blender/blenkernel/BKE_context.h	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/blenkernel/BKE_context.h	2009-11-25 15:00:29 UTC (rev 24891)
@@ -249,8 +249,8 @@
 int CTX_data_editable_bones(const bContext *C, ListBase *list);
 
 struct bPoseChannel *CTX_data_active_pose_bone(const bContext *C);
-int CTX_data_selected_pchans(const bContext *C, ListBase *list);
-int CTX_data_visible_pchans(const bContext *C, ListBase *list);
+int CTX_data_selected_pose_bones(const bContext *C, ListBase *list);
+int CTX_data_visible_bose_bones(const bContext *C, ListBase *list);
 
 #ifdef __cplusplus
 }

Modified: trunk/blender/source/blender/blenkernel/intern/context.c
===================================================================
--- trunk/blender/source/blender/blenkernel/intern/context.c	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/blenkernel/intern/context.c	2009-11-25 15:00:29 UTC (rev 24891)
@@ -883,13 +883,13 @@
 	return ctx_data_pointer_get(C, "active_pose_bone");
 }
 
-int CTX_data_selected_pchans(const bContext *C, ListBase *list)
+int CTX_data_selected_pose_bones(const bContext *C, ListBase *list)
 {
-	return ctx_data_collection_get(C, "selected_pchans", list);
+	return ctx_data_collection_get(C, "selected_pose_bones", list);
 }
 
-int CTX_data_visible_pchans(const bContext *C, ListBase *list)
+int CTX_data_visible_pose_bones(const bContext *C, ListBase *list)
 {
-	return ctx_data_collection_get(C, "visible_pchans", list);
+	return ctx_data_collection_get(C, "visible_pose_bones", list);
 }
 

Modified: trunk/blender/source/blender/editors/animation/keyingsets.c
===================================================================
--- trunk/blender/source/blender/editors/animation/keyingsets.c	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/editors/animation/keyingsets.c	2009-11-25 15:00:29 UTC (rev 24891)
@@ -1220,7 +1220,7 @@
 		//}
 #endif
 		
-		CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans)
+		CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
 		{
 			/* add a new keying-source */
 			cks= MEM_callocN(sizeof(bCommonKeySrc), "bCommonKeySrc");

Modified: trunk/blender/source/blender/editors/armature/editarmature.c
===================================================================
--- trunk/blender/source/blender/editors/armature/editarmature.c	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/editors/armature/editarmature.c	2009-11-25 15:00:29 UTC (rev 24891)
@@ -1316,7 +1316,7 @@
 	int mode= RNA_enum_get(op->ptr, "mode");
 	
 	/* loop over all selected pchans */
-	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pchans) 
+	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, selected_pose_bones) 
 	{
 		bone_setflag(&pchan->bone->flag, flag, mode);
 	}
@@ -4800,7 +4800,7 @@
 	cks.id= &ob->id;
 	
 	/* only clear those channels that are not locked */
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) {
 		if ((pchan->protectflag & OB_LOCK_SCALEX)==0)
 			pchan->size[0]= 1.0f;
 		if ((pchan->protectflag & OB_LOCK_SCALEY)==0)
@@ -4863,7 +4863,7 @@
 	cks.id= &ob->id;
 	
 	/* only clear those channels that are not locked */
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) {
 		/* clear location */
 		if ((pchan->protectflag & OB_LOCK_LOCX)==0)
 			pchan->loc[0]= 0.0f;
@@ -4927,7 +4927,7 @@
 	cks.id= &ob->id;
 	
 	/* only clear those channels that are not locked */
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) {
 		if (pchan->protectflag & (OB_LOCK_ROTX|OB_LOCK_ROTY|OB_LOCK_ROTZ|OB_LOCK_ROTW)) {
 			/* check if convert to eulers for locking... */
 			if (pchan->protectflag & OB_LOCK_ROT4D) {
@@ -5068,7 +5068,7 @@
 {
 	
 	/*	Set the flags */
-	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
 		if ((pchan->bone->flag & BONE_UNSELECTABLE) == 0) {
 			pchan->bone->flag ^= (BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);
 		}
@@ -5101,10 +5101,10 @@
 
 	/* Determine if there are any selected bones and therefore whether we are selecting or deselecting */
 	// NOTE: we have to check for > 1 not > 0, since there is almost always an active bone that can't be cleared...
-	if (CTX_DATA_COUNT(C, selected_pchans) > 1)	sel=0;
+	if (CTX_DATA_COUNT(C, selected_pose_bones) > 1)	sel=0;
 	
 	/*	Set the flags */
-	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel *, pchan, visible_pose_bones) {
 		/* select pchan only if selectable, but deselect works always */
 		if (sel==0) {
 			pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL);

Modified: trunk/blender/source/blender/editors/armature/poseSlide.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseSlide.c	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/editors/armature/poseSlide.c	2009-11-25 15:00:29 UTC (rev 24891)
@@ -178,7 +178,7 @@
 	/* for each Pose-Channel which gets affected, get the F-Curves for that channel 
 	 * and set the relevant transform flags...
 	 */
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) 
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) 
 	{
 		ListBase curves = {NULL, NULL};
 		int transFlags = action_get_item_transforms(act, pso->ob, pchan, &curves);

Modified: trunk/blender/source/blender/editors/armature/poseobject.c
===================================================================
--- trunk/blender/source/blender/editors/armature/poseobject.c	2009-11-25 14:59:02 UTC (rev 24890)
+++ trunk/blender/source/blender/editors/armature/poseobject.c	2009-11-25 15:00:29 UTC (rev 24891)
@@ -1329,7 +1329,7 @@
 	
 	/* add selected bones to group then */
 	// NOTE: unfortunately, we cannot use the context-iterators here, since they might not be defined...
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) {
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) {
 		pchan->agrp_index= pose->active_group;
 		done= 1;
 	}
@@ -1388,7 +1388,7 @@
 	
 	/* add selected bones to ungroup then */
 	// NOTE: unfortunately, we cannot use the context-iterators here, since they might not be defined...
-	// CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans) 
+	// CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones) 
 	for (pchan= pose->chanbase.first; pchan; pchan= pchan->next) {
 		/* ensure that PoseChannel is on visible layer and is not hidden in PoseMode */
 		// NOTE: sync this view3d_context() in space_view3d.c
@@ -1530,7 +1530,7 @@
 	arm= ob->data;
 	
 	/* loop through selected bones, auto-naming them */
-	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pchans)
+	CTX_DATA_BEGIN(C, bPoseChannel*, pchan, selected_pose_bones)
 	{
 		BLI_strncpy(newname, pchan->name, sizeof(newname));
 		bone_flip_name(newname, 1);	// 1 = do strip off number extensions
@@ -1577,7 +1577,7 @@
 	arm= ob->data;
 	

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list