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:
authorCampbell Barton <ideasman42@gmail.com>2019-03-01 04:49:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-03-01 04:51:10 +0300
commit9999dada60a64eb27b37c4d711f4c3979888253e (patch)
treeb325eb58ec754c883683696683933fc9d368eb0d /add_curve_extra_objects
parentdd0dffef42ae64d1bf16e879e3f1470ce3bf5cad (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 'add_curve_extra_objects')
-rw-r--r--add_curve_extra_objects/add_curve_spirofit_bouncespline.py6
-rw-r--r--add_curve_extra_objects/add_curve_torus_knots.py2
-rw-r--r--add_curve_extra_objects/add_surface_plane_cone.py8
3 files changed, 8 insertions, 8 deletions
diff --git a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
index 2b7ed914..b220157c 100644
--- a/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
+++ b/add_curve_extra_objects/add_curve_spirofit_bouncespline.py
@@ -926,10 +926,10 @@ def move_origin_to_start():
start = active.matrix_world @ spline.points[0].co
start = start[:-1]
- cursor = bpy.context.scene.cursor_location.copy()
- bpy.context.scene.cursor_location = start
+ cursor = bpy.context.scene.cursor.location.copy()
+ bpy.context.scene.cursor.location = start
bpy.ops.object.origin_set(type='ORIGIN_CURSOR')
- bpy.context.scene.cursor_location = cursor
+ bpy.context.scene.cursor.location = cursor
def draw_spline_settings(self):
diff --git a/add_curve_extra_objects/add_curve_torus_knots.py b/add_curve_extra_objects/add_curve_torus_knots.py
index 30d19b58..8352ecfa 100644
--- a/add_curve_extra_objects/add_curve_torus_knots.py
+++ b/add_curve_extra_objects/add_curve_torus_knots.py
@@ -148,7 +148,7 @@ def align_matrix(self, context):
if self.absolute_location:
loc = Matrix.Translation(Vector((0, 0, 0)))
else:
- loc = Matrix.Translation(context.scene.cursor_location)
+ loc = Matrix.Translation(context.scene.cursor.location)
# user defined location & translation
userLoc = Matrix.Translation(self.location)
diff --git a/add_curve_extra_objects/add_surface_plane_cone.py b/add_curve_extra_objects/add_surface_plane_cone.py
index 94889f5b..2cd148d6 100644
--- a/add_curve_extra_objects/add_surface_plane_cone.py
+++ b/add_curve_extra_objects/add_surface_plane_cone.py
@@ -123,7 +123,7 @@ class MakeSurfaceWedge(Operator, MakeSurfaceHelpers):
# change name
context.active_object.name = 'SurfaceWedge'
# get the wedge to the 3d cursor.
- context.active_object.location = context.scene.cursor_location
+ context.active_object.location = context.scene.cursor.location
bpy.ops.transform.resize(value=(size, size, size))
# adjust resolution in u and v direction
@@ -186,7 +186,7 @@ class MakeSurfaceCone(Operator, MakeSurfaceHelpers):
bpy.ops.object.editmode_toggle()
# bring object to cursor
bpy.ops.object.mode_set(mode='OBJECT')
- context.active_object.location = context.scene.cursor_location
+ context.active_object.location = context.scene.cursor.location
# adjust size
bpy.ops.transform.resize(value=(size, size, size))
@@ -266,7 +266,7 @@ class MakeSurfaceStar(Operator, MakeSurfaceHelpers):
# origin to geometry
bpy.ops.object.origin_set(type='ORIGIN_GEOMETRY', center='MEDIAN')
# get object to 3d cursor
- context.active_object.location = context.scene.cursor_location
+ context.active_object.location = context.scene.cursor.location
# change name
ao.name = 'SurfaceStar'
# adjust size
@@ -334,7 +334,7 @@ class MakeSurfacePlane(Operator, MakeSurfaceHelpers):
# bring object to 3d cursor
bpy.ops.object.mode_set(mode='OBJECT')
- context.active_object.location = context.scene.cursor_location
+ context.active_object.location = context.scene.cursor.location
bpy.ops.transform.resize(value=(size, size, size))
# adjust resolution in u and v direction