OBJ exporter: list of objects to be exported

Hi all, I wanna ask sthg, for this blender instruction (bpy.ops.export_scene.obj) how can i exactly access the objects that are exported by this instruction? I checked (scene.objects.active) but it is not exactly showing identical results to what is exported by (bpy.ops.export_scene.obj). Can you please help?

By default all supported objects are exported: Mesh, Curves (Bezier and Nurbs), Surfaces and maybe metaball too.
For active objects, set use_selection to True.

Hi

In fact I already set “use selection” to True, the issue is confusing. I have objects lets say: A, B,C , I do hide rendering for 2 of them and render the other one so that I can export one object only at a time. Normally this makes what I want unless at some random rendering results I found 2 objects rendered in one scene at a time not 1. For example I generate with blender 20 objects scenes, I find 18/20 of them correctly having one object appearing at a time while the other objects are hidden, but in 2/20 of the generated images I find only 2 objects appearing instead of 1. PLS look at the attached image to understand.

Thats why I was thinking of how to check on the number of objects exported by the instruction (bpy.ops.export_scene.obj) to see if they are 1 or 2 at a time, but surprisingly i find that the the instruction (scene.objects.active) is showing only one object!! So I am not able to see why some times I found a second (“parasite”) object appearing in the image of exported objects despite the fact that it should have been hidden.

Any help?

Regards

@ankitm any further idea about my last issue? Thanks

This is unexpected. Please file a bug (using Help menu > Report a bug) with a simple blend file and a simple script that shows the issue.
The script should contain

  • some code that prints the names of objects that are active
  • some code that writes to OBJ files.