Home Technical Talk

Cant query an object in MEL?

Jedi
polycounter lvl 12
Offline / Send Message
Jedi polycounter lvl 12

Replies

  • rebb
    Options
    Offline / Send Message
    rebb polycounter lvl 17
    Are you supplying the actual name of the camera object to the MEL command you want to query it with ?

    In MEL the command setup is usually "melCommand <parameters> targetObjectName".

    For example "camera -q -hfv persp" seems to work just fine, as well as "xform -q -t pSphere1".
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Try :
    getAtt "pSphere1.translateX";
    
    But anyway, what rebb says is true, you must specify first the command, then the parameters and finally if you need it the name of the object you want to edit/query. It's not obligatory because if you have selected the object, maya will use it to do the command.

    [EDIT] Oups, sorry, bad reading of your post, geAttr is not what you want.

    [EDIT2]
    In this case, the following code is working well :
    camera -q -hfv persp;
    
  • Jedi
    Options
    Offline / Send Message
    Jedi polycounter lvl 12
Sign In or Register to comment.