Skip extraction when no visible nodes found in frame range

This commit is contained in:
Roy Nieterau 2022-06-28 09:07:28 +02:00
parent a521c87838
commit 3b8b479712
2 changed files with 14 additions and 0 deletions

View file

@ -86,6 +86,13 @@ class ExtractAnimation(openpype.api.Extractor):
nodes = get_visible_in_frame_range(nodes,
start=start,
end=end)
if not nodes:
self.log.warning(
"No visible nodes found in frame range {}-{}. "
"Skipping extraction because `visibleOnly` is enabled on "
"the instance.".format(start, end)
)
return
with suspended_refresh():
with maintained_selection():

View file

@ -89,6 +89,13 @@ class ExtractAlembic(openpype.api.Extractor):
nodes = get_visible_in_frame_range(nodes,
start=start,
end=end)
if not nodes:
self.log.warning(
"No visible nodes found in frame range {}-{}. "
"Skipping extraction because `visibleOnly` is enabled on "
"the instance.".format(start, end)
)
return
with suspended_refresh():
with maintained_selection():