[Bf-extensions-cvs] [8970953] master: xedit: bugfix for rotation problem in T85734

NBurn noreply at git.blender.org
Thu Apr 15 07:52:18 CEST 2021


Commit: 8970953d4a8a4ea3bf77c66370c817ed0cf1308a
Author: NBurn
Date:   Thu Apr 15 01:52:06 2021 -0400
Branches: master
https://developer.blender.org/rBAC8970953d4a8a4ea3bf77c66370c817ed0cf1308a

xedit: bugfix for rotation problem in T85734

Update/workaround to account for code changes after 2.83 preventing
custom orientation matrixes from being read if a valid axis constrait
was not provided to bpy.ops.transform.rotate.

===================================================================

M	exact_edit/__init__.py
M	exact_edit/xedit_free_rotate.py
M	exact_edit/xedit_set_meas.py

===================================================================

diff --git a/exact_edit/__init__.py b/exact_edit/__init__.py
index a5a386c..662b39b 100644
--- a/exact_edit/__init__.py
+++ b/exact_edit/__init__.py
@@ -21,7 +21,7 @@ END GPL LICENSE BLOCK
 bl_info = {
     "name": "Exact Edit",
     "author": "nBurn",
-    "version": (0, 3, 1),
+    "version": (0, 3, 2),
     "blender": (2, 80, 0),
     "location": "View3D",
     "description": "Tool for precisely setting distance, scale, and rotation",
diff --git a/exact_edit/xedit_free_rotate.py b/exact_edit/xedit_free_rotate.py
index e5bae46..8c15db4 100644
--- a/exact_edit/xedit_free_rotate.py
+++ b/exact_edit/xedit_free_rotate.py
@@ -1228,7 +1228,8 @@ class XEDIT_OT_free_rotate(bpy.types.Operator):
                 bpy.context.tool_settings.transform_pivot_point = 'CURSOR'
                 bpy.context.scene.cursor.location = curs_loc
                 #bpy.ops.transform.rotate('INVOKE_DEFAULT', axis=rot_axis)
-                bpy.ops.transform.rotate('INVOKE_DEFAULT', orient_matrix=o_mat)
+                bpy.ops.transform.rotate('INVOKE_DEFAULT', orient_matrix=o_mat,
+                        orient_axis='Z', constraint_axis=(False, False, True))
 
             #===========================================
             # Check for click on "Add Selected" Button
diff --git a/exact_edit/xedit_set_meas.py b/exact_edit/xedit_set_meas.py
index d0ca875..e3b869a 100644
--- a/exact_edit/xedit_set_meas.py
+++ b/exact_edit/xedit_set_meas.py
@@ -1271,6 +1271,7 @@ def do_rotate(pivot_co):
     pivot = pivot_co.copy()
     constr_ax = False, False, False
     if axis_lock is None:
+        constr_ax = False, False, True
         #rot_matr = Matrix.Rotation(TransDat.ang_diff_r, 4, TransDat.piv_norm)
         norml = TransDat.piv_norm
         o_mat = create_z_orient(norml)



More information about the Bf-extensions-cvs mailing list