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 /mesh_auto_mirror.py | |
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 'mesh_auto_mirror.py')
-rw-r--r-- | mesh_auto_mirror.py | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/mesh_auto_mirror.py b/mesh_auto_mirror.py index c17838d5..68193c1a 100644 --- a/mesh_auto_mirror.py +++ b/mesh_auto_mirror.py @@ -49,14 +49,14 @@ class AlignVertices(Operator): auto_m = context.scene.auto_mirror bpy.ops.object.mode_set(mode='OBJECT') - x1, y1, z1 = bpy.context.scene.cursor_location + x1, y1, z1 = bpy.context.scene.cursor.location bpy.ops.view3d.snap_cursor_to_selected() - x2, y2, z2 = bpy.context.scene.cursor_location + x2, y2, z2 = bpy.context.scene.cursor.location - bpy.context.scene.cursor_location[0], \ - bpy.context.scene.cursor_location[1], \ - bpy.context.scene.cursor_location[2] = 0, 0, 0 + bpy.context.scene.cursor.location[0], \ + bpy.context.scene.cursor.location[1], \ + bpy.context.scene.cursor.location[2] = 0, 0, 0 # Vertices coordinate to 0 (local coordinate, so on the origin) for vert in bpy.context.object.data.vertices: @@ -69,10 +69,10 @@ class AlignVertices(Operator): axis = 2 vert.co[axis] = 0 - bpy.context.scene.cursor_location = x2, y2, z2 + bpy.context.scene.cursor.location = x2, y2, z2 bpy.ops.object.origin_set(type='ORIGIN_CURSOR') - bpy.context.scene.cursor_location = x1, y1, z1 + bpy.context.scene.cursor.location = x1, y1, z1 bpy.ops.object.mode_set(mode='EDIT') return {'FINISHED'} |