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 /ant_landscape
parent8b93448f56ecdf9c91ad1b6297580eedf1f6e18f (diff)
addons: more view_layer syntax updates
Diffstat (limited to 'ant_landscape')
-rw-r--r--ant_landscape/ant_functions.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ant_landscape/ant_functions.py b/ant_landscape/ant_functions.py
index a20d2ff1..3f2c6103 100644
--- a/ant_landscape/ant_functions.py
+++ b/ant_landscape/ant_functions.py
@@ -205,7 +205,7 @@ class AntLandscapeRegenerate(bpy.types.Operator):
undo = bpy.context.preferences.edit.use_global_undo
bpy.context.preferences.edit.use_global_undo = False
- scene = bpy.context.scene
+ view_layer = bpy.context.view_layer
# ant object items
obj = bpy.context.active_object
@@ -321,12 +321,12 @@ class AntLandscapeRegenerate(bpy.types.Operator):
new_ob.select_set(False)
obj.select_set(True)
- scene.objects.active = obj
+ view_layer.objects.active = obj
bpy.ops.object.delete(use_global=False)
# Select landscape and make active
new_ob.select_set(True)
- scene.objects.active = new_ob
+ view_layer.objects.active = new_ob
# restore pre operator undo state
context.preferences.edit.use_global_undo = undo