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:
authorNBurn <7nburn@gmail.com>2019-01-29 17:08:23 +0300
committerNBurn <7nburn@gmail.com>2019-01-29 17:08:23 +0300
commit5c994fde52196dfe8a7e0db03b6935bac001d353 (patch)
treea7836a0741695b78df699e59a30f2a527202a815 /add_mesh_extra_objects/Wallfactory.py
parent8b93448f56ecdf9c91ad1b6297580eedf1f6e18f (diff)
addons: more view_layer syntax updates
Diffstat (limited to 'add_mesh_extra_objects/Wallfactory.py')
-rw-r--r--add_mesh_extra_objects/Wallfactory.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/add_mesh_extra_objects/Wallfactory.py b/add_mesh_extra_objects/Wallfactory.py
index f7edf659..1f36d884 100644
--- a/add_mesh_extra_objects/Wallfactory.py
+++ b/add_mesh_extra_objects/Wallfactory.py
@@ -865,8 +865,6 @@ class add_mesh_wallb(Operator):
# Make a mesh from a list of verts/edges/faces.
mesh.from_pydata(verts_array, [], faces_array)
- scene = context.scene
-
# Deselect all objects.
bpy.ops.object.select_all(action='DESELECT')
@@ -876,7 +874,7 @@ class add_mesh_wallb(Operator):
scene.objects.link(ob_new)
# leave this out to prevent 'Tab key" going into edit mode :)
# Use rmb click to select and still modify.
- scene.objects.active = ob_new
+ context.view_layer.objects.active = ob_new
ob_new.select_set(True)
ob_new.location = tuple(context.scene.cursor_location)