I’m working on an addon where I’d like to add the ability to export a mesh to OBJ. Until now, I’ve been relying on the operator bpy.ops.export_scene.obj()
. I’ve been trying to ensure that only the object I want to export is selected before calling the operator. However, this gets tricky when there are multiple objects that need to be exported.
Is there a way to use Python to export one specific scene object to OBJ by passing the object ID/Name?