From a877155a7c2359b1984641ff9225f259de48611c Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sun, 23 Jan 2011 04:54:23 +0000 Subject: 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. --- source/blender/editors/space_logic/logic_window.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/space_logic') diff --git a/source/blender/editors/space_logic/logic_window.c b/source/blender/editors/space_logic/logic_window.c index ec8f21065f5..9e615d0d1aa 100644 --- a/source/blender/editors/space_logic/logic_window.c +++ b/source/blender/editors/space_logic/logic_window.c @@ -4097,14 +4097,19 @@ static void draw_actuator_motion(uiLayout *layout, PointerRNA *ptr) 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) -- cgit v1.2.3