[Python] How can I use a variable for my skipTranslate argument within my parentConstraint...

Discussão em 'Python' iniciado por Stack, Fevereiro 11, 2025.

  1. Stack

    Stack Membro Participativo

    I am trying to use a variable for my skipTranslate argument in my parentConstraint command in Maya. What I want is for "x" to be inserted into the skipTranslate argument by my variable "test"....

    test='"x"'
    cmds.parentConstraint ('pCube1','locator1',st=[test])


    This does not work though as I get a Runtime Error stating that the argument is invalid as the argument must be x, y or z.

    If I write in "x" myself to the arg it works, but I need to have it be filled in by a variable for the larger tool to work...is there a way to do this?

    I am very new and teaching myself so I appreciate any help. Thank you

    Continue reading...

Compartilhe esta Página