mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Refactor iter_visible_in_frame_range -> iter_visible_nodes_in_range
This commit is contained in:
parent
a99cc8f497
commit
19a5ed7be3
4 changed files with 7 additions and 7 deletions
|
|
@ -3224,7 +3224,7 @@ def maintained_time():
|
||||||
cmds.currentTime(ct, edit=True)
|
cmds.currentTime(ct, edit=True)
|
||||||
|
|
||||||
|
|
||||||
def iter_visible_in_frame_range(nodes, start, end):
|
def iter_visible_nodes_in_range(nodes, start, end):
|
||||||
"""Yield nodes that are visible in start-end frame range.
|
"""Yield nodes that are visible in start-end frame range.
|
||||||
|
|
||||||
- Ignores intermediateObjects completely.
|
- Ignores intermediateObjects completely.
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from openpype.hosts.maya.api.lib import (
|
||||||
extract_alembic,
|
extract_alembic,
|
||||||
suspended_refresh,
|
suspended_refresh,
|
||||||
maintained_selection,
|
maintained_selection,
|
||||||
iter_visible_in_frame_range
|
iter_visible_nodes_in_range
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -83,7 +83,7 @@ class ExtractAnimation(openpype.api.Extractor):
|
||||||
# flag does not filter out those that are only hidden on some
|
# flag does not filter out those that are only hidden on some
|
||||||
# frames as it counts "animated" or "connected" visibilities as
|
# frames as it counts "animated" or "connected" visibilities as
|
||||||
# if it's always visible.
|
# if it's always visible.
|
||||||
nodes = list(iter_visible_in_frame_range(nodes,
|
nodes = list(iter_visible_nodes_in_range(nodes,
|
||||||
start=start,
|
start=start,
|
||||||
end=end))
|
end=end))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ from openpype.hosts.maya.api.lib import (
|
||||||
extract_alembic,
|
extract_alembic,
|
||||||
suspended_refresh,
|
suspended_refresh,
|
||||||
maintained_selection,
|
maintained_selection,
|
||||||
iter_visible_in_frame_range
|
iter_visible_nodes_in_range
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -86,7 +86,7 @@ class ExtractAlembic(openpype.api.Extractor):
|
||||||
# flag does not filter out those that are only hidden on some
|
# flag does not filter out those that are only hidden on some
|
||||||
# frames as it counts "animated" or "connected" visibilities as
|
# frames as it counts "animated" or "connected" visibilities as
|
||||||
# if it's always visible.
|
# if it's always visible.
|
||||||
nodes = list(iter_visible_in_frame_range(nodes,
|
nodes = list(iter_visible_nodes_in_range(nodes,
|
||||||
start=start,
|
start=start,
|
||||||
end=end))
|
end=end))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
import pyblish.api
|
import pyblish.api
|
||||||
|
|
||||||
import openpype.api
|
import openpype.api
|
||||||
from openpype.hosts.maya.api.lib import iter_visible_in_frame_range
|
from openpype.hosts.maya.api.lib import iter_visible_nodes_in_range
|
||||||
import openpype.hosts.maya.api.action
|
import openpype.hosts.maya.api.action
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -40,7 +40,7 @@ class ValidateAlembicVisibleOnly(pyblish.api.InstancePlugin):
|
||||||
nodes = instance[:]
|
nodes = instance[:]
|
||||||
|
|
||||||
start, end = cls.get_frame_range(instance)
|
start, end = cls.get_frame_range(instance)
|
||||||
if not any(iter_visible_in_frame_range(nodes, start, end)):
|
if not any(iter_visible_nodes_in_range(nodes, start, end)):
|
||||||
# Return the nodes we have considered so the user can identify
|
# Return the nodes we have considered so the user can identify
|
||||||
# them with the select invalid action
|
# them with the select invalid action
|
||||||
return nodes
|
return nodes
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue