2
$\begingroup$

In my scene, I have multiple objects with the following names:

Verts
Verts.001
Verts.002
Verts.003
Verts.004

I want to combine all of these objects into one mesh which I can then export out as an stl. For what it's worth, the objects are just point clouds, with no face or edge information.

$\endgroup$

1 Answer 1

3
$\begingroup$

You can use the startswith() function to select all the objects that stqrts with Verts and join them into one object :

import bpy

bpy.ops.object.select_all(action='DESELECT')
objects = bpy.context.scene.objects
for o in objects:
    if obj.name.startswith("Verts") :
        obj.select = True
bpy.ops.object.join()
$\endgroup$
2
  • $\begingroup$ the joined object doesn't show up in the scene though $\endgroup$ Commented May 5, 2016 at 1:39
  • $\begingroup$ I changed some of the code such that it works for me, based off of responses to this question blender.stackexchange.com/questions/13986/… $\endgroup$ Commented May 5, 2016 at 1:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .