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 /light_field_tools
parent8b93448f56ecdf9c91ad1b6297580eedf1f6e18f (diff)
addons: more view_layer syntax updates
Diffstat (limited to 'light_field_tools')
-rw-r--r--light_field_tools/light_field_tools.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/light_field_tools/light_field_tools.py b/light_field_tools/light_field_tools.py
index f49a54f7..d46dec02 100644
--- a/light_field_tools/light_field_tools.py
+++ b/light_field_tools/light_field_tools.py
@@ -320,6 +320,7 @@ class OBJECT_OT_create_lightfield_basemesh(Operator):
def addMeshObj(self, mesh):
scene = bpy.context.scene
+ view_layer = bpy.context.view_layer
for o in scene.objects:
o.select_set(False)
@@ -329,8 +330,8 @@ class OBJECT_OT_create_lightfield_basemesh(Operator):
scene.objects.link(nobj)
nobj.select_set(True)
- if scene.objects.active is None or scene.objects.active.mode == 'OBJECT':
- scene.objects.active = nobj
+ if view_layer.objects.active is None or view_layer.objects.active.mode == 'OBJECT':
+ view_layer.objects.active = nobj
def execute(self, context):
scene = context.scene