mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 08:54:53 +01:00
improve the validator for gltf texture name
This commit is contained in:
parent
338660d42a
commit
24d7de450b
1 changed files with 9 additions and 3 deletions
|
|
@ -38,6 +38,9 @@ class ValidateGLTFTexturesNames(pyblish.api.InstancePlugin):
|
|||
|
||||
def process(self, instance):
|
||||
"""Process all the nodes in the instance"""
|
||||
pbs_shader = cmds.ls(type="StingrayPBS")
|
||||
if not pbs_shader:
|
||||
raise RuntimeError("No PBS Shader in the scene")
|
||||
invalid = self.get_texture_shader_invalid(instance)
|
||||
if invalid:
|
||||
raise RuntimeError("Non PBS material found in "
|
||||
|
|
@ -109,9 +112,12 @@ class ValidateGLTFTexturesNames(pyblish.api.InstancePlugin):
|
|||
|
||||
invalid = set()
|
||||
shading_grp = self.shader_selection(instance)
|
||||
for shader in shading_grp:
|
||||
if "StingrayPBS" not in shader:
|
||||
invalid.add(shader)
|
||||
for material in shading_grp:
|
||||
main_shader = cmds.listConnections(material,
|
||||
destination=True,
|
||||
type="StingrayPBS")
|
||||
if not main_shader:
|
||||
invalid.add(material)
|
||||
return list(invalid)
|
||||
|
||||
def shader_selection(self, instance):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue