From 2aa9c000edd6399d6ccd80e9c268116ba2696a39 Mon Sep 17 00:00:00 2001 From: Thomas Dinges Date: Fri, 20 May 2011 18:26:44 +0000 Subject: Fix for [#27333] Translation constraint is broken. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Committing here a patch by Bastien Montagne (mont29), a more understandable Translation Constraint UI. Before: http://www.pasteall.org/pic/12578 Now http://www.pasteall.org/pic/12258 From the description: "When you set “X” under the Destination’s “Z”, it does not mean that the Z transform of the source should affect the X transform of the destination, but rather that the X transform of the source should affect the Z transform of the destination…" The new UI should make it a bit more clear. --- .../startup/bl_ui/properties_object_constraint.py | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_object_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 59f9ca16d1a..2ca18744eb6 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -651,8 +651,24 @@ class ConstraintButtonsPanel(): sub.prop(con, "from_min_z", text="Min") sub.prop(con, "from_max_z", text="Max") - split = layout.split() + col = layout.column() + row = col.row() + row.label(text="Source to Destination Mapping:") + + row = col.row() + row.prop(con, "map_to_x_from", expand=False, text="") + row.label(text=" -> X") + row = col.row() + row.prop(con, "map_to_y_from", expand=False, text="") + row.label(text=" -> Y") + + row = col.row() + row.prop(con, "map_to_z_from", expand=False, text="") + row.label(text=" -> Z") + + split = layout.split() + col = split.column() col.label(text="Destination:") col.row().prop(con, "map_to", expand=True) @@ -661,7 +677,6 @@ class ConstraintButtonsPanel(): col = split.column() col.label(text="X:") - col.row().prop(con, "map_to_x_from", expand=True) sub = col.column(align=True) sub.prop(con, "to_min_x", text="Min") @@ -669,7 +684,6 @@ class ConstraintButtonsPanel(): col = split.column() col.label(text="Y:") - col.row().prop(con, "map_to_y_from", expand=True) sub = col.column(align=True) sub.prop(con, "to_min_y", text="Min") @@ -677,7 +691,6 @@ class ConstraintButtonsPanel(): col = split.column() col.label(text="Z:") - col.row().prop(con, "map_to_z_from", expand=True) sub = col.column(align=True) sub.prop(con, "to_min_z", text="Min") -- cgit v1.2.3 From 26252bb3154395965f5499bd5264474f9d93b787 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 26 May 2011 09:33:51 +0000 Subject: correct spelling error and some pep8 changes. --- release/scripts/startup/bl_ui/properties_object_constraint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_object_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 2ca18744eb6..7c2fe76fe14 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -666,9 +666,9 @@ class ConstraintButtonsPanel(): row = col.row() row.prop(con, "map_to_z_from", expand=False, text="") row.label(text=" -> Z") - + split = layout.split() - + col = split.column() col.label(text="Destination:") col.row().prop(con, "map_to", expand=True) -- cgit v1.2.3 From 7da45bcbcbda60fe1affa811f629e3e4b82cce1f Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Sun, 5 Jun 2011 23:38:11 +0000 Subject: replacing -> arrows by proper ASCII arrows on Transformation Constraint Note: Text Editor doesn't support this chr(187) properly. I hardcoded and commented the ui file. I hope it's fine. --- release/scripts/startup/bl_ui/properties_object_constraint.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_object_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 7c2fe76fe14..03823ad7345 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -655,17 +655,19 @@ class ConstraintButtonsPanel(): row = col.row() row.label(text="Source to Destination Mapping:") + # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't + # open it. Thus we are using the hardcoded value instead. row = col.row() row.prop(con, "map_to_x_from", expand=False, text="") - row.label(text=" -> X") + row.label(text=" %s X" % chr(187)) row = col.row() row.prop(con, "map_to_y_from", expand=False, text="") - row.label(text=" -> Y") + row.label(text=" %s Y" % chr(187)) row = col.row() row.prop(con, "map_to_z_from", expand=False, text="") - row.label(text=" -> Z") + row.label(text=" %s Z" % chr(187)) split = layout.split() -- cgit v1.2.3 From eaae38551f19a06c903c8beadbcaad9453b81b49 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 21 Jun 2011 17:17:51 +0000 Subject: pep8 compliance --- release/scripts/startup/bl_ui/properties_object_constraint.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'release/scripts/startup/bl_ui/properties_object_constraint.py') diff --git a/release/scripts/startup/bl_ui/properties_object_constraint.py b/release/scripts/startup/bl_ui/properties_object_constraint.py index 03823ad7345..5f79dd3127a 100644 --- a/release/scripts/startup/bl_ui/properties_object_constraint.py +++ b/release/scripts/startup/bl_ui/properties_object_constraint.py @@ -655,8 +655,8 @@ class ConstraintButtonsPanel(): row = col.row() row.label(text="Source to Destination Mapping:") - # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't - # open it. Thus we are using the hardcoded value instead. + # note: chr(187) is the ASCII arrow ( >> ). Blender Text Editor can't + # open it. Thus we are using the hardcoded value instead. row = col.row() row.prop(con, "map_to_x_from", expand=False, text="") row.label(text=" %s X" % chr(187)) -- cgit v1.2.3