Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2011-01-23 07:54:23 +0300
committerDalai Felinto <dfelinto@gmail.com>2011-01-23 07:54:23 +0300
commita877155a7c2359b1984641ff9225f259de48611c (patch)
tree32491f5aa79ed8358e0d95f4ee131aa19469c099 /source/blender/editors/space_logic
parentf39c794c7c3eca9c73ea0bdab084e6c191343965 (diff)
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.
Diffstat (limited to 'source/blender/editors/space_logic')
-rw-r--r--source/blender/editors/space_logic/logic_window.c15
1 files changed, 10 insertions, 5 deletions
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)