[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [34461] trunk/blender/source/blender: Logic UI: ParentActuator fix + PropertyActuator tooltip improvement

Dalai Felinto dfelinto at gmail.com
Sun Jan 23 05:54:24 CET 2011


Revision: 34461
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=34461
Author:   dfelinto
Date:     2011-01-23 04:54:23 +0000 (Sun, 23 Jan 2011)
Log Message:
-----------
Logic UI: ParentActuator fix + PropertyActuator tooltip improvement
ParentActuator: sub options only available when mode==setParent + deactive ghost option when compound is true (isntead of saying that in the tooltip)
PropertyActuator: I never knew that you could pass a property name to the Add and Assign options of the Property Actuator. Where it's by design or a side effect is cool. And a tooltip explaining that does help.

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	2011-01-22 23:38:28 UTC (rev 34460)
+++ trunk/blender/source/blender/editors/space_logic/logic_window.c	2011-01-23 04:54:23 UTC (rev 34461)
@@ -4097,14 +4097,19 @@
 
 static void draw_actuator_parent(uiLayout *layout, PointerRNA *ptr)
 {
-	uiLayout *row;
+	uiLayout *row, *subrow;
 
 	uiItemR(layout, ptr, "mode", 0, NULL, ICON_NULL);
-	uiItemR(layout, ptr, "object", 0, NULL, ICON_NULL);
 
-	row = uiLayoutRow(layout, 0);
-	uiItemR(row, ptr, "use_compound", 0, NULL, ICON_NULL);
-	uiItemR(row, ptr, "use_ghost", 0, NULL, ICON_NULL);
+	if (RNA_enum_get(ptr, "mode") == ACT_PARENT_SET) {
+		uiItemR(layout, ptr, "object", 0, NULL, ICON_NULL);
+
+		row = uiLayoutRow(layout, 0);
+		uiItemR(row, ptr, "use_compound", 0, NULL, ICON_NULL);
+		subrow= uiLayoutRow(row, 0);
+		uiLayoutSetActive(subrow, RNA_boolean_get(ptr, "use_compound")==1);
+		uiItemR(subrow, ptr, "use_ghost", 0, NULL, ICON_NULL);
+	}
 }
 
 static void draw_actuator_property(uiLayout *layout, PointerRNA *ptr)

Modified: trunk/blender/source/blender/makesrna/intern/rna_actuator.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2011-01-22 23:38:28 UTC (rev 34460)
+++ trunk/blender/source/blender/makesrna/intern/rna_actuator.c	2011-01-23 04:54:23 UTC (rev 34461)
@@ -999,7 +999,7 @@
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
 	prop= RNA_def_property(srna, "value", PROP_STRING, PROP_NONE);
-	RNA_def_property_ui_text(prop, "Value", "The value to use, use \"\" around strings");
+	RNA_def_property_ui_text(prop, "Value", "The name of the property or the value to use (use \"\" around strings)");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 
 	/* Copy Mode */
@@ -1700,7 +1700,7 @@
 
 	prop= RNA_def_property(srna, "use_ghost", PROP_BOOLEAN, PROP_NONE);
 	RNA_def_property_boolean_sdna(prop, NULL, "flag", ACT_PARENT_GHOST);
-	RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented (only if not compound)");
+	RNA_def_property_ui_text(prop, "Ghost", "Make this object ghost while parented");
 	RNA_def_property_update(prop, NC_LOGIC, NULL);
 }
 




More information about the Bf-blender-cvs mailing list