•  
  • Helping you upgrade your CG career

    Maya files convert Z-Up to Y-Up

    0
    votes
    Some of the maya files recieved by our layout team have a strange Z-Up world axis, and working on such files feels very wierd ! I searched for any tool which can change the world-Axis back to normal Y-Up, but didnot find any. Can anyone help me write such a tool please..
    asked 2 Years ago by
    Avatar image of CG Helpline user ludwig.grahn

    Sweden
    CGH Score : 7
    0 Comments :
    Add a Comment for this question
    Please Login or Register to add comment
    1 Answers :
    0
    votes

    Ya, perspective view does feel a bit wierd with the Z-Axis pointing up. This script will change Z-up to Y-up. Drag it to a shelf, or use it in a script job on file opening.

    def FixWorldAxis():
        wAxis = cmds.upAxis(q=True,axis=True)
        if wAxis != 'y':
            doFix = cmds.confirmDialog( title='Confirm', message='Clicking Yes will Change World-Up-Axis to Y - Are you sure?', button=['Yes','No'], defaultButton='Yes', cancelButton='No', dismissString='No' )
            if doFix == "Yes":
                cmds.upAxis( ax='y', rv=True )
                cmds.setAttr('persp.rotateX', 0.0)
                cmds.setAttr('persp.rotateY', 0.0)
                cmds.setAttr('persp.rotateZ', 0.0)
    
    FixWorldAxis()

    Hope that helps

     

    answered 2 Years ago by
    Avatar image of CG Helpline user aaachooo

    Cambridge, United Kingdom
    CGH Score : 142
    Expertise : Maya; Python; Maxscript;
    0 Comments :
    Add a Comment for this answer
    Please Login or Register to add comment

    Submit your Answer :




    SUBMIT

    Page rendered in 0.1226 seconds. Memory usage : 3.97MB.