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 'add_advanced_objects_menu/make_struts.py')
-rw-r--r--add_advanced_objects_menu/make_struts.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/add_advanced_objects_menu/make_struts.py b/add_advanced_objects_menu/make_struts.py
index b88c478d..57cede0a 100644
--- a/add_advanced_objects_menu/make_struts.py
+++ b/add_advanced_objects_menu/make_struts.py
@@ -420,7 +420,7 @@ def build_edge_frames(edges):
def make_manifold_struts(truss_obj, od, segments):
- bpy.context.scene.objects.active = truss_obj
+ bpy.context.view_layer.objects.active = truss_obj
bpy.ops.object.editmode_toggle()
truss_mesh = bmesh.from_edit_mesh(truss_obj.data).copy()
bpy.ops.object.editmode_toggle()
@@ -494,7 +494,7 @@ def create_struts(self, context, ind, od, segments, solid, loops, manifold):
bpy.context.scene.objects.link(obj)
obj.select_set(True)
obj.location = truss_obj.location
- bpy.context.scene.objects.active = obj
+ bpy.context.view_layer.objects.active = obj
mesh.update()