AttributeType
- class omni.graph.core.AttributeType
Methods
__init__
(*args, **kwargs)base_data_size
(type)Figure out how much space a base data type occupies in memory inside Fabric.
Returns a dictionary containing the names and contents of the ogn attribute union types.
is_legal_ogn_type
(type)Check to see if the type combination has a legal representation in OGN.
sdf_type_name_from_type
(type)Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g.
type_from_ogn_type_name
(ogn_type_name)Parse an OGN attribute type name into the corresponding omni.graph.core.Type description.
type_from_sdf_type_name
(sdf_type_name)Parse an SDF attribute type name into the corresponding omni.graph.core.Type description.
- __init__(*args, **kwargs)
- static base_data_size(type: omni.graph.core._omni_graph_core.Type) int
Figure out how much space a base data type occupies in memory inside Fabric. This will not necessarily be the same as the space occupied by the Python data, which is only transient. Multiply by the tuple count and the array element count to get the full size of any given piece of data.
- Parameters
arg0 (og.Type) – The type object whose base data type size is to be found
- Returns
Number of bytes one instance of the base data type occupies in Fabric
- Return type
(int)
- static get_unions() dict
Returns a dictionary containing the names and contents of the ogn attribute union types.
- Returns
Dictionary that maps the attribute union names to list of associated ogn types
- Return type
(Dict[str, List[str]])
- static is_legal_ogn_type(type: omni.graph.core._omni_graph_core.Type) bool
Check to see if the type combination has a legal representation in OGN.
- Parameters
arg0 (og.Type) – The type object to be checked
- Returns
True if the type represents a legal OGN type, otherwise False
- Return type
(bool)
- static sdf_type_name_from_type(type: omni.graph.core._omni_graph_core.Type) object
Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g. a ‘bundle’
- Parameters
arg0 (omni.graph.core.Type) – The type to be converted
- Returns
The SDF type name of the type, or None if there is no corresponding SDF type
- Return type
(str)
- static type_from_ogn_type_name(ogn_type_name: str) omni.graph.core._omni_graph_core.Type
Parse an OGN attribute type name into the corresponding omni.graph.core.Type description.
- Parameters
arg0 (str) – The OGN-style attribute type name to be converted
- Returns
Type corresponding to the attribute type name in OGN format. Type object will be the unknown type if the type name could be be parsed.
- Return type
- static type_from_sdf_type_name(sdf_type_name: str) omni.graph.core._omni_graph_core.Type
Parse an SDF attribute type name into the corresponding omni.graph.core.Type description. Note that SDF types are not capable of representing some of the valid types - use typeFromOgnTypeName() for a more comprehensive type name description.
- Parameters
arg0 (str) – The SDF-style attribute type name to be converted
- Returns
Type corresponding to the attribute type name in SDF format. Type object will be the unknown type if the type name could be be parsed.
- Return type