diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-11-23 13:11:39 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-12-24 19:58:09 +0300 |
commit | 33eabb82207e165de45fb6a0ea74dec962de7265 (patch) | |
tree | 714a714819fe27d1f998b0a3c3c7824e786be9ac /release/scripts/startup/bl_ui/properties_constraint.py | |
parent | 9378debd26f7b20babcc251bdef64563a56c6ae0 (diff) |
Action Constraint: introduce a mix mode setting.
Currently the action channels are applied after the existing
transformation, as if the action controlled a child of the
bone. This is not very natural, but more importantly, the
transform tools are not designed to work conveniently with an
additional 'pseudo-child' transformation, resulting in effects
like an unexpected pivot location.
Implementing a Before mode that integrates the action channels
as if applied to a parent allows using the special transform
tool code intended for dealing with such constraints.
Note that in either mode, Action constraints should be added
in reverse order, putting a new constraint before the existing
ones that the Action was keyframed to work together.
In order to implement the option, extract a utility from
the Copy Transform constraint code for combining transforms
with special anti-shear scale handling that matches the
Aligned Inherit Scale mode.
The Before mode also requires switching the constraint to
the Local owner space, while the After mode can still use the
World space for efficiency as before. Since the constraint
doesn't have an Owner space option in the UI, this has to be
handled in an RNA setter.
For full backward compatibility, the original simple matrix
multiplication mode is preserved as the third option, but it
is not recommended due to creating shear.
Differential Revision: https://developer.blender.org/D6297
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_constraint.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_constraint.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index b75d67b5350..3fc54ff6d12 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -492,6 +492,8 @@ class ConstraintButtonsPanel: col.prop(con, "frame_start", text="Start") col.prop(con, "frame_end", text="End") + layout.prop(con, "mix_mode", text="Mix") + def LOCKED_TRACK(self, _context, layout, con): self.target_template(layout, con) |