Working on a batch exporter that is able to export different objects into different files at the same time (with one button). I am using cmds.file or mel.eval('FBXExport') to export the fbx files. I got trouble with exporting a specific object based on its name. Like no matter whether I select anything or how many objects I select, it only exports the object named 'cube'. Is there any way to achieve this goal?
The python code I used to export. They can only export my selected objects.
cmds.file(filepath, force = True, options = "v = 0", type = "FBX export", exportSelected = True)
mel.eval('FBXExport -f "%s" -s'%(filepath) )
When I used the code above to export, it exports all objects I selected, not the one named 'cube'.