mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 16:34:53 +01:00
Merge pull request #301 from BigRoy/maya/validate_look_shading_engine
Maya: Validate Look Shading Group ignore if no material
This commit is contained in:
commit
170bd5d27d
1 changed files with 11 additions and 3 deletions
|
|
@ -47,10 +47,18 @@ class ValidateShadingEngine(pyblish.api.InstancePlugin,
|
||||||
shape, destination=True, type="shadingEngine"
|
shape, destination=True, type="shadingEngine"
|
||||||
) or []
|
) or []
|
||||||
for shading_engine in shading_engines:
|
for shading_engine in shading_engines:
|
||||||
name = (
|
materials = cmds.listConnections(
|
||||||
cmds.listConnections(shading_engine + ".surfaceShader")[0]
|
shading_engine + ".surfaceShader",
|
||||||
+ "SG"
|
source=True, destination=False
|
||||||
)
|
)
|
||||||
|
if not materials:
|
||||||
|
cls.log.warning(
|
||||||
|
"Shading engine '{}' has no material connected to its "
|
||||||
|
".surfaceShader attribute.".format(shading_engine))
|
||||||
|
continue
|
||||||
|
|
||||||
|
material = materials[0] # there should only ever be one input
|
||||||
|
name = material + "SG"
|
||||||
if shading_engine != name:
|
if shading_engine != name:
|
||||||
invalid.append(shading_engine)
|
invalid.append(shading_engine)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue