diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-01 13:19:11 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2019-09-01 14:13:23 +0300 |
commit | 18d4ad5a59d32922f9d70b0412da0c830baceb17 (patch) | |
tree | c6e630362f87e533b5482ae7fd096ce49d0eeab6 /release/scripts/startup | |
parent | ae43b1d51b4a0384c2197a6aca5cd2810c9283ff (diff) |
Copy Rotation & Transform: add Euler order override options.
For reasons similar to drivers, it should be possible to set an
explicit Euler rotation order in constraints that use Euler angles.
The Transform constraint in a way approaches drivers in its use,
in that it effectively alters channels using values of other
channels after applying a fixed form mathematical expression.
For this reason, instead of just specifying the euler order for
its inputs, it uses the same enum as driver variables. However
Quaternion components are converted to a weighted pseudo-angle
representation as the rest of the constraint UI expects angles.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_constraint.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_constraint.py b/release/scripts/startup/bl_ui/properties_constraint.py index d8eb0db62fc..0ba9fd0630c 100644 --- a/release/scripts/startup/bl_ui/properties_constraint.py +++ b/release/scripts/startup/bl_ui/properties_constraint.py @@ -370,6 +370,8 @@ class ConstraintButtonsPanel: def COPY_ROTATION(self, _context, layout, con): self.target_template(layout, con) + layout.prop(con, "euler_order", text="Order") + split = layout.split() col = split.column() @@ -685,6 +687,9 @@ class ConstraintButtonsPanel: col.row().label(text="Source:") col.row().prop(con, "map_from", expand=True) + if con.map_from == 'ROTATION': + layout.prop(con, "from_rotation_mode", text="Mode") + split = layout.split() ext = "" if con.map_from == 'LOCATION' else "_rot" if con.map_from == 'ROTATION' else "_scale" @@ -727,6 +732,9 @@ class ConstraintButtonsPanel: col.label(text="Destination:") col.row().prop(con, "map_to", expand=True) + if con.map_to == 'ROTATION': + layout.prop(con, "to_euler_order", text="Order") + split = layout.split() ext = "" if con.map_to == 'LOCATION' else "_rot" if con.map_to == 'ROTATION' else "_scale" |