newton.usd.get_custom_attribute_values#
- newton.usd.get_custom_attribute_values(prim, custom_attributes, context=None)[source]#
Get custom attribute values from a USD prim and a set of known custom attributes. Returns a dictionary mapping from
ModelBuilder.CustomAttribute.keyto the converted Warp value. The conversion is performed byModelBuilder.CustomAttribute.usd_value_transformer().The context dictionary passed to the transformer function always contains: -
"prim": The USD prim to query. -"attr": TheCustomAttributeobject to get the value for. It may additionally include caller-provided keys from thecontextargument.- Parameters:
prim (Usd.Prim) – The USD prim to query.
custom_attributes (Sequence[ModelBuilder.CustomAttribute]) – The
CustomAttributeobjects to get values for.context (dict[str, Any] | None) – Optional extra context keys to forward to transformers.
- Returns:
A dictionary of found custom attribute values mapping from attribute name to value.
- Return type: