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

08 August 2012, 05:34 PM

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


08 August 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.

08 August 2012, 07:36 PM

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.

08 August 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...

08 August 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 August 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.