Commit 8970953d authored by NBurn's avatar NBurn
Browse files

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.
parent 1b99528e
......@@ -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",
......
......@@ -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
......
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment