PDA

View Full Version : returning imported objects as a string


fred22
10-19-2005, 01:34 AM
Can I list imported objects after they have been imported?

I have two problems, if I import a file it is given a name space, so assigning the same string variable as the file name does not work.

I am importing files and then need to manipulate the nodes when imported....

Help.

twidup
10-19-2005, 03:44 PM
off the top of my head, the way I would approach this is to write a script that would handle the import as well as this part.

Basically, step 1 would be to build an array of all the items in the current scene

step 2, use a fileDialogBrowser to locate the file to import and then import it

step 3, create another array of all the items in the scene now

step 4, use stringArrayRemove and remove the items from step 1 from the array created in step 3, and that is what all is now in the scene.

There might be an easier way, but I cant think of it right this minute.

-todd

fred22
10-20-2005, 04:34 AM
A scene with over 1000 objects which is what I will be dealing with would shut down maya having that many array elements.

twidup
10-20-2005, 02:41 PM
I just ran a test here on a shot with 2200+ objects

there was nothing slow about it. I added a couple elements, and rant eh stringArrayRemove, and had my results a couple of seconds later.

CGTalk Moderation
10-20-2005, 02:41 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.