AttributeValueHelper#
- class omni.graph.core.AttributeValueHelper(
- attribute: Attribute,
- instance=18446744073709551614,
- Bases: - AttributeDataValueHelper- Class to manage getting and setting of Attribute values. You can also just use AttributeDataValueHelper directly. - Methods - __init__(attribute[, instance])- Create a helper class to access Attribute values - resolve_type(type_id)- Resolves the attribute type, usually before setting an explicit value. - set(new_value[, on_gpu, update_usd])- Set the value of the attribute. - Attributes - the attribute this helper is wrapping - Does the underlying attribute have a definite resolved type? - Validity of the underlying API object - the attribute type, extracting it from the data if it hasn't already been done - __init__(
- attribute: Attribute,
- instance=18446744073709551614,
- Create a helper class to access Attribute values - Parameters:
- attribute – Attribute whose value will be accessed 
- instance – Index of the graph from which the attribute’s value is to be accessed 
 
 
 - resolve_type(
- type_id: str | Type,
- Resolves the attribute type, usually before setting an explicit value. - Parameters:
- type – Attribute type to which the attribute will be resolved. 
- Raises:
- OmniGraphError – If the attribute could not (or should not) be resolved 
 
 - set(
- new_value: Any | TypedValue,
- on_gpu: bool = False,
- update_usd: bool = False,
- Set the value of the attribute. This is overridden so that it can include an explicit type for the data, which can be used to resolve the attribute type (only valid for extended types) - Parameters:
- new_value – New value to be set on the attribute 
- on_gpu – Should the value be stored on the GPU? 
- update_usd – Should the value be immediately propagated to USD? 
 
- Raises:
- og.OmniGraphError – Raised if the data type of the attribute is not yet supported 
 
 - property is_resolved: bool#
- Does the underlying attribute have a definite resolved type? - Type:
- bool 
 
 - property is_valid: bool#
- Validity of the underlying API object - Type:
- bool