1. 程式人生 > >Maya Transfrom屬性(通道盒)開啟和關閉

Maya Transfrom屬性(通道盒)開啟和關閉

// An highlighted block
#鎖定並隱藏通道盒
import maya.cmds as mc;
sel=mc.ls(sl=True);
transfrom=['.tx', '.ty', '.tz', '.rx', '.ry', '.rz', '.sx', '.sy', '.sz', '.v', ];
for a in transfrom:
    mc.setAttr(sel[0]+a,lock=True, keyable=False, channelBox=False );

#鎖定通道盒
import maya.cmds as mc;
sel=mc.ls(sl=True)
; transfrom=['.tx', '.ty', '.tz', '.rx', '.ry', '.rz', '.sx', '.sy', '.sz', '.v', ]; for a in transfrom: mc.setAttr(sel[0]+a,lock=True); #開啟通道盒 import maya.cmds as mc; sel=mc.ls(sl=True); transfrom=['.tx', '.ty', '.tz', '.rx', '.ry', '.rz', '.sx', '.sy', '.sz', '.v', ]; for a in transfrom: mc.
setAttr(sel[0]+a,lock=False, keyable=True, channelBox=True )