I have made a new shape, using a boolean modifier. I subtract 1 shape from another, then hide the shape I subtracted & I'm left with the new shape. However. I am left with 2 objects, 1 being hidden, instead if 1 new shape. I want to export the new shape. ???
You need to apply the modifier first. Then you will have 1 shape. To do so you can either click Apply on the right in the Properties Tab or if you want to use python you can use
bpy.ops.object.modifier_apply(apply_as='DATA', modifier='newTray'). But you need the object having the modifier selected for it to work.
tray.select = True should do the trick. After that you'll still have to delete the object you subtracted from the other one (in your case trayCutout). To use python it's
bpy.ops.object.delete(). Again, for it to work you need to select it first:
trayCutout.select = True and deselect the other one
tray.select = False.
So we have (if you want to delete trayCutout, otherwise you'll have to leave the last three lines out):
tray.select = True bpy.ops.object.modifier_apply(apply_as='DATA', modifier='newTray') trayCutout.select = True tray.select = False bpy.ops.object.delete()