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 'materials_utils')
-rw-r--r--materials_utils/__init__.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/materials_utils/__init__.py b/materials_utils/__init__.py
index 8e6bf0d2..8c606742 100644
--- a/materials_utils/__init__.py
+++ b/materials_utils/__init__.py
@@ -592,7 +592,7 @@ def assign_mat(matname="Default", operator=None):
me.update()
# restore the active object
- bpy.context.scene.objects.active = actob
+ bpy.context.view_layer.objects.active = actob
# restore selection state
actob.select = selected