import maya.cmds as cmds
# dag flag is used to find everything below (like shapes)
# so we specify we want only tansform nodes
sel = cmds.ls(sl = True, dag=True, type='transform')
for i in sel:
# we create a string attr for the current object 'i' because we will
# use it multiple times
attr = '{0}.backfaceCulling'.format(i)
# We check if this transform node has an attribute backfaceCulling
if cmds.ls(attr):
# if yes, let's set the Attr
cmds.setAttr(attr, 0)
编辑-多个属性的一个示例:
^{pr2}$相关问题 更多 >
编程相关推荐