I’m separating objects in python. How can I properly access the object, that has been just separated? I could go for something like name convention (Plane -> Plane.001, Plane.002), but this would be so ugly. There must be another way! WHY DOESN’T the separate operator return the object it separated? That would be so much easier.
Here’s the code I had, just before I realised, that I am adding the wrong object to my list…
# here I select my faces/edges/vertices # (why do I need to do this in object mode?!? my code is full of toggles...) bpy.ops.object.editmode_toggle() bpy.ops.mesh.separate() #here I would like to append the newly created object I just separated... kids.append(bpy.context.active_object) bpy.ops.object.editmode_toggle()
Here’s the file: dreieck_2.blend (354 KB)