Hi,
I'm trying to add custom shader attributes on all my char meshes but it doesn't seem to work
My sourcepath is a gcha file with skeleton and meshes.
before adding any attribute, I'm already stuck at the point of adding a shadingGroup node on the meshes.
I guess I'm not using the function correctly. To be honnest I find the syntax a bit confusing :)
#retrieve the list of geometry nodes
nodelist = cmds.glmCharacterMaker(script=True,
file=sourcepath,
listGeoNodes = True)
#adding shading group on each
for node in nodelist:
if 'gmsh' in node:
addednode = cmds.glmCharacterMaker(script=True,
file=sourcepath,
addGeoNode=["ShadingGroupNode", "testnode"],
outputFile=saveAs)
cmds.glmCharacterMaker(script=True,
file=saveAs,
editProperties=["ShadingGroupNode", addednode, 'parent='+node],
outputFile=saveAs)