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:
Diffstat (limited to 'io_convert_image_to_mesh_img/mesh/terrain.py')
-rw-r--r--io_convert_image_to_mesh_img/mesh/terrain.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/io_convert_image_to_mesh_img/mesh/terrain.py b/io_convert_image_to_mesh_img/mesh/terrain.py
index 44d71675..3949d698 100644
--- a/io_convert_image_to_mesh_img/mesh/terrain.py
+++ b/io_convert_image_to_mesh_img/mesh/terrain.py
@@ -221,7 +221,7 @@ class BTerrain:
@staticmethod
def _center(obj):
"""Move object geometry to object origin"""
- bpy.context.scene.objects.active = obj
+ bpy.context.view_layer.objects.active = obj
bpy.ops.object.origin_set(center='BOUNDS')
@staticmethod