mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Remove validate_namespace_empty because it doesn't matter if a work model scene has empty namespaces at all, they will never be extracted anyway since it doesn't contain any meshes anyway.
This commit is contained in:
parent
cb0b2611a2
commit
46d007c59a
1 changed files with 0 additions and 39 deletions
|
|
@ -1,39 +0,0 @@
|
|||
from maya import cmds
|
||||
|
||||
import pyblish.api
|
||||
import colorbleed.api
|
||||
|
||||
|
||||
class ValidateNamespaceEmpty(pyblish.api.ContextPlugin):
|
||||
"""Validate there are no empty namespaces in the scene.
|
||||
|
||||
This is a scene wide validation that filters out "UI" and "shared"
|
||||
namespaces that exist by default in Maya and are mostly hidden.
|
||||
|
||||
A namespace that has other namespaces in it is *not* considered empty.
|
||||
Only those that have no children namespaces or nodes is considered empty.
|
||||
|
||||
"""
|
||||
|
||||
order = colorbleed.api.ValidateSceneOrder
|
||||
hosts = ["maya"]
|
||||
families = ["colorbleed.model"]
|
||||
label = "No Empty Namespaces"
|
||||
|
||||
def process(self, context):
|
||||
"""Process the Context"""
|
||||
all_namespaces = cmds.namespaceInfo(":",
|
||||
listOnlyNamespaces=True,
|
||||
recurse=True)
|
||||
non_internal_namespaces = [ns for ns in all_namespaces
|
||||
if ns not in ["UI", "shared"]]
|
||||
|
||||
invalid = []
|
||||
for namespace in non_internal_namespaces:
|
||||
namespace_content = cmds.namespaceInfo(namespace,
|
||||
listNamespace=True,
|
||||
recurse=True)
|
||||
if not namespace_content:
|
||||
invalid.append(namespace)
|
||||
|
||||
assert not invalid, ("Empty namespaces found: {0}".format(invalid))
|
||||
Loading…
Add table
Add a link
Reference in a new issue