File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 3131<h1 >Requires</h1 >
3232<p >Blender 2.80 obviously, since this is the version that introduced collections.</p >
3333
34- <h1 >To do:</h1 >
35- <p >Automatically set output's object origin to 3D cursor.<p >
36-
3734<h1 >Credits</h1 >
3835<p >bmesh combine function taken from from https://github.com/nortikin/sverchok (GPL3 license)<p >
3936<p >Models used in gif:</p >
Original file line number Diff line number Diff line change @@ -103,6 +103,13 @@ def join_collection(context, recursive):
103103
104104 final_obj = bpy .data .objects .new (final_object_name , mesh_data )
105105 sel_collection .objects .link (final_obj )
106+
107+ #delect all and select constructed object
108+ for obj in bpy .context .scene .objects :
109+ obj .select_set (False )
106110 final_obj .select_set (True )
111+ bpy .context .view_layer .objects .active = final_obj
112+ #set origin to cursor
113+ bpy .ops .object .origin_set (type = 'ORIGIN_CURSOR' )
107114
108115 return True
You can’t perform that action at this time.
0 commit comments