diff options
author | Chris Clyne <lateasusual> | 2020-09-16 16:52:43 +0300 |
---|---|---|
committer | Sebastian Parborg <darkdefende@gmail.com> | 2020-09-16 16:55:22 +0300 |
commit | c9c0f893073300d6898114cfc6cacd563c630750 (patch) | |
tree | 2f7b102728debdddd1b9f968886e90d39ac00c1a /release/scripts/startup/bl_ui/properties_constraint.py | |
parent | 569e2e6dbac489b4143859cfeb87debf7253eab6 (diff) |
Action Constraint: Add manual time factor input control
Adds an optional slider to the action constraint so that it can be
driven without a constraint target.
This is very helpful for more complex rigging and mechanical rigs, as it
means the action constraint can be controlled with a driver/custom
property directly, currently if we want to use a driver to control it we
must add a "dummy" bone/object inbetween to act as a control.
Reviewed By: Sebastian Parborg, Sybren A. Stüvel, Demeter Dzadik, Julian Eisel
Differential Revision: http://developer.blender.org/D8022
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_constraint.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_constraint.py | 26 |
1 files changed, 19 insertions, 7 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index da35ea680b8..14619ef916d 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -508,7 +508,18 @@ class ConstraintButtonsPanel(Panel): layout.use_property_split = True layout.use_property_decorate = True - self.target_template(layout, con) + target_row = layout.row(align=True) + target_row.active = not con.use_eval_time + self.target_template(target_row, con) + + row = layout.row(align=True, heading="Evaluation Time") + row.use_property_decorate = False + sub = row.row(align=True) + sub.prop(con, "use_eval_time", text="") + subsub = sub.row(align=True) + subsub.active = con.use_eval_time + subsub.prop(con, "eval_time", text="") + row.prop_decorator(con, "eval_time") layout.prop(con, "mix_mode", text="Mix") @@ -1105,13 +1116,14 @@ class ConstraintButtonsSubPanel(Panel): layout.use_property_split = True layout.use_property_decorate = True - layout.prop(con, "transform_channel", text="Channel") - layout.prop(con, "target_space") - - col = layout.column(align=True) - col.prop(con, "min", text="Range Min") - col.prop(con, "max", text="Max") + col = layout.column() + col.active = not con.use_eval_time + col.prop(con, "transform_channel", text="Channel") + col.prop(con, "target_space") + sub = col.column(align=True) + sub.prop(con, "min", text="Range Min") + sub.prop(con, "max", text="Max") def draw_action_action(self, context): layout = self.layout |