Get USD Attribute/Primvar
Read any attribute or primvar off a prim, as a value you can use
- USD
- value
The read side of the pack's attribute story. Get USD Attribute pulls a single attribute - or a primvar - off a prim and hands it to you as a value you can inspect, wire around, or feed back into the pack. Where SetUSDAttribute writes, this reads. If you're debugging a stage ("what does this mesh's displayColor actually resolve to?") or building a graph that makes decisions based on a prim's data, this is the node.
There's a subtlety in the name: "primvar" is USD's term for a per-vertex or per-face attribute that travels with geometry - texture coordinates (primvars:st), colors (primvars:displayColor), normals. The is_primvar toggle is what makes this node smart about them, and it's on by default for a reason: if the plain attribute name isn't found, the node retries with the primvars: prefix prepended. So asking for st with is_primvar on finds primvars:st without you typing the prefix.
The inputs
- USD and prim_path (default
/Root/Mesh) - what to read from. - attribute_name - the attribute, e.g.
points,displayColor,focalLength. DefaultmyAttributeis a placeholder. - is_primvar - boolean, default on; controls the
primvars:fallback described above.
Output: a single * (wildcard/ANY) socket named value. This is ComfyUI's escape-hatch type - it can connect to anything, which is both the feature and the trap: it's up to whatever you plug it into to understand what it's receiving.
What actually comes out
The node returns a JSON string shaped like {"data": <value>, "type": "color3f"} - the value plus its USD type token. That shape is exactly what the pack's SetUSDAttribute expects to consume, so the natural loop is Get → (transform if you want) → Set. Into a generic ComfyUI node, though, it's a JSON blob and nothing more; don't expect a plain number out of it.
If the prim or attribute doesn't exist, you get a warning in the console and a None out - no crash. That's useful for optional reads, but it also means a typo silently propagates None downstream instead of erroring loudly.
Install & caveats
Pack install: ComfyUI Manager → search "ComfyUI-OpenUSD", or
cd ComfyUI/custom_nodes
git clone https://github.com/cjhosken/ComfyUI-OpenUSD
then restart. Deps: usd-core==26.5, numpy==2.5.0, trimesh.
Caveats: the USD socket is pack-private, the wildcard output only carries meaning for consumers that understand the JSON contract, and None-on-missing means you should check the console warnings when a read looks wrong. If you're reading a value that a lower layer defines, note this returns the resolved value - composition is already applied, which is usually what you want.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| USD | USD | — | |
| prim_path | STRING | /Root/Mesh | — |
| attribute_name | STRING | myAttribute | — |
| is_primvar | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |