get_sdr_shader_node_for_prim

omni.kit.property.material.scripts.widgets.usdshade.get_sdr_shader_node_for_prim(prim: Prim, source_type_priority: Optional[List[str]] = None) Optional[ShaderNode]

Finds and returns the Sdr.ShaderNode used to define the corresponding UsdShade.Shader prim.

Parameters
  • prim (Usd.Prim) – The USD primitive to find the shader node for.

  • source_type_priority (Optional[List[str]]) – A list of source type priorities to consider when finding the shader node.

Returns

The found Sdr.ShaderNode, or None if not found.

Return type

Union[Sdr.ShaderNode, None]