LC #42 Pipers Alley

View Full Version : MEL: Return File Path of imported File

11-24-2011, 05:20 PM

I have a similar problem than this:

My problem: I want to import a file into maya by drag and drop. If i do so, the file is not related to the original file. So when i want to save the file, i have to "save as" and select the file in the filebrowser again to save over it. So my solotion whould be, just to find the source path of the imported file. The importer even give the filepath back as "result:" in the Script Editor.

Is there a possibility to grab that path and reference maya to that path again so that it is possible to just save, without first to save as the file?

Best regards and thanks, Chaos

12-01-2011, 10:33 AM
cheers! no idea? not possible? just that i can check this ;-)

12-01-2011, 11:44 AM
You could query the undo queue for and then look for the file name that way..

undoInfo -q -pq;

Judging from the thread you posted, it looks like the only way your going to get any changes out of the way Maya interprets dragging and dropping files into Maya is to send a feature request to Autodesk. As it sounds like your wanting to open files rather than import them.

12-02-2011, 03:14 PM
thanks for the hint!

At least in Maya2009 the undoInfo doesn't recognize the import/open event. The import/open seams to be not undoable.

CGTalk Moderation
12-02-2011, 03:14 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.