diff options
author | NBurn <7nburn@gmail.com> | 2019-01-29 04:04:35 +0300 |
---|---|---|
committer | NBurn <7nburn@gmail.com> | 2019-01-29 04:04:35 +0300 |
commit | edd2de62eb13284f7e02256701fec1483973018d (patch) | |
tree | 02a6ab0c10b9131e346d2e55b36bfd14873fafa3 /render_povray | |
parent | bdc109a5309b26c718a3ae0ca6f2393c731fde0d (diff) |
addons: view_layer.objects.active syntax update
Diffstat (limited to 'render_povray')
-rw-r--r-- | render_povray/primitives.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/render_povray/primitives.py b/render_povray/primitives.py index 45fcae37..e5ea3a96 100644 --- a/render_povray/primitives.py +++ b/render_povray/primitives.py @@ -73,7 +73,7 @@ class POVRAY_OT_lathe_add(bpy.types.Operator): rotation=(0, 0, 0), layers=layers, ) - ob = context.scene.objects.active + ob = context.view_layer.objects.active ob_data = ob.data ob.name = ob_data.name = "PovLathe" ob_data.dimensions = '2D' @@ -1073,7 +1073,7 @@ class POVRAY_OT_rainbow_add(bpy.types.Operator): ob.location = -cam.location #refocus on the actual rainbow - bpy.context.scene.objects.active = ob + bpy.context.view_layer.objects.active = ob ob.select_set(True) return {'FINISHED'} |