Maya cmds pymel 单位和轴向设置

import maya.cmds as cmds

# 1. to make the Y-axis of the world to be the up axis:
cmds.upAxis( ax='y' ) # 2. to make the Z-axis of the world to be the up axis,
# and rotate the view:
cmds.upAxis( ax='z', rv=True ) # 3. to query which axis is the current up axis
# (returns a string: a "y" or a "z"):
cmds.upAxis( q=True, axis=True )
###############################################################################
# What is the current linear unit?
cmds.currentUnit( query=True, linear=True ) # What is the current angular unit in its long name form?
cmds.currentUnit( fullName=True, query=True, angle=True ) # Change the current time unit to ntsc
cmds.currentUnit( time='ntsc' ) # Change the current linear unit to inches
cmds.currentUnit( linear='cm' ) #[mm | millimeter | cm | centimeter | m | meter | km | kilometer | in | inch | ft | foot | yd | yard | mi | mile] 
05-04 05:08