3.10 - Maya Commands: ls

import maya.cmds as cmds
cmds.ls(transforms = True)
cmds.ls(shapes = True)
cmds.ls(cameras = True)
cmds.ls(sl = True)

selection = cmds.ls(sl = True)

for sel in selection:
    cmds.setAttr("{0}.v".format(sel), False)
    
print(cmds.ls(sl=True, showType = True))  #[u'pCylinder1', u'transform', u'pSphereShape1', u'mesh']


cmds.ls(type="mesh")
cmds.ls(type="transform")
cmds.ls(transforms=True) # this sentence is equal to the above one

cmds.ls(references=True)

cmds.ls(assemblies=True)  # the top level objects

cmds.ls("persp")

cmds.ls("p*", transforms = True)

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/seamanj/article/details/49900417
个人分类: maya python
上一篇3.9.3 - Sorting Lists
下一篇3.11 - Dictionaries in Python
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭