[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [17125] trunk/blender/source/blender/src: - Bugfix: 'Hide' button for PoseMode bones (in Editing Buttons) was setting the 'Mult' flag instead

Joshua Leung aligorith at gmail.com
Mon Oct 20 06:53:52 CEST 2008


Revision: 17125
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=17125
Author:   aligorith
Date:     2008-10-20 06:53:49 +0200 (Mon, 20 Oct 2008)

Log Message:
-----------
- Bugfix: 'Hide' button for PoseMode bones (in Editing Buttons) was setting the 'Mult' flag instead
- Tidied up comments in Action Editor code a bit

Modified Paths:
--------------
    trunk/blender/source/blender/src/buttons_editing.c
    trunk/blender/source/blender/src/editaction.c
    trunk/blender/source/blender/src/editaction_gpencil.c

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c	2008-10-20 00:48:10 UTC (rev 17124)
+++ trunk/blender/source/blender/src/buttons_editing.c	2008-10-20 04:53:49 UTC (rev 17125)
@@ -4635,7 +4635,7 @@
 			uiDefButBitI(block, TOG, BONE_NO_SCALE, B_ARM_RECALCDATA, "S",			70,by-38,20,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Don't inherit scale from parent Bone");
 			uiDefButBitI(block, TOGN, BONE_NO_DEFORM, B_ARM_RECALCDATA, "Deform",	90, by-38, 80, 19, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "Indicate if Bone deforms geometry");
 			uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Mult",	170,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Multiply Bone Envelope with VertexGroup");
-			uiDefButBitI(block, TOG, BONE_MULT_VG_ENV, B_ARM_RECALCDATA, "Hide",	250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
+			uiDefButBitI(block, TOG, BONE_HIDDEN_P, B_ARM_RECALCDATA, "Hide",	250,by-38,80,19, &curBone->flag, 1.0, 32.0, 0.0, 0.0, "Toggles display of this bone in Edit Mode");
 			
 			/* layers */
 			uiBlockBeginAlign(block);

Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c	2008-10-20 00:48:10 UTC (rev 17124)
+++ trunk/blender/source/blender/src/editaction.c	2008-10-20 04:53:49 UTC (rev 17125)
@@ -2095,9 +2095,9 @@
 	short datatype;
 	Object *ob= OBACT;
 	
+	const float offset = (float)(CFRA - actcopy_firstframe);
+	char *actname = NULL, *conname = NULL;
 	short no_name= 0;
-	float offset = CFRA - actcopy_firstframe;
-	char *actname = NULL, *conname = NULL;
 	
 	/* check if buffer is empty */
 	if (ELEM(NULL, actcopybuf.first, actcopybuf.last)) {
@@ -2118,13 +2118,13 @@
 	
 	/* from selected channels */
 	for (ale= act_data.first; ale; ale= ale->next) {
-		Ipo *ipo_src=NULL;
+		Ipo *ipo_src = NULL;
 		bActionChannel *achan;
 		IpoCurve *ico, *icu;
 		BezTriple *bezt;
 		int i;
 		
-		/* find matching ipo-block */
+		/* find suitable IPO-block from buffer to paste from */
 		for (achan= actcopybuf.first; achan; achan= achan->next) {
 			/* try to match data */
 			if (ale->ownertype == ACTTYPE_ACHAN) {
@@ -2170,7 +2170,8 @@
 		
 		/* loop over curves, pasting keyframes */
 		for (ico= ipo_src->curve.first; ico; ico= ico->next) {
-			icu= verify_ipocurve((ID*)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
+			/* get IPO-curve to paste to (IPO-curve might not exist for destination, so gets created) */
+			icu= verify_ipocurve((ID *)ob, ico->blocktype, actname, conname, NULL, ico->adrcode, 1);
 			
 			if (icu) {
 				/* just start pasting, with the the first keyframe on the current frame, and so on */

Modified: trunk/blender/source/blender/src/editaction_gpencil.c
===================================================================
--- trunk/blender/source/blender/src/editaction_gpencil.c	2008-10-20 00:48:10 UTC (rev 17124)
+++ trunk/blender/source/blender/src/editaction_gpencil.c	2008-10-20 04:53:49 UTC (rev 17125)
@@ -83,7 +83,7 @@
 #include "blendef.h"
 #include "butspace.h"
 
-#include "PIL_time.h"			/* sleep				*/
+#include "PIL_time.h"
 #include "mydevice.h"
 
 /* ***************************************** */
@@ -220,17 +220,22 @@
 	select_gpencil_frames (gpl, mode);
 }
 
+/* select the frame in this layer that occurs on this frame (there should only be one at most) */
 void select_gpencil_frame (bGPDlayer *gpl, int selx, short select_mode)
 {
 	bGPDframe *gpf;
    
 	/* search through frames for a match */
 	for (gpf= gpl->frames.first; gpf; gpf= gpf->next) {
-		if (gpf->framenum == selx)
+		/* there should only be one frame with this frame-number */
+		if (gpf->framenum == selx) {
 			gpframe_select(gpf, select_mode);
+			break;
+		}
 	}
 }
 
+/* select the frames in this layer that occur within the bounds specified */
 void borderselect_gplayer_frames (bGPDlayer *gpl, float min, float max, short select_mode)
 {
 	bGPDframe *gpf;
@@ -290,6 +295,7 @@
 /* ***************************************** */
 /* Frame Editing Tools */
 
+/* Delete selected grease-pencil layers */
 void delete_gpencil_layers (void)
 {
 	ListBase act_data = {NULL, NULL};
@@ -396,7 +402,7 @@
 }
 
 /* This function adds data to the copy/paste buffer, freeing existing data first
- * Only the selected action channels gets their selected keyframes copied.
+ * Only the selected GP-layers get their selected keyframes copied.
  */
 void copy_gpdata ()
 {





More information about the Bf-blender-cvs mailing list