diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2011-01-23 07:54:23 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2011-01-23 07:54:23 +0300 |
commit | a877155a7c2359b1984641ff9225f259de48611c (patch) | |
tree | 32491f5aa79ed8358e0d95f4ee131aa19469c099 /source/blender | |
parent | f39c794c7c3eca9c73ea0bdab084e6c191343965 (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')
-rw-r--r-- | source/blender/editors/space_logic/logic_window.c | 15 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_actuator.c | 4 |
2 files changed, 12 insertions, 7 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) diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c index 3c71319a322..378209bb2e7 100644 --- a/source/blender/makesrna/intern/rna_actuator.c +++ b/source/blender/makesrna/intern/rna_actuator.c @@ -999,7 +999,7 @@ static void rna_def_property_actuator(BlenderRNA *brna) 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 @@ static void rna_def_parent_actuator(BlenderRNA *brna) 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); } |