PDA

View Full Version : [Python] List of imported files in scene?


TDgirl
08-14-2012, 05:34 PM
Hi,

I was wondering if there's a way to get a list of imported files in a Maya scene (in Python)?

Thanks!!!

NaughtyNathan
08-14-2012, 07:18 PM
what do you mean by "imported"? If you just use the import... command I don't think Maya keeps any record, it just creates nodes based on the imported file(s).
The file command has a list flag though so you could always try that.

TDgirl
08-14-2012, 07:36 PM
Nathan,

Thanks for the quick reply!!

By import, I mean:
cmds.file(fileName, i=True)


I also think that Maya doesn't keep record of this :( I was hoping it did as it does with references...


I tried the list flag, but it only listed texture files.

NaughtyNathan
08-14-2012, 07:38 PM
ok, then I guess it doesn't, but if you are in control of this with a command you could always return the nodes created by the import and make a record of them yourself...

TDgirl
08-14-2012, 07:41 PM
I'm thinking about using the namespace flag of the file command to help me keep track.

Thank you :)

CGTalk Moderation
08-14-2012, 07: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.