From 18d4ad5a59d32922f9d70b0412da0c830baceb17 Mon Sep 17 00:00:00 2001 From: Alexander Gavrilov Date: Sun, 1 Sep 2019 13:19:11 +0300 Subject: 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. --- release/scripts/startup/bl_ui/properties_constraint.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'release/scripts/startup/bl_ui/properties_constraint.py') 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" -- cgit v1.2.3