Query shader type via python

Query shader type via python

Anonymous
Not applicable
1,467 Views
1 Reply
Message 1 of 2

Query shader type via python

Anonymous
Not applicable

Is there a way to query the shader type via python(see picture)?

0 Likes
Accepted solutions (1)
1,468 Views
1 Reply
Reply (1)
Message 2 of 2

rajasekaransurjen
Collaborator
Collaborator
Accepted solution

Hi,

Try This...

select the object then run the code.

cmds.hyperShade(smn=1)
rsShader = cmds.ls(sl=True)
rsShadersType = cmds.nodeType(rsShader)
print rsShadersType