pymel.core.system.saveFile() not in Maya 2011 pymel distro?

172 views
Skip to first unread message

hapgilmore

unread,
Apr 25, 2011, 6:33:53 PM4/25/11
to python_inside_maya
PyMel v1.0.0 docs document a saveFile() function, but it's not in Maya
2011's pymel. Is this a known issue, or am I missing something?

Interestingly enough:

pm.mel.file(save=True,force=True)

doesn't work...

In the meantime:

pm.mel.eval('file -save -force')

will have to suffice?

Amorano

unread,
Apr 27, 2011, 11:24:04 AM4/27/11
to python_inside_maya
Isn't it just:

pm.file(s=1, f=1)

I dont think you use the mel namespace for cmds in the core namespace.
Message has been deleted

Alyson Fair

unread,
Apr 27, 2011, 11:29:19 AM4/27/11
to python_in...@googlegroups.com

Please unsubscribe me from this email group. Thank you!

On Apr 27, 2011 10:27 AM, "Amorano" <amo...@gmail.com> wrote:
> Something wrong with google today. I could have sworn it said the
> message posted?!
>
> I think it is simply:
>
> pm.file(s=1, f=1)
>
> pymel.core are where the functions live.

>
> On Apr 25, 3:33 pm, hapgilmore <hapgilm...@hotmail.com> wrote:

hapgilmore

unread,
Apr 27, 2011, 12:10:56 PM4/27/11
to python_inside_maya
There is no file() function in pymel. All of the mel 'file' commands
have been replaced with commands like saveFile() openFile()
importFile() etc.

Read the docs for pymel.core.language.Mel. I have to use it all the
time when a mel command is broken or not implemented in the core
namespace. I don't like to use it, as it handles errors differently
and returns strings instead of pynodes.

Even worse is mel.eval() which I use as a last resort to bypass python/
pymel completely because something is really broken...like in this
case.

Paul Molodowitch

unread,
Apr 27, 2011, 9:21:18 PM4/27/11
to python_in...@googlegroups.com
It's correct that saveFile was mistakenly not in the version released in 2011; this has been fixed, and it is present in 2012.

However, there's still no need to go back to mel.eval - you can always just use cmds.file(save=1, force=1).

I'll look at why pm.mel.file(save=True,force=True) isn't working...

- Paul

Reply all
Reply to author
Forward
0 new messages