AttributeType#
- class omni.graph.core.AttributeType#
Bases:
pybind11_object
Utilities for operating with the attribute data type class omni.graph.core.Type and related types
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. a 'bundle'.
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( ) 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:
type (omni.graph.core.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( ) bool #
Check to see if the type combination has a legal representation in OGN.
- Parameters:
type (omni.graph.core.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( ) object #
Given an attribute type find the corresponding SDF type name for it, None if there is none, e.g. a ‘bundle’
- Parameters:
type (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,
Parse an OGN attribute type name into the corresponding omni.graph.core.Type description.
- Parameters:
ogn_type_name (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,
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:
sdf_type_name (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: