Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions client/ayon_maya/plugins/publish/validate_unknown_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ def _is_workfile_extension_align_with_extension_mapping(self, context) -> bool:

Args:
context (pyblish.api.Context): The publish context.

Returns:
Comment thread
Copilot marked this conversation as resolved.
bool: True if the workfile extension is aligned with the extension
mapping, False otherwise.
"""
maya_settings = context.data["project_settings"]["maya"]
ext_mapping = {
Expand All @@ -62,7 +66,7 @@ def _is_workfile_extension_align_with_extension_mapping(self, context) -> bool:
}
current_file = context.data["currentFile"]
if not current_file:
# Unsaved file
# Unsaved file: do not block validation
return True
workfile_extension = os.path.splitext(current_file)[-1].strip(".")
for instance in context:
Expand Down Expand Up @@ -91,7 +95,7 @@ def process(self, context):
if not self.is_active(context.data):
return

if self._is_workfile_extension_align_with_extension_mapping(context):
if not self._is_workfile_extension_align_with_extension_mapping(context):
self.log.warning(
"Workfile extension is not aligned with the extension mapping."
" Skipping unknown nodes validation to prevent false"
Expand Down
Loading