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 /render_povray
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 'render_povray')
-rw-r--r--render_povray/primitives.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/render_povray/primitives.py b/render_povray/primitives.py
index da7105bf..ffdd6cd9 100644
--- a/render_povray/primitives.py
+++ b/render_povray/primitives.py
@@ -69,7 +69,7 @@ class POVRAY_OT_lathe_add(bpy.types.Operator):
layers=[False]*20
layers[0]=True
bpy.ops.curve.primitive_bezier_curve_add(
- location=context.scene.cursor_location,
+ location=context.scene.cursor.location,
rotation=(0, 0, 0),
layers=layers,
)
@@ -634,7 +634,7 @@ class POVRAY_OT_box_add(bpy.types.Operator):
def pov_cylinder_define(context, op, ob, radius, loc, loc_cap):
if op:
R = op.R
- loc = bpy.context.scene.cursor_location
+ loc = bpy.context.scene.cursor.location
loc_cap[0] = loc[0]
loc_cap[1] = loc[1]
loc_cap[2] = (loc[2]+2)
@@ -697,7 +697,7 @@ class POVRAY_OT_cylinder_add(bpy.types.Operator):
LOC_CAP = ob.pov.imported_cyl_loc_cap
else:
if not props.imported_cyl_loc:
- LOC_CAP = LOC = bpy.context.scene.cursor_location
+ LOC_CAP = LOC = bpy.context.scene.cursor.location
LOC_CAP[2] += 2.0
else:
LOC = props.imported_cyl_loc
@@ -738,7 +738,7 @@ class POVRAY_OT_cylinder_update(bpy.types.Operator):
def pov_sphere_define(context, op, ob, loc):
if op:
R = op.R
- loc = bpy.context.scene.cursor_location
+ loc = bpy.context.scene.cursor.location
else:
assert(ob)
R = ob.pov.sphere_radius
@@ -799,7 +799,7 @@ class POVRAY_OT_sphere_add(bpy.types.Operator):
LOC = ob.pov.imported_loc
else:
if not props.imported_loc:
- LOC = bpy.context.scene.cursor_location
+ LOC = bpy.context.scene.cursor.location
else:
LOC = props.imported_loc
@@ -1327,7 +1327,7 @@ def pov_parametric_define(context, op, ob):
obrot = ob.rotation_euler # In radians
#Parametric addon has no loc rot, some extra work is needed
#in case cursor has moved
- curloc = bpy.context.scene.cursor_location
+ curloc = bpy.context.scene.cursor.location
bpy.ops.object.mode_set(mode="EDIT")