Hey Viktoras,

in my program - by the time the mel executes, it has to be a valid mel
command. Worse, I am displaying the commands to the user - so I must run a
check first on the list of commands before displaying them.
Why would a command not have an undo? What about error handling for commands
with no undo ?





Dean:

if mm.eval('exists("&s");' % cmd) is 0:

works great except when confronted with an object that doesnt exist in the
scene :/
if this throws up a known error type i could handle it, but it throws
          // Error: line 1: No object matches name: PUP1:root_ctrl.extraRotY
//



On Thu, Sep 3, 2009 at 6:19 PM, viktoras <[email protected]> wrote:

>
> Taylor Carrasco wrote:
> > This is a pretty cool solution!
> >
> > The only problem I get, is a barrage of the following error everytime
> > I run it from a fresh Maya. I am parsing a command list (nothing too
> > harsh, just simply Mel statements recorded earlier. But with a fresh
> > maya, it seems I always get the following error running the following
> > solution - - -
> >
> > # File "<maya console>", line 4, in <module>
> > #   File "<maya console>", line 11, in validateMelCommand
> > # RuntimeError: There are no more commands to undo.
> >
> that's what i told, if whatever MEL code you're validating doesn't
> create an undo entry (or create multiple ones), the proposed solution is
> wrong.
> why not just run whatever mel you've got, and handle errors as they occur?
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---

Reply via email to