mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +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"
|
||||
) or []
|
||||
for shading_engine in shading_engines:
|
||||
name = (
|
||||
cmds.listConnections(shading_engine + ".surfaceShader")[0]
|
||||
+ "SG"
|
||||
materials = cmds.listConnections(
|
||||
shading_engine + ".surfaceShader",
|
||||
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:
|
||||
invalid.append(shading_engine)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue