From 3b8b479712af6e95545539921f0439de547c460b Mon Sep 17 00:00:00 2001 From: Roy Nieterau Date: Tue, 28 Jun 2022 09:07:28 +0200 Subject: [PATCH] Skip extraction when no visible nodes found in frame range --- openpype/hosts/maya/plugins/publish/extract_animation.py | 7 +++++++ openpype/hosts/maya/plugins/publish/extract_pointcache.py | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/openpype/hosts/maya/plugins/publish/extract_animation.py b/openpype/hosts/maya/plugins/publish/extract_animation.py index b04e2bf0c4..4b650b4b26 100644 --- a/openpype/hosts/maya/plugins/publish/extract_animation.py +++ b/openpype/hosts/maya/plugins/publish/extract_animation.py @@ -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(): diff --git a/openpype/hosts/maya/plugins/publish/extract_pointcache.py b/openpype/hosts/maya/plugins/publish/extract_pointcache.py index f582a106d9..768ee6da3d 100644 --- a/openpype/hosts/maya/plugins/publish/extract_pointcache.py +++ b/openpype/hosts/maya/plugins/publish/extract_pointcache.py @@ -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():