2

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.

paragbhtngr
  • 137
  • 9

1 Answers1

3

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()
Chebhou
  • 19,533
  • 51
  • 98
  • the joined object doesn't show up in the scene though – paragbhtngr May 05 '16 at 01:39
  • I changed some of the code such that it works for me, based off of responses to this question

    http://blender.stackexchange.com/questions/13986/how-to-join-objects-with-python

    – paragbhtngr May 05 '16 at 01:51