mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-26 05:42:15 +01:00
Optimize logic
This commit is contained in:
parent
d214f51dc5
commit
248265d5eb
1 changed files with 1 additions and 6 deletions
|
|
@ -26,15 +26,10 @@ def has_shape_children(node):
|
|||
return False
|
||||
|
||||
# Check if there are any shapes at all
|
||||
shapes = cmds.ls(allDescendents, shapes=True)
|
||||
shapes = cmds.ls(allDescendents, shapes=True, noIntermediate=True)
|
||||
if not shapes:
|
||||
return False
|
||||
|
||||
# Check if all descendent shapes are intermediateObjects;
|
||||
# if so we consider this node a null node and return False.
|
||||
if all(cmds.getAttr('{0}.intermediateObject'.format(x)) for x in shapes):
|
||||
return False
|
||||
|
||||
return True
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue