def isNodeVisible(node):
'''
Simply return whether or not the node can be seen.
'''
if not mc.attributeQuery('visibility', node=node, exists=True):
return False
if not mc.getAttr(node+'.v'):
return False
if mc.attributeQuery('intermediateObject', node=node, exists=True):
if mc.getAttr(node+'.intermediateObject'):
return False
if not mc.getAttr(node+'.lodVisibility'):
return False
if mc.getAttr(node+'.overrideEnabled') and not mc.getAttr(node+'.overrideVisibility'):
return False
parent = mc.listRelatives(node, parent=True, pa=True)
if parent:
return isNodeVisible(parent[0])
return True
评论列表
文章目录