[Bf-extensions-cvs] [ff37747e] blender-v2.82-release: PDT: Update Pivot Point on Move (bugfix)
Alan Odom
noreply at git.blender.org
Sat Feb 1 16:44:49 CET 2020
Commit: ff37747efcf9292da7169408f3f8299f37866041
Author: Alan Odom
Date: Thu Jan 30 14:26:10 2020 +0000
Branches: blender-v2.82-release
https://developer.blender.org/rBAff37747efcf9292da7169408f3f8299f37866041
PDT: Update Pivot Point on Move (bugfix)
Make sure Pivot Point is updated when moved.
===================================================================
M precision_drawing_tools/pdt_pivot_point.py
===================================================================
diff --git a/precision_drawing_tools/pdt_pivot_point.py b/precision_drawing_tools/pdt_pivot_point.py
index 2f137340..76721e91 100644
--- a/precision_drawing_tools/pdt_pivot_point.py
+++ b/precision_drawing_tools/pdt_pivot_point.py
@@ -245,6 +245,8 @@ class PDT_OT_PivotToCursor(Operator):
scene = context.scene
pg = scene.pdt_pg
+ old_cursor_loc = scene.cursor.location.copy()
+ scene.cursor.location = old_cursor_loc
pg.pivot_loc = scene.cursor.location
return {"FINISHED"}
@@ -359,8 +361,10 @@ class PDT_OT_PivotOrigin(Operator):
if obj is None:
self.report({"ERROR"}, PDT_ERR_NO_ACT_OBJ)
return {"FINISHED"}
+ old_cursor_loc = scene.cursor.location.copy()
obj_loc = obj.matrix_world.decompose()[0]
pg.pivot_loc = obj_loc
+ scene.cursor.location = old_cursor_loc
return {"FINISHED"}
More information about the Bf-extensions-cvs
mailing list