[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28658] trunk/blender/source/blender: adjusment to constraint actuator layout ( forgot to expose normal and before)

Dalai Felinto dfelinto at gmail.com
Sat May 8 01:56:27 CEST 2010


Revision: 28658
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28658
Author:   dfelinto
Date:     2010-05-08 01:56:26 +0200 (Sat, 08 May 2010)

Log Message:
-----------
adjusment to constraint actuator layout (forgot to expose normal and before)

Modified Paths:
--------------
    trunk/blender/source/blender/editors/space_logic/logic_window.c
    trunk/blender/source/blender/makesrna/intern/rna_actuator.c

Modified: trunk/blender/source/blender/editors/space_logic/logic_window.c
===================================================================
--- trunk/blender/source/blender/editors/space_logic/logic_window.c	2010-05-07 23:34:03 UTC (rev 28657)
+++ trunk/blender/source/blender/editors/space_logic/logic_window.c	2010-05-07 23:56:26 UTC (rev 28658)
@@ -3635,7 +3635,7 @@
 
 static void draw_actuator_constraint(uiLayout *layout, PointerRNA *ptr)
 {
-	uiLayout *row, *subrow, *split;
+	uiLayout *row, *subrow, *col, *subcol, *split;
 
 	uiItemR(layout, ptr, "mode", 0, NULL, 0);
 	switch (RNA_enum_get(ptr, "mode"))
@@ -3651,16 +3651,23 @@
 			break;
 
 		case ACT_CONST_TYPE_DIST:
-			uiItemR(layout, ptr, "direction", 0, NULL, 0);//move to the right
-			if(RNA_enum_get(ptr, "direction")!=0)
-				uiItemR(layout, ptr, "force_distance", 0, NULL, 0);
+			split = uiLayoutSplit(layout, 0.8, 0);
+			uiItemR(split, ptr, "direction", 0, NULL, 0);
+			row = uiLayoutRow(split, 1);
+			uiItemR(row, ptr, "local", UI_ITEM_R_TOGGLE, NULL, 0);
+			uiItemR(row, ptr, "normal", UI_ITEM_R_TOGGLE, NULL, 0);
 
 			row = uiLayoutRow(layout, 0);
-			uiItemR(row, ptr, "range", 0, NULL, 0);
-			subrow = uiLayoutRow(row, 0);
-			uiLayoutSetActive(subrow, RNA_boolean_get(ptr, "force_distance")==1);
-			uiItemR(subrow, ptr, "distance", 0, NULL, 0);
+			col = uiLayoutColumn(row, 0);
+			uiItemL(col, "Range:", 0);
+			uiItemR(col, ptr, "range", 0, "", 0);
 
+			col = uiLayoutColumn(row, 1);
+			uiItemR(col, ptr, "force_distance", UI_ITEM_R_TOGGLE, NULL, 0);
+			subcol = uiLayoutColumn(col, 0);
+			uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "force_distance")==1);
+			uiItemR(subcol, ptr, "distance", 0, "", 0);
+
 			uiItemR(layout, ptr, "damping", UI_ITEM_R_SLIDER , NULL, 0);
 
 			split = uiLayoutSplit(layout, 0.15, 0);
@@ -3904,21 +3911,21 @@
 			row = uiLayoutRow(layout, 0);
 			col = uiLayoutColumn(row, 0);
 			uiItemR(col, ptr, "servo_limit_x", UI_ITEM_R_TOGGLE, NULL, 0);
-			subcol = uiLayoutColumn(col, 0);
+			subcol = uiLayoutColumn(col, 1);
 			uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "servo_limit_x")==1);
 			uiItemR(subcol, ptr, "force_max_x", 0, NULL, 0);
 			uiItemR(subcol, ptr, "force_min_x", 0, NULL, 0);
 
 			col = uiLayoutColumn(row, 0);
 			uiItemR(col, ptr, "servo_limit_y", UI_ITEM_R_TOGGLE, NULL, 0);
-			subcol = uiLayoutColumn(col, 0);
+			subcol = uiLayoutColumn(col, 1);
 			uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "servo_limit_y")==1);
 			uiItemR(subcol, ptr, "force_max_y", 0, NULL, 0);
 			uiItemR(subcol, ptr, "force_min_y", 0, NULL, 0);
 
 			col = uiLayoutColumn(row, 0);
 			uiItemR(col, ptr, "servo_limit_z", UI_ITEM_R_TOGGLE, NULL, 0);
-			subcol = uiLayoutColumn(col, 0);
+			subcol = uiLayoutColumn(col, 1);
 			uiLayoutSetActive(subcol, RNA_boolean_get(ptr, "servo_limit_z")==1);
 			uiItemR(subcol, ptr, "force_max_z", 0, NULL, 0);
 			uiItemR(subcol, ptr, "force_min_z", 0, NULL, 0);

Modified: trunk/blender/source/blender/makesrna/intern/rna_actuator.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2010-05-07 23:34:03 UTC (rev 28657)
+++ trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2010-05-07 23:56:26 UTC (rev 28658)
@@ -546,7 +546,7 @@
 	
 	prop= RNA_def_property(srna, "damping", PROP_INT, PROP_NONE);
 	RNA_def_property_ui_range(prop, 0, 1000, 1, 1);
-	RNA_def_property_ui_text(prop, "Damping", "Number of frames to reach the target velocity");
+	RNA_def_property_ui_text(prop, "Damping Frames", "Number of frames to reach the target velocity");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
 	prop= RNA_def_property(srna, "proportional_coefficient", PROP_FLOAT, PROP_NONE);
@@ -1044,7 +1044,7 @@
 	prop= RNA_def_property(srna, "range", PROP_FLOAT, PROP_NONE);
 	RNA_def_property_float_funcs(prop, "rna_ConstraintActuator_range_get", "rna_ConstraintActuator_range_set", NULL);
 	RNA_def_property_ui_range(prop, 0.f, 2000.f, 1, 2);
-	RNA_def_property_ui_text(prop, "Range", "");
+	RNA_def_property_ui_text(prop, "Range", "Set the maximum length of ray");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
 	prop= RNA_def_property(srna, "distance", PROP_FLOAT, PROP_NONE);
@@ -1127,7 +1127,7 @@
 	RNA_def_property_ui_text(prop, "L", "Set ray along object's axis or global axis");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
-	prop= RNA_def_property(srna, "nomal", PROP_BOOLEAN, PROP_NONE);
+	prop= RNA_def_property(srna, "normal", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_CONST_NORMAL);
 	RNA_def_property_ui_text(prop, "N", "Set object axis along (local axis) or parallel (global axis) to the normal at hit position");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);





More information about the Bf-blender-cvs mailing list