[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11443] trunk/blender/source/blender/src/ buttons_object.c: Constraints UI:

Joshua Leung aligorith at gmail.com
Tue Jul 31 14:36:04 CEST 2007


Revision: 11443
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11443
Author:   aligorith
Date:     2007-07-31 14:36:03 +0200 (Tue, 31 Jul 2007)

Log Message:
-----------
Constraints UI:

* Swapped the order of the CSpace menus. This is so that it makes more sense with the Transform Constraint, to follow a source (target) -> destination (owner) flow.

* 'Local Space' option for Objects has been renamed 'Local (Without Parent) Space'

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

Modified: trunk/blender/source/blender/src/buttons_object.c
===================================================================
--- trunk/blender/source/blender/src/buttons_object.c	2007-07-31 05:30:32 UTC (rev 11442)
+++ trunk/blender/source/blender/src/buttons_object.c	2007-07-31 12:36:03 UTC (rev 11443)
@@ -484,24 +484,25 @@
  */
 static void draw_constraint_spaceselect (uiBlock *block, bConstraint *con, short xco, short yco, short owner, short target)
 {
-	short ownx, tarx;
+	short tarx, ownx;
 	short bwidth;
 	
 	/* calculate sizes and placement of menus */
 	if (owner == -1) {
 		bwidth = 125;
+		tarx = 120;
 		ownx = 0;
-		tarx = 120;
+		
 	}
 	else if (target == -1) {
 		bwidth = 125;
+		tarx = 0;
 		ownx = 120;
-		tarx = 0;
 	}
 	else {
 		bwidth = 100;
-		ownx = 95;
-		tarx = ownx + bwidth;
+		tarx = 95;
+		ownx = tarx + bwidth;
 	}
 	
 	
@@ -509,26 +510,26 @@
 	
 	uiBlockBeginAlign(block);
 	
+	/* Target-Space */
+	if (target == 1) {
+		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Target Space %t|World Space %x0|Pose Space %x3|Local with Parent %x4|Local Space %x1", 
+												tarx, yco, bwidth, 18, &con->tarspace, 0, 0, 0, 0, "Choose space that target is evaluated in");	
+	}
+	else if (target == 0) {
+		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Target Space %t|World Space %x0|Local (Without Parent) Space %x1", 
+										tarx, yco, bwidth, 18, &con->tarspace, 0, 0, 0, 0, "Choose space that target is evaluated in");	
+	}
+	
 	/* Owner-Space */
 	if (owner == 1) {
 		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Owner Space %t|World Space %x0|Pose Space %x3|Local with Parent %x4|Local Space %x1", 
 												ownx, yco, bwidth, 18, &con->ownspace, 0, 0, 0, 0, "Choose space that owner is evaluated in");	
 	}
 	else if (owner == 0) {
-		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Owner Space %t|World Space %x0|Local Space %x1", 
+		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Owner Space %t|World Space %x0|Local (Without Parent) Space %x1", 
 										ownx, yco, bwidth, 18, &con->ownspace, 0, 0, 0, 0, "Choose space that owner is evaluated in");	
 	}
 	
-	/* Target-Space */
-	if (target == 1) {
-		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Target Space %t|World Space %x0|Pose Space %x3|Local with Parent %x4|Local Space %x1", 
-												tarx, yco, bwidth, 18, &con->tarspace, 0, 0, 0, 0, "Choose space that target is evaluated in");	
-	}
-	else if (target == 0) {
-		uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Target Space %t|World Space %x0|Local Space %x1", 
-										tarx, yco, bwidth, 18, &con->tarspace, 0, 0, 0, 0, "Choose space that target is evaluated in");	
-	}
-	
 	uiBlockEndAlign(block);
 }
 





More information about the Bf-blender-cvs mailing list