diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-03-01 04:49:17 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-03-01 04:51:10 +0300 |
commit | 9999dada60a64eb27b37c4d711f4c3979888253e (patch) | |
tree | b325eb58ec754c883683696683933fc9d368eb0d /space_view3d_pie_menus | |
parent | dd0dffef42ae64d1bf16e879e3f1470ce3bf5cad (diff) |
Update for API change: scene.cursor_location -> scene.cursor.location
Note that some scripts still used the 3D view cursor which has been
removed for a while.
Diffstat (limited to 'space_view3d_pie_menus')
-rw-r--r-- | space_view3d_pie_menus/pie_cursor.py | 2 | ||||
-rw-r--r-- | space_view3d_pie_menus/pie_origin.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/space_view3d_pie_menus/pie_cursor.py b/space_view3d_pie_menus/pie_cursor.py index 337c0c12..05550eb3 100644 --- a/space_view3d_pie_menus/pie_cursor.py +++ b/space_view3d_pie_menus/pie_cursor.py @@ -49,7 +49,7 @@ class Snap_CursSelToCenter1(Operator): return (context.area.type == "VIEW_3D" and context.mode == "OBJECT") def execute(self, context): - context.space_data.cursor_location = (0, 0, 0) + context.scene.cursor.location = (0, 0, 0) for obj in context.selected_objects: obj.location = (0, 0, 0) diff --git a/space_view3d_pie_menus/pie_origin.py b/space_view3d_pie_menus/pie_origin.py index 58f22d41..12e477f4 100644 --- a/space_view3d_pie_menus/pie_origin.py +++ b/space_view3d_pie_menus/pie_origin.py @@ -49,11 +49,11 @@ class PivotToSelection(Operator): return context.active_object is not None def execute(self, context): - saved_location = context.scene.cursor_location.copy() + saved_location = context.scene.cursor.location.copy() bpy.ops.view3d.snap_cursor_to_selected() bpy.ops.object.mode_set(mode='OBJECT') bpy.ops.object.origin_set(type='ORIGIN_CURSOR') - context.scene.cursor_location = saved_location + context.scene.cursor.location = saved_location return {'FINISHED'} |