diff options
author | Alan Odom <clockmender@icloud.com> | 2020-01-30 17:26:10 +0300 |
---|---|---|
committer | Rune Morling <ermo.blender.org@spammesenseless.net> | 2020-02-01 18:43:25 +0300 |
commit | ff37747efcf9292da7169408f3f8299f37866041 (patch) | |
tree | 056c8c34d0b540e316b34d18320a83ccf6386872 /precision_drawing_tools | |
parent | 88b2feac55656443c3b47a7d55751c4dfe581c52 (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.py | 4 |
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"} |