Fix iterator

This commit is contained in:
Roy Nieterau 2022-06-28 21:30:22 +02:00
parent a29d1d4932
commit a99cc8f497

View file

@ -3272,11 +3272,12 @@ def iter_visible_in_frame_range(nodes, start, end):
cmds.currentTime(start)
visible = cmds.ls(nodes, long=True, visible=True)
for node in visible:
yield node
if len(visible) == len(nodes) or start == end:
# All are visible on frame one, so they are at least visible once
# inside the frame range.
for node in visible:
yield node
return
# For the invisible ones check whether its visibility and/or
# any of its parents visibility attributes are animated. If so, it might