shaderInfo

shaderInfo.get_all_dg_nodes(inNode, direction, node_types)
shaderInfo.get_child_shaders(SGs)
shaderInfo.get_connected_manifold(node, manifold_attr)
shaderInfo.get_connected_tex_node(node, attr)

return the fileNode plugged directly/indirectly to the given attribute of the given node

shaderInfo.get_obj_texInfo(astRoot, textures=True, SG=False, tags=True)
shaderInfo.info(geo, textures=True, SG=False, tags=True, manifold=False)

Description:

Takes a single object of type ‘transform’ as an input.

And optionally, a textures/SG arguments. SG=True overrides textures to be False

if tags set to False, the function will return the texutres based on the object name otherwise by default, it will return the value from the ‘.name’ tag Returns all the texture files paths connected to the shader that is assigned to the given object as list of pairs of fullPathSourceFile.ext and objectName_<attribute>.ext

hdr=True if this is a disp or bumpt.

i.e., [‘/full/texture/path/surfaceColorMap.1001.tif’, ‘pSphere1_Ks.1001.tif’, fileNodeName, attrName, isSeq, hdr]

Note: Maximum of two dots are allowed in texture filename attached to the shader

<texName>.ext, <texName>.<udim>.ext works, but <texName>.bla.<udim>.ext is not supported, and should not be used by the user.

shaderInfo.obj_info(geo, textures=True, SG=False, tags=True)

Description:

Takes a single object of type ‘transform’ as an input.

And optionally, a textures/SG arguments. SG=True overrides textures to be False

if tags set to False, the function will return the texutres based on the object name otherwise by default, it will return the value from the ‘.name’ tag Returns all the texture files paths connected to the shader that is assigned to the given object as list of pairs of fullPathSourceFile.ext and objectName_<attribute>.ext

hdr=True if this is a disp or bumpt.

i.e., [‘/full/texture/path/surfaceColorMap.1001.tif’, ‘pSphere1_Ks.1001.tif’, fileNodeName, attrName, isSeq, hdr]

Note: Maximum of two dots are allowed in texture filename attached to the shader

<texName>.ext, <texName>.<udim>.ext works, but <texName>.bla.<udim>.ext is not supported, and should not be used by the user.

shaderInfo.per_face_test()
shaderInfo.process_texture(mapsFolder, srcTexture, targetTexture, hdr=False, rman=False)
shaderInfo.translate_attr_name(attr, connectedNode=None)

Returns the name of the nice attribute name to be used when resolving the texture on this attribute if the given attribute is custom or doesn’t have short nice name, the texture node name part before the first ‘_’ is used as the nice name (for example: texture node named dirt_skin_tex, will return a nice name ‘dirt’, while diffuseColor_skin_tex will return ‘diff’ since diffuseColor has a nice name

Parameters:
  • attr
  • connectedNode
Returns: