Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Odom <clockmender@icloud.com>2020-01-30 17:26:10 +0300
committerRune Morling <ermo.blender.org@spammesenseless.net>2020-02-01 18:43:25 +0300
commitff37747efcf9292da7169408f3f8299f37866041 (patch)
tree056c8c34d0b540e316b34d18320a83ccf6386872 /precision_drawing_tools
parent88b2feac55656443c3b47a7d55751c4dfe581c52 (diff)
PDT: Update Pivot Point on Move (bugfix)
Make sure Pivot Point is updated when moved.
Diffstat (limited to 'precision_drawing_tools')
-rw-r--r--precision_drawing_tools/pdt_pivot_point.py4
1 files changed, 4 insertions, 0 deletions
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"}