can't batch export fbx

Discussions concerning programming of SOFTIMAGE©
Manticor
Posts: 160
Joined: 09 Jun 2011, 20:41

can't batch export fbx

Post by Manticor » 14 Apr 2014, 15:58

Hi. I can't seem to export separate fbx files from looping the current selection. Even if I duplicate to another collection and loop over that it still stops after the first export.
This is in a scripted plugin in python.

Any help would be appreciated

Thanks

User avatar
csaez
Posts: 253
Joined: 09 Jul 2012, 13:31
Skype: csaezmargotta
Location: Sydney, Australia

Re: can't batch export fbx

Post by csaez » 14 Apr 2014, 23:11

I'm not in front of softimage but it seems like you're looping through the selection and the exporter is changing it. Try to convert the selection to a tuple before the loop and see how it goes.

Code: Select all

for x in tuple(Application.Selection):
    # export code
    pass
Does it make any sense?

Manticor
Posts: 160
Joined: 09 Jun 2011, 20:41

Re: can't batch export fbx

Post by Manticor » 15 Apr 2014, 07:45

That worked a charm.

Thank you very much for the quick help.

Kenny