[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [12834] trunk/blender/source/blender/src: Fixing compiler warnings, and bad button placement from previous commit for ghosting.

Joshua Leung aligorith at gmail.com
Mon Dec 10 09:53:16 CET 2007


Revision: 12834
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=12834
Author:   aligorith
Date:     2007-12-10 09:53:15 +0100 (Mon, 10 Dec 2007)

Log Message:
-----------
Fixing compiler warnings, and bad button placement from previous commit for ghosting. Also general code tidying in editaction.c

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

Modified: trunk/blender/source/blender/src/buttons_editing.c
===================================================================
--- trunk/blender/source/blender/src/buttons_editing.c	2007-12-10 04:50:22 UTC (rev 12833)
+++ trunk/blender/source/blender/src/buttons_editing.c	2007-12-10 08:53:15 UTC (rev 12834)
@@ -3990,10 +3990,10 @@
 													10, 160, 150, 20, &arm->ghosttype, 0, 0, 0, 0, "Choose range of Ghosts to draw for current Action");	
 		
 		if (arm->ghosttype != ARM_GHOST_KEYS)
-			uiDefButS(block, NUM, REDRAWVIEW3D, "GStep: ", 10,120,150,20, &arm->ghostsize, 1.0f, 20.0f, 0, 0, "How many frames between Ghost instances");
+			uiDefButS(block, NUM, REDRAWVIEW3D, "GStep: ", 10,140,120,20, &arm->ghostsize, 1.0f, 20.0f, 0, 0, "How many frames between Ghost instances");
 		else
 			uiDefBut(block, LABEL, REDRAWVIEW3D, "GStep: N/A", 10,140,120,20, NULL, 0.0f, 0.0f, 0, 0, "How many frames between Ghost instances");
-		uiDefButBitS(block, TOG, ARM_GHOST_ONLYSEL, REDRAWVIEW3D, "Sel", 130, 140, 30, 20, &arm->flag, 0, 0, 0, 0, "Only show Ghosts for selected bones");
+		uiDefButBitI(block, TOG, ARM_GHOST_ONLYSEL, REDRAWVIEW3D, "Sel", 130, 140, 30, 20, &arm->flag, 0, 0, 0, 0, "Only show Ghosts for selected bones");
 	uiBlockEndAlign(block);
 	
 	uiBlockBeginAlign(block);

Modified: trunk/blender/source/blender/src/drawarmature.c
===================================================================
--- trunk/blender/source/blender/src/drawarmature.c	2007-12-10 04:50:22 UTC (rev 12833)
+++ trunk/blender/source/blender/src/drawarmature.c	2007-12-10 08:53:15 UTC (rev 12834)
@@ -1944,7 +1944,6 @@
 	bArmature *arm= ob->data;
 	bPose *pose= ob->pose;
 	bPoseChannel *pchan;
-	Bone *bone;
 	
 	/* don't do anything if no hiding any bones */
 	if ((arm->flag & ARM_GHOST_ONLYSEL)==0)

Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c	2007-12-10 04:50:22 UTC (rev 12833)
+++ trunk/blender/source/blender/src/editaction.c	2007-12-10 08:53:15 UTC (rev 12834)
@@ -136,7 +136,7 @@
 		return NULL;
 
 	for (achan= action->chanbase.first; achan; achan= achan->next) {
-		if(VISIBLE_ACHAN(achan)) {
+		if (VISIBLE_ACHAN(achan)) {
 			if (SEL_ACHAN(achan) && (achan->flag & ACHAN_HILIGHTED))
 				return achan;
 		}
@@ -2129,7 +2129,7 @@
 	actdata_filter(&act_data, filter, data, datatype);
 	
 	for (ale= act_data.first; ale; ale= ale->next) {
-		for(ce= elems.first; ce; ce= ce->next) {
+		for (ce= elems.first; ce; ce= ce->next) {
 			for (icu= ale->key_data; icu; icu= icu->next) {
 				BezTriple *bezt;
 				int verts = 0;
@@ -2691,7 +2691,7 @@
 		case HOMEKEY:
 			do_action_buttons(B_ACTHOME);	// header
 			break;
-
+		
 		case AKEY:
 			if (mval[0]<NAMEWIDTH) {
 				deselect_action_channels (1);
@@ -2717,7 +2717,7 @@
 				}
 			}
 			break;
-
+		
 		case BKEY:
 			if (G.qual & LR_CTRLKEY) {
 				borderselect_markers();
@@ -2727,14 +2727,14 @@
 					borderselect_action();
 			}
 			break;
-
+		
 		case CKEY:
 			/* scroll the window so the current
 			 * frame is in the center.
 			 */
 			center_currframe();
 			break;
-
+		
 		case DKEY:
 			if (mval[0]>ACTWIDTH) {
 				if (G.qual == (LR_CTRLKEY|LR_SHIFTKEY))
@@ -2927,18 +2927,18 @@
 		 * based on user preference USER_LMOUSESELECT
 		 */
 		case LEFTMOUSE:
-			if(view2dmove(LEFTMOUSE)) // only checks for sliders
+			if (view2dmove(LEFTMOUSE)) /* only checks for sliders */
 				break;
 			else if ((G.v2d->mask.xmin==0) || (mval[0]>ACTWIDTH)) {
+				/* moving time-marker / current frame */
 				do {
 					getmouseco_areawin(mval);
-					
 					areamouseco_to_ipoco(G.v2d, mval, &dx, &dy);
 					
 					cfra= (int)dx;
-					if(cfra< 1) cfra= 1;
+					if (cfra < 1) cfra= 1;
 					
-					if( cfra!=CFRA ) {
+					if (cfra != CFRA) {
 						CFRA= cfra;
 						update_for_newframe();
 						force_draw_all(0);					





More information about the Bf-blender-cvs mailing list