[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [13401] trunk/blender/source/blender/src: Two bugfixes:

Joshua Leung aligorith at gmail.com
Fri Jan 25 12:27:39 CET 2008


Revision: 13401
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=13401
Author:   aligorith
Date:     2008-01-25 12:27:38 +0100 (Fri, 25 Jan 2008)

Log Message:
-----------
Two bugfixes:
* Buttons to change position of constraints in constraint stack are now totally hidden if they don't do anything valid. It'll have to be this way until we get grey-able buttons.

* Duplicating keyframes in Action Editor now sets correct undo-string 

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

Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c	2008-01-25 11:23:36 UTC (rev 13400)
+++ trunk/blender/source/blender/src/buttons_object.c	2008-01-25 11:27:38 UTC (rev 13401)
@@ -602,13 +602,8 @@
 		uiBlockBeginAlign(block);
 			uiBlockSetEmboss(block, UI_EMBOSS);
 			
-			if ((prev_proxylock) || (con->prev==NULL)) {
-				/* don't draw 'button' behind arrow if disabled (and button doesn't do anything anyways) */
-				uiBlockSetEmboss(block, UI_EMBOSSN);
-				uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_UP, *xco+width-50, *yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint up in constraint stack");
-				uiBlockSetEmboss(block, UI_EMBOSS);
-			}
-			else {
+			/* only show buttons that will do anything valid */
+			if ((prev_proxylock==0) && (con->prev)) {
 				but = uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_UP, *xco+width-50, *yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint up in constraint stack");
 				uiButSetFunc(but, constraint_moveUp, ob, con);
 			}
@@ -617,12 +612,6 @@
 				but = uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_DOWN, *xco+width-50+18, *yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint down in constraint stack");
 				uiButSetFunc(but, constraint_moveDown, ob, con);
 			}
-			else {
-				/* don't draw 'button' behind arrow if no next constraint (it doesn't do anything anyways) */
-				uiBlockSetEmboss(block, UI_EMBOSSN);
-				uiDefIconBut(block, BUT, B_CONSTRAINT_TEST, VICON_MOVE_DOWN, *xco+width-50+18, *yco, 16, 18, NULL, 0.0, 0.0, 0.0, 0.0, "Move constraint down in constraint stack");
-				uiBlockSetEmboss(block, UI_EMBOSS);
-			}
 		uiBlockEndAlign(block);
 		
 		

Modified: trunk/blender/source/blender/src/editaction.c
===================================================================
--- trunk/blender/source/blender/src/editaction.c	2008-01-25 11:23:36 UTC (rev 13400)
+++ trunk/blender/source/blender/src/editaction.c	2008-01-25 11:27:38 UTC (rev 13401)
@@ -1160,6 +1160,7 @@
 	BLI_freelistN(&act_data);
 	
 	/* now, go into transform-grab mode, to move keys */
+	BIF_TransformSetUndo("Add Duplicate");
 	transform_action_keys('g', 0);
 }
 





More information about the Bf-blender-cvs mailing list