Setting last previously opened file directory

16 views
Skip to first unread message

Wesley Chandler

unread,
Jun 5, 2014, 6:54:52 PM6/5/14
to python_in...@googlegroups.com
Hi All,

Please bear with me as I am new to python, coding, and to this group.  I hope I am in the right place to ask such a question.

I've made a UI that essentially runs a final command line to open a Maya file. 
cmds.file(sel_file_dir, force=True, open=True, typ="mayaAscii", options="v=0")

The only problem is, when I go to file -> save-as.  It does not open the default directory to the file that was opened but whatever my last use of the actual file -> open drop down menu.

I've poked around in the google docs and searched the interwebs and even asked my more experienced python buddy.  According to my buddy, it seems to be that Maya runs multiple fileDialog windows which some are accessible by scripting and others is at a OS level?  I am running Windows 7 on Maya 2013 if that makes a difference.

Any suggestions to point me in the right direction? =)

Much appreciated!
Wesley

Wesley Chandler

unread,
Jun 5, 2014, 7:06:19 PM6/5/14
to python_in...@googlegroups.com
Solved by my friend Kurian!

Thanks Kurian!

Just needed this line afterwards:
mel.eval('addRecentFile("%s", "mayaAscii' % sel_file_dir)
Reply all
Reply to author
Forward
0 new messages