SceneGraphPrimAPI

SceneGraphPrimAPI provides a way to add descriptive information to the node graph.

Consider the following example:

def Material "MyMaterial"
{
    token outputs:mtlx:surface.connect = </World/MyMaterial/PreviewSurface.outputs:out>

    def Shader "PreviewSurface" (
        prepend apiSchemas = ["SceneGraphPrimAPI"]
    )
    {
        uniform token info:id = "ND_UsdPreviewSurface_surfaceshader"
        color3f inputs:diffuseColor.connect = </World/MyMaterial/Color.outputs:out>
        token outputs:out

        uniform token ui:displayGroup = "MyMaterial Nodes"
        uniform token ui:displayName = "Preview Surface Node"
    }

    def Shader "Color" (
        prepend apiSchemas = ["SceneGraphPrimAPI"]
    )
    {
        uniform token info:id = "ND_constant_color3"
        color3f inputs:value = (1, 0.023, 0.701)
        color3f outputs:out

        uniform token ui:displayGroup = "MyMaterial Nodes"
        uniform token ui:displayName = "Color Node"
    }
}

The two shader nodes, PreviewSurface and Color, can have their own descriptive names (ui:displayName). They can also belong to a display group (ui:displayGroup), allowing groups of nodes to be displayed in an organized way.

Properties

ui:displayGroup

USD type: token

A descriptive name for the group to which the node belongs, within the context of its connected node graph. This group name may be distinct from any other USD grouping feature name used for the node (e.g. associated Scope name, parent Prim name, etc.).

ui:displayName

USD type: token

A descriptive name for the node within the context of its connected node graph, which may be distinct from its core Prim displayName.