From c9c0f893073300d6898114cfc6cacd563c630750 Mon Sep 17 00:00:00 2001 From: Chris Clyne Date: Wed, 16 Sep 2020 15:52:43 +0200 Subject: Action Constraint: Add manual time factor input control MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .../scripts/startup/bl_ui/properties_constraint.py | 26 ++++++++++++++++------ 1 file changed, 19 insertions(+), 7 deletions(-) (limited to 'release/scripts/startup') 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 -- cgit v1.2.3