file_path
stringlengths 5
148
| content
stringlengths 150
498k
| size
int64 150
498k
|
---|---|---|
omni.graph.core.attribute_value_as_usd.md | # attribute_value_as_usd
## attribute_value_as_usd
```
```markdown
omni.graph.core.attribute_value_as_usd(og_type: Type, value: Any, array_limit: Optional[int] = None) -> Any
```
```markdown
Returns the value, converted into a type suitable for setting through the USD API compatible with
an attribute of the given type. It’s assumed that anything passed in here has a valid USD attribute type;
i.e. no extended attributes or bundles
```
```markdown
### Parameters
- **og_type** – The OG type of the given data
- **value** – The value read from the attribute
- **array_limit** – Arrays larger than this value will be truncated
### Returns
- The USD-compatible value
### Return type
- Any
``` | 697 |
omni.graph.core.BaseDataType.md | # BaseDataType
## BaseDataType
```python
class omni.graph.core.BaseDataType
```
**Bases:** `pybind11_object`
**Basic data type for attribute data**
**Members:**
- **ASSET**: Data represents an Asset
- **BOOL**: Data is a boolean
- **CONNECTION**: Data is a special value representing a connection
- **DOUBLE**: Data is a double precision floating point value
- **FLOAT**: Data is a single precision floating point value
- **HALF**: Data is a half precision floating point value
- **INT**: Data is a 32-bit integer
- **INT64**: Data is a 64-bit integer
- **PRIM**: Data is deprecated
- **RELATIONSHIP**: Data is a relationship to a USD prim
- **TAG**: Data is a special Fabric tag
- **TOKEN**: Data is a reference to a unique shared string
- **UCHAR**: Data is an 8-bit unsigned character
- **UINT**: Data is a 32-bit unsigned integer
- **UINT64**: Data is a 64-bit unsigned integer
- **UNKNOWN**: Data type is currently unknown
**Methods**
- `__init__(self, value)`
**Attributes**
- `ASSET`
- `BOOL`
- `CONNECTION`
- `DOUBLE`
- `FLOAT`
- `HALF`
- `INT`
- `INT64`
- `PRIM`
- `RELATIONSHIP`
- `TAG`
- `TOKEN`
- `UCHAR`
- `UINT`
- `UINT64`
- `UNKNOWN`
| Column 1 | Column 2 |
|----------|----------|
| `FLOAT` | |
| `HALF` | |
| `INT` | |
| `INT64` | |
| `PRIM` | |
| `RELATIONSHIP` | |
| `TAG` | |
| `TOKEN` | |
| `UCHAR` | |
| `UINT` | |
| `UINT64` | |
| `UNKNOWN`| |
| `name` | |
| `value` | |
### __init__
```python
__init__(self: omni.graph.core._omni_graph_core.BaseDataType, value: int) -> None
```
### name
```python
property name
```
``` | 1,699 |
omni.graph.core.BaseDataType_omni.graph.core.BaseDataType.md | # BaseDataType
## BaseDataType
Basic data type for attribute data
Members:
- ASSET : Data represents an Asset
- BOOL : Data is a boolean
- CONNECTION : Data is a special value representing a connection
- DOUBLE : Data is a double precision floating point value
- FLOAT : Data is a single precision floating point value
- HALF : Data is a half precision floating point value
- INT : Data is a 32-bit integer
- INT64 : Data is a 64-bit integer
- PRIM : Data is deprecated
- RELATIONSHIP : Data is a relationship to a USD prim
- TAG : Data is a special Fabric tag
- TOKEN : Data is a reference to a unique shared string
- UCHAR : Data is an 8-bit unsigned character
- UINT : Data is a 32-bit unsigned integer
- UINT64 : Data is a 64-bit unsigned integer
- UNKNOWN : Data type is currently unknown
### Methods
- `__init__(self, value)`
### Attributes
- `ASSET`
- `BOOL`
- `CONNECTION`
- `DOUBLE`
- `FLOAT`
- `HALF`
- `INT`
- `INT64`
- `PRIM`
- `RELATIONSHIP`
- `TAG`
- `TOKEN`
- `UCHAR`
- `UINT`
- `UINT64`
- `UNKNOWN`
| 类型 | 描述 |
|------------|------|
| `FLOAT` | |
| `HALF` | |
| `INT` | |
| `INT64` | |
| `PRIM` | |
| `RELATIONSHIP` | |
| `TAG` | |
| `TOKEN` | |
| `UCHAR` | |
| `UINT` | |
| `UINT64` | |
| `UNKNOWN` | |
| `name` | |
| `value` | |
### `__init__`
```python
def __init__(self: omni.graph.core._omni_graph_core.BaseDataType, value: int) -> None:
pass
```
### `name`
```python
property name
``` | 1,537 |
omni.graph.core.BucketId.md | # BucketId
## BucketId
```
Bases: `pybind11_object`
internal Use only, and obsolete: This type was only useful for writing back to USD, which cannot be achieved anymore through this type. However, writing back to USD can still be achieved by using the USD API directly.
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self, id)` | [OBSOLETE] Set up the initial value of the bucket id |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `id` | Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data |
```python
__init__(self, id: int) -> None
```
[OBSOLETE] Set up the initial value of the bucket id
```
id (int): [OBSOLETE] Unique identifier of a bucket of Fabric data
Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data | 818 |
omni.graph.core.BucketId_omni.graph.core.BucketId.md | # BucketId
## BucketId
```python
class omni.graph.core.BucketId
```
**Internal Use only, and obsolete:** This type was only useful for writing back to USD, which cannot be achieved anymore through this type. However, writing back to USD can still be achieved by using the USD API directly.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self, id)` | [OBSOLETE] Set up the initial value of the bucket id |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `id` | Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data |
```python
def __init__(self, id: int) -> None:
[OBSOLETE] Set up the initial value of the bucket id
id (int): [OBSOLETE] Unique identifier of a bucket of Fabric data
Internal Use - [OBSOLETE] Unique identifier of a bucket of Fabric data | 834 |
omni.graph.core.Bundle.md | # Bundle
## Methods
- `__init__(attribute_name: str, read_only: bool)`
- Initialize the access points for the bundle attribute
- `attribute_by_name(attribute_name: str)`
- Get an attribute by name from the underlying buffer or the buffer masking it.
- `clear()`
- Empties out the bundle contents
- `create_attribute(name: str, type_desc: str)`
- Create an attribute inside the buffered bundle data structure
| Method | Description |
|--------|-------------|
| (bundle_contents) | Convert a BundleContents object to a python Bundle. |
| (to_insert) | Insert new content in the existing bundle |
| (attribute_name) | Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| attribute_names | Returns the list of interface objects corresponding to the attributes contained within the bundle |
| is_runtime_resident | Does the bundle content exist and is it valid |
| name | The bundle's name |
| runtime_accessor | exposes the runtime bundle accessor. |
| size | Returns the number of attributes within this bundle, 0 if the bundle is not valid |
| valid | Is the underlying bundle valid, or None if it does not even exist |
### omni.graph.core.Bundle.__init__
```python
__init__(attribute_name: str, read_only: bool)
```
Initialize the access points for the bundle attribute.
**Parameters:**
- `attribute_name` – the bundle’s name. This name will only be used if the bundle is nested.
- `read_only` – Is the bundle data read-only?
### omni.graph.core.Bundle.attribute_by_name
```python
attribute_by_name(attribute_name: str) -> Optional[RuntimeAttribute]
## omni.graph.core.Bundle.attribute_by_name
Get an attribute by name from the underlying buffer or the buffer masking it.
### Parameters
- **attribute_name** – the attribute being queried.
### Returns
the named attribute within the bundle, or None if no such attribute exists in the bundle
## omni.graph.core.Bundle.clear
Empties out the bundle contents
### Raises
- **og.OmniGraphError** – if the bundle is not writable
## omni.graph.core.Bundle.create_attribute
Create an attribute inside the buffered bundle data structure
### Parameters
- **name** – name of the attribute to create
- **type_desc** – python type object of the attribute to create. Accepts all Omnigraph types. Will attempt to convert non-omnigraph types, but raise an error if it fails.
### Returns
the OmniAttribute it created.
### Raises
- **OmniGraphError** if no type conversion was found.
## omni.graph.core.Bundle.from_accessor
——– FOR GENERATED CODE USE ONLY ——–
Convert a BundleContents object to a python Bundle.
### Parameters
- **bundle_contents** – the graph object representing the bundle
## omni.graph.core.Bundle.insert
Insert a bundle, attribute, or tuple of attribute and name into the bundle.
### Parameters
- **to_insert** – a Bundle, OmniAttribute, or a tuple containing an OmniAttribute and a string.
Insert new content in the existing bundle
**Parameters**
- **to_insert** – Object to insert. It can be one of three different types of object:
- **Bundle**: Another bundle, whose contents are entirely copied into this one
- **RuntimeAttribute**: A single attribute from another bundle to be copied with the same name
- **(RuntimeAttribute, str)**: A single attribute from another bundle and the name to use for the copy
- **AttributeDescription**: Information required to create a brand new typed attribute
**Returns**
- Attribute object of the new attribute if inserting an attribute, else None
remove(attribute_name: str)
Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle.
**Parameters**
- **attribute_name** – attribute to be deleted.
property attribute_names: List[OmniAttribute]
Returns the list of interface objects corresponding to the attributes contained within the bundle
property is_runtime_resident
Does the bundle content exist and is it valid
**Type**
- bool
property name
The bundle’s name
property runtime_accessor: BundleContents
exposes the runtime bundle accessor.
**Returns**
- the BundleContents object if it exists, None otherwise.
property size
The size of the bundle
**Returns**
- int: The number of attributes in the bundle
### Bundle Properties
#### Size
: int
- Returns the number of attributes within this bundle, 0 if the bundle is not valid
- **Type**: int
#### Valid
: Optional[bool]
- Is the underlying bundle valid, or None if it does not even exist
- **Type**: bool | 4,592 |
omni.graph.core.BundleChanges.md | # BundleChanges
## Overview
BundleChanges is designed for inspecting modifications within a bundle during its lifetime.
The BundleChanges class enables the inspection of changes in a bundle’s attributes and child bundles during the lifetime of the BundleChanges instance. It keeps a record of modifications that have occurred, providing a suite of functionalities to inspect these changes.
An important aspect of the BundleChanges class is that it automatically clears the changes upon its destruction, i.e., when the instance goes out of scope. This ensures that the lifetime of the recorded changes is tied to the lifetime of the BundleChanges instance.
### Example usage:
```python
def compute(db) -> bool:
with db.inputs.bundle.changes() as bundle_changes:
if bundle_changes:
# inspect changes
else:
return True # early exit, no changes
```
## Methods
- **Method 1**
- **Method 2**
- ...
| Method | Description |
|--------|-------------|
| `__init__(bundle_changes, bundle[, clear_at_exit])` | Initialize bundle change tracking system for a bundle |
| `activate()` | Activates the change tracking system for a bundle. |
| `clear_changes()` | Clears the recorded changes. |
| `deactivate()` | Deactivates the change tracking system for a bundle. |
| `get_change(entry)` | Retrieves the change status of a bundle or attribute. |
| `has_changed()` | Checks if the bundle has changed. |
### __init__(bundle_changes, bundle[, clear_at_exit])
Initialize bundle change tracking system for a bundle
**Parameters:**
- **context** – Evaluation context from which this bundle was extracted
- **bundle** – Bundle for which changes are being tracked
### activate()
Activates the change tracking system for a bundle.
This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles (when readOnly template parameter is false). For read-only bundles, this method will cause a compilation error if called.
### clear_changes()
Clears the recorded changes.
This method is used to manually clear the recorded changes of the bundle.
### deactivate()
Deactivates the change tracking system for a bundle.
## Deactivate
Deactivates the change tracking system for a bundle.
This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles (when readOnly template parameter is false). For read-only bundles, this method will cause a compilation error if called.
## get_change
Retrieves the change status of a bundle or attribute.
This method is used to check if a specific bundle or attribute has been modified within the lifetime of the BundleChanges instance.
### Parameters
- **entry** – None, RuntimeAttribute or BundleContents to check if dirty.
## has_changed
Checks if the bundle has changed.
This method is used to check if any changes have been made to the bundle’s attributes or child bundles within the lifetime of the BundleChanges instance. | 2,978 |
omni.graph.core.BundleChangeType.md | # BundleChangeType
## BundleChangeType
```
class omni.graph.core.BundleChangeType
```
Enumeration representing the type of change that occurred in a bundle.
This enumeration is used to identify the kind of modification that has taken place in a bundle or attribute. It’s used as the return type for functions that check bundles and attributes, signaling whether those have been modified or not.
Members:
- NONE : Indicates that no change has occurred in the bundle.
- MODIFIED : Indicates that the bundle has been modified.
### Methods
- `__init__(self, value)`
### Attributes
- `MODIFIED`
- `NONE`
- `name`
- `value`
omni.graph.core._omni_graph_core.BundleChangeType
,
value : int
)
→ None
property
name | 715 |
omni.graph.core.BundleContainer.md | # BundleContainer
## Description
```python
class omni.graph.core.BundleContainer(context: GraphContext, node: Node, attributes, gpu_bundles: List[str], read_only: bool = False, gpu_ptr_kinds: Optional[Dict[str, PtrToPtrKind]] = None)
```
### Parameters
- `context`: An instance of `GraphContext`.
- `node`: An instance of `Node`.
- `attributes`: Attributes for the bundle container.
- `gpu_bundles`: A list of strings representing GPU bundles.
- `read_only`: A boolean indicating if the container is read-only (default is `False`).
- `gpu_ptr_kinds`: An optional dictionary mapping strings to `PtrToPtrKind` instances.
```
## omni.graph.core.BundleContainer
### Description
Bases:
```python
object
```
--- FOR USE BY GENERATED CODE ONLY ---
Simple container to manage the set of bundle objects used during a compute function by a node. This is initialized alongside attribute data in order to minimize the generated code. It will house a set of BundleContents objects, one per attribute that is a bundle type, with properties named after the attributes they represent.
### Attributes
#### context
Evaluation context for these bundles
- Type: GraphContext
#### node
Owner of these bundles
- Type: Node
#### attributes
Subset of node attributes to check for being bundles
- Type: list[Attribute]
#### gpu_bundles
Subset of bundle attributes whose memory lives on the GPU
- Type: list[str]
#### read_only
True if these attributes are read-only
- Type: bool
#### gpu_ptr_kinds
Attribute array pointer locations for GPU-based array attributes
- Type: dict[str, PtrToPtrKind]
### Methods
#### __init__(context, node, attributes, gpu_bundles)
Set up the list of members based on the list of node attributes.
,
**gpu_bundles** : List[str],
**read_only** : bool = False,
**gpu_ptr_kinds** : Optional[Dict[str, PtrToPtrKind]] = None
)
Set up the list of members based on the list of node attributes. These will usually be a subset, e.g. just the inputs, to keep the higher level access simple
**Parameters**
- **context** (GraphContext) – Evaluation context for these bundles
- **node** (Node) – Owner of these bundles
- **attributes** (list[Attribute]) – Subset of node attributes to check for being bundles
- **gpu_bundles** (list[str]) – Subset of bundle attributes whose memory lives on the GPU
- **read_only** (bool) – True if these attributes are read-only
- **gpu_ptr_kinds** (dict[str, PtrToPtrKind]) – Attribute array pointer locations for GPU-based array attributes | 2,483 |
omni.graph.core.BundleContents.md | # BundleContents
## BundleContents
### Class Details
```python
class omni.graph.core.BundleContents(context: ~omni.graph.core._omni_graph_core.GraphContext, node: ~omni.graph.core._omni_graph_core.Node, attribute_name: str, read_only: bool, gpu_by_default: bool, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>)
```
**Bases:** `object`
--- FOR USE BY GENERATED CODE ONLY ---
Manage the allowed types of attributes, providing a static set of convenience values
### Attributes
#### context
**Type:** [GraphContext](omni.graph.core.GraphContext.html#omni.graph.core.GraphContext)
Evaluation context from which this bundle was extracted
#### read_only
**Type:** bool
Is the bundle data read-only?
### Methods
```
| Method | Description |
| --- | --- |
| `__init__(context, node, attribute_name, ...)` | Initialize the access points for the bundle attribute |
| `add_attributes(types, names)` | Add attributes to the bundle |
| `attribute_by_name(attribute_name)` | Returns the named attribute within the bundle, or None if no such attribute exists in the bundle |
| `changes([clear_at_exit])` | |
| `clear()` | Empties out the bundle contents |
| `insert(to_insert)` | Insert new content in the existing bundle |
| `remove(attribute_name)` | Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle |
| `remove_attributes(names)` | Remove attributes from the bundle |
### Attributes
| Attribute | Description |
| --- | --- |
| `attributes` | interface objects corresponding to the attributes contained within the bundle |
| `bundle` | Underlying bundle of this object |
| `path` | the path where this bundle's data is stored |
| `size` | the number of attributes within this bundle, 0 if the bundle is not valid |
| `valid` | Validity of the underlying bundle |
### __init__
`__init__(context: ~omni.graph.core._omni_graph_core.GraphContext, node: ~omni.graph.core._omni_graph_core.Node, attribute_name: str, ...)`
### __init__
```python
__init__(
read_only: bool,
gpu_by_default: bool,
gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>
)
```
Initialize the access points for the bundle attribute
#### Parameters
- **context** – Evaluation context from which this bundle was extracted
- **node** – Node owning the bundle
- **attribute_name** – Name of the bundle attribute
- **read_only** – Is the bundle data read-only?
- **gpu_by_default** – Are the bundle members on the GPU by default?
- **gpu_ptr_kind** – On which device to pointers to GPU bundles live?
### add_attributes
```python
add_attributes(
types: List[Type],
names: List[str]
)
```
Add attributes to the bundle
#### Parameters
- **types** – Vector of types
- **names** – The names of each attribute
Note it is required that size(types) == size(names)
### attribute_by_name
```python
attribute_by_name(
attribute_name: str
) -> Optional[RuntimeAttribute]
```
Returns the named attribute within the bundle, or None if no such attribute exists in the bundle
#### Parameters
- **attribute_name** – Name of the attribute to retrieve
#### Returns
- Bundle member with the given name, None if it was not found
#### Return type
- RuntimeAttribute
## BundleContents Methods
### clear
Empties out the bundle contents
Raises:
- **og.OmniGraphError** – if the bundle is not writable
### insert
Insert new content in the existing bundle
Parameters:
- **to_insert** – Object to insert. It can be one of three different types of object:
- *Bundle*: Another bundle, whose contents are entirely copied into this one
- *RuntimeAttribute*: A single attribute from another bundle to be copied with the same name
- *(RuntimeAttribute, str)*: A single attribute from another bundle and the name to use for the copy
- *AttributeDescription*: Information required to create a brand new typed attribute
Returns:
- wrapper to the new attribute if inserting an attribute, else None
Return type:
- RuntimeAttribute
### remove
Removes the attribute with the given name from the bundle, silently succeeding if it is not in the bundle
Parameters:
- **attribute_name** – Name of the attribute to remove
### remove_attributes
(This section is incomplete in the provided HTML snippet)
## Attributes
### remove_attributes
Remove attributes from the bundle
#### Parameters
- **names** – The names of each attribute to be removed
Note it is required that size(types) == size(names)
### attributes
interface objects corresponding to the attributes contained within the bundle
#### Type
- list[RuntimeAttribute]
### bundle
Underlying bundle of this object
#### Type
- Bundle
### path
the path where this bundle’s data is stored
#### Type
- str
### size
the number of attributes within this bundle, 0 if the bundle is not valid
#### Type
- int
### valid
Validity of the underlying bundle
#### Type
- bool | 4,920 |
omni.graph.core.BundleWriteBlock.md | # BundleWriteBlock
## BundleWriteBlock
```
class omni.graph.core.BundleWriteBlock(context: GraphContext, activate=True)
```
Bases: `object`
Creates a thread-local scope to ensure that each bundle is marked as changed only once, regardless of the number of operations performed within the block.
This optimization is an integral part of the bundle change tracking system, designed to minimize overhead associated with high-volume operations during frequent bundle manipulations.
Example usage:
```
with omni.graph.core.BundleWriteBlock(graph_context):
# …each bundle written to will be bumped exactly once…
```
You can optionally pass in a second parameter to deactivate the block:
```
with omni.graph.core.BundleWriteBlock(graph_context, False):
# …the block is not active here…
```
### Methods
| Method | Description |
|--------|-------------|
| `__init__(context[, activate])` | |
```
def __init__(context: GraphContext, activate=True):
pass
```
activate = True | 986 |
omni.graph.core.Classes.md | # omni.graph.core Classes
## Classes Summary:
| Class Name | Description |
|------------|-------------|
| Attribute | An attribute, defining a data type and value that belongs to a node |
| AttributeData | Reference to data defining an attribute’s value |
| AttributeDataValueHelper | Class to manage getting and setting of omni.graph.core.AttributeData values. |
| AttributePortType | Port side of the attribute on its node |
| AttributeRole | Interpretation applied to the attribute data |
| AttributeType | Utilities for operating with the attribute data type class omni.graph.core.Type and related types |
| AttributeValueHelper | Class to manage getting and setting of Attribute values. |
| BaseDataType | Basic data type for attribute data |
| BucketId | internal Use only, and obsolete: This type was only useful for writing back to USD, which cannot be achieved anymore through this type. |
| Bundle | —– FOR USE BY GENERATED CODE ONLY —– |
| BundleChangeType | Enumeration representing the type of change that occurred in a bundle. |
| BundleChanges | —– FOR USE BY GENERATED CODE ONLY —– |
| --- | --- |
| BundleContainer | —– FOR USE BY GENERATED CODE ONLY —– |
| BundleContents | —– FOR USE BY GENERATED CODE ONLY —– |
| BundleWriteBlock | Creates a thread-local scope to ensure that each bundle |
| ComputeGraph | Main OmniGraph interface registered with the extension system |
| ConnectionInfo | Attribute and connection type in a given graph connection |
| ConnectionType | Type of connection |
| Controller | Class to provide a simple interface to a variety OmniGraph manipulation functions. |
| DataView | Helper class for getting and setting attribute data values. The setting operation is undoable. |
| DataWrapper | Wrapper around typed memory data. |
| Database | Base class for the generated database class for .ogn nodes (Python and C++ implementations) |
| Device | Device type for memory location of the data types |
| Dtype | Common base type for dtypes, defining the members each needs to populate |
| DynamicAttributeAccess | Base class for the generated classes that contain the access properties for all attributes. |
| DynamicAttributeInterface | Class providing a container for dynamic attribute access interfaces. |
| ExecutionAttributeState | Current execution state of an attribute [DEPRECATED: See omni.graph.action.IActionGraph] |
| ExtendedAttributeType | Extended attribute type, if any |
| ExtensionInformation | Class that manages information about the relationships between nodes and node types, and extensions |
| FileFormatVersion | Version number for the OmniGraph file format |
| FunctionResult | Value indicating whether a function call succeeded |
| Graph | Object containing everything necessary to execute a connected set of nodes. |
- GraphBackingType: Location of the data backing the graph
- GraphContext: Execution context for a graph
- GraphController: Helper class that provides a simple interface to modifying the contents of a graph
- GraphEvaluationMode: How the graph evaluation is scheduled
- GraphEvent: Graph modification event.
- GraphPipelineStage: Pipeline stage in which the graph lives
- GraphRegistry: Manager of the node types registered to OmniGraph.
- GraphRegistryEvent: Graph Registry modification event.
- GraphSettings: Container for the set of settings in a graph. This is a class instead of a tuple so that future
- IBundle2: Provide read write access to recursive bundles.
- IBundleChanges: Interface for monitoring and handling changes in bundles and attributes.
- IBundleFactory: Interface to create new bundles
- IBundleFactory2: IBundleFactory version 2.
- IConstBundle2: Provide read only access to recursive bundles.
- INodeCategories: Interface to the list of categories that a node type can belong to
- INodeTypeForwarding: @brief Interface that creates a forward on a request for a node type to a different node type
- INodeTypeForwarding2: @brief Interface that creates a forward on a request for a node type to a different node type
- IPrimView: PrimView is an interface that provides a view to a set of prims for use with OmniGraph instancing.
- ISchedulingHints: Interface to the list of scheduling hints that can be applied to a node type
- ISchedulingHints2: Interface extension for ISchedulingHints that adds a new “pure” hint
- IVariable: Object that contains a value that is local to a graph, available from anywhere in the graph
- **MemoryType**
- Default memory location for an attribute or node’s data
- **Node**
- An element of execution within a graph, containing attributes and connected to other nodes
- **NodeController**
- Helper class that provides a simple interface to modifying the contents of a node
- **NodeEvent**
- Node modification event.
- **NodeType**
- Definition of a node’s interface and structure
- **NodeTypeConstructionError**
- Exception specific to caught errors in the node type construction process
- **ObjectLookup**
- Helper to extract OmniGraph types from various types of descriptions for them.
- **OmniGraphAttributeError**
- Exception to raise when an OmniGraph operation encountered an unrecognized or illegal attribute value
- **OmniGraphBindingError**
- Common base class for all non-exit exceptions.
- **OmniGraphError**
- Exception to raise when there is an error in an OmniGraph operation
- **OmniGraphInspector**
- Provides simple interfaces for inspection of OmniGraph objects
- **OmniGraphTypeError**
- Exception to raise when an OmniGraph operation encountered an unrecognized or illegal type
- **OmniGraphValueError**
- Exception to raise when an OmniGraph operation encountered an illegal value
- **PerNodeKeys**
- Set of key values for per-node data.
- **PtrToPtrKind**
- Memory type for the pointer to a GPU data array
- **ReadOnlyError**
- Exception to raise when there is a write operation on a read-only attribute (i.e. an input)
- **RuntimeAttribute**
- —– FOR USE BY GENERATED CODE ONLY —–
- **Settings**
- Class that packages up all of the OmniGraph settings handling into a common location. The settings themselves
- **Severity**
- Severity level of the log message
- **ThreadsafetyTestUtils**
- Utilities for Running Threadsafety Unit Tests from Python Generators for OG nodes
- **Type**
- Full definition of the data type owned by an attribute
| 行 | 内容 |
|----|------|
| 奇 | TypedValue |
| | Class that encapsulates an arbitrary value with an explicit data type. This can be used when the |
| 偶 | WrappedArrayType |
| | Enum for the type of array data returned from the get methods |
| 奇 | eAccessLocation |
| | What type of non-attribute data does this node access |
| 偶 | eAccessType |
| | How does the node access the data described by the enum eAccessLocation |
| 奇 | eComputeRule |
| | How the node is allowed to be computed |
| 偶 | ePurityStatus |
| | The purity of the node implementation. For some context, a “pure” node is |
| 奇 | eThreadSafety |
| | How thread safe is the node during evaluation |
| 偶 | eVariableScope |
| | Scope in which the variable has been made available | | 7,112 |
omni.graph.core.ComputeGraph.md | # ComputeGraph
## ComputeGraph
class omni.graph.core.ComputeGraph
Main OmniGraph interface registered with the extension system
### Methods
| Method | Description |
|--------|-------------|
| __init__(*args, **kwargs) | |
__init__(*args, **kwargs) | 255 |
omni.graph.core.ComputeGraph_omni.graph.core.ComputeGraph.md | # ComputeGraph
## ComputeGraph
```python
class omni.graph.core.ComputeGraph(pybind11_object)
```
Main OmniGraph interface registered with the extension system
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | |
```python
def __init__(*args, **kwargs):
pass
``` | 313 |
omni.graph.core.ConnectionInfo.md | # ConnectionInfo
## Methods
- `__init__(self, attr, connection_type)`
- Set up the connection info data
## Attributes
- `attr`
- Attribute being connected
- `connection_type`
- Type of connection
### `__init__` Method
- Parameters:
- `self` : [omni.graph.core._omni_graph_core.ConnectionInfo](omni.graph.core.ConnectionInfo)
- `attr` : [omni.graph.core._omni_graph_core.Attribute](omni.graph.core.Attribute)
- `connection_type` : [omni.graph.core._omni_graph_core.ConnectionType](omni.graph.core.ConnectionType)
<em>
connection_type:
omni.graph.core._omni_graph_core.ConnectionType
)
→
None
Set up the connection info data
### Parameters
- **attr** (omni.graph.core.Attribute) – Attribute in the connection
- **connection_type** (omni.graph.core.ConnectionType) – Type of connection
### attr
Attribute being connected
### connection_type
Type of connection | 879 |
omni.graph.core.ConnectionType.md | # ConnectionType
## Overview
ConnectionType is a class that defines the type of connection. It is derived from `pybind11_object`.
### Members
- **CONNECTION_TYPE_REGULAR**: Normal connection.
- **CONNECTION_TYPE_DATA_ONLY**: Connection only represents data access, not execution flow.
- **CONNECTION_TYPE_EXECUTION**: Connection only represents execution flow, not data access.
## Methods
- **__init__(self, value)**
## Attributes
- **CONNECTION_TYPE_DATA_ONLY**
- **CONNECTION_TYPE_EXECUTION**
- **CONNECTION_TYPE_REGULAR**
- **name**
- **value**
<em class="sig-param">
<span class="n">
<a class="reference internal" href="#omni.graph.core.ConnectionType" title="omni.graph.core._omni_graph_core.ConnectionType">
<span class="pre">
omni.graph.core._omni_graph_core.ConnectionType
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.ConnectionType.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
| 1,503 |
omni.graph.core.ConnectionType_omni.graph.core.ConnectionType.md | # ConnectionType
## ConnectionType
```
```markdown
class omni.graph.core.ConnectionType
```
```markdown
Bases: pybind11_object
```
```markdown
Type of connection)
```
```markdown
Members:
```
```markdown
- CONNECTION_TYPE_REGULAR : Normal connection
- CONNECTION_TYPE_DATA_ONLY : Connection only represents data access, not execution flow
- CONNECTION_TYPE_EXECUTION : Connection only represents execution flow, not data access
```
```markdown
Methods
```
```markdown
- __init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
```markdown
__init__(self, value)
```
```markdown
Attributes
```
```markdown
- CONNECTION_TYPE_DATA_ONLY
- CONNECTION_TYPE_EXECUTION
- CONNECTION_TYPE_REGULAR
- name
- value
```
<section>
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.ConnectionType.__init__">
<span class="pre">
def
<span class="w">
<span class="n">
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<a class="reference internal" href="#omni.graph.core.ConnectionType" title="omni.graph.core._omni_graph_core.ConnectionType">
<span class="pre">
omni.graph.core._omni_graph_core.ConnectionType
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.ConnectionType.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<dd>
| 14,316 |
omni.graph.core.Controller.md | # Controller
## Controller
```python
class omni.graph.core.Controller(*args, **kwargs)
```
Bases:
- `GraphController`
- `NodeController`
- `DataView`
- `ObjectLookup`
Class to provide a simple interface to a variety OmniGraph manipulation functions.
Provides functions for creating nodes, making and breaking connections, and setting values.
Graph manipulation functions are undoable, value changes are not.
Functions are set up to be as flexible as possible, accepting a wide variety of argument variations.
Here is a summary of the interface methods you can access through this class, grouped by interface class. The ones
marked with an “!” indicate that they have both a classmethod version and an object method version. In those cases
the methods use object member values which have corresponding arguments in the classmethod version. (e.g. if the
method uses the “update_usd” member value then the method will also have a “update_usd:bool” argument)
### Controller
- **edit** !
- Perform a collection of edits on a graph (the union of all interfaces)
- **evaluate**
- Runs async evaluation on one or more graphs as a waitable (typically called from async tests)
- **evaluate_sync**
- Runs evaluation on one or more graphs immediately
### ObjectLookup
- **attribute**
- Looks up an og.Attribute from a description
- **attribute_path**
- Looks up an attribute string path from a description
- **attribute_type**
Looks up an og.Type from a description
- **graph**
Looks up an og.Graph from a description
- **node**
Looks up an og.Node from a description
- **node_path**
Looks up a node string path from a description
- **prim**
Looks up an Usd.Prim from a description
- **prim_path**
Looks up a Usd.Prim string path from a description
- **split_graph_from_node_path**
Separate a graph and a relative node path from a full node path
### GraphController
- **connect**
Makes connections between attribute pairs
- **create_graph**
Creates a new og.Graph
- **create_node**
Creates a new og.Node
- **create_prim**
Creates a new Usd.Prim
- **create_variable**
Creates a new og.IVariable
- **delete_node**
Deletes a list of og.Nodes
- **disconnect**
Breaks connections between attribute pairs
- **disconnect_all**
Breaks all connections to and from specific attributes
- **expose_prim**
Expose a USD prim to OmniGraph through an importing node
### NodeController
- **create_attribute**
Create a new dynamic attribute on a node
- **promote_attribute**
Promote a node attribute in a compound graph on the parenting compound node
- **remove_attribute**
Remove an existing dynamic attribute from a node
- **safe_node_name**
Get a node name in a way that’s safe for USD
### DataView
- **get**
Get the value of an attribute’s data
- **get_array_size**
Get the number of elements in an array attribute’s data
- **set**
Set the value of an attribute’s data
### omni.graph.core.Controller.__graph_id
Graph on which the operations are to be performed.
### omni.graph.core.Controller.__path_to_object_map
Dictionary of relative paths mapped on to their full path after creation so that future function calls can use either full paths or short-forms to specify the nodes.
### omni.graph.core.Controller.__update_usd
If True then update the USD after the operations that affect it
### omni.graph.core.Controller.__undoable
If True the operation is added to the undo queue, else it is done immediately and forgotten
### omni.graph.core.Controller.__allow_exists_attr
If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False)
### omni.graph.core.Controller.__allow_exists_node
If True then node creation operation won’t fail when the node already exists in the scene graph (default False)
### omni.graph.core.Controller.__allow_exists_prim
If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False)
###
If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False)
### Raises
* **OmniGraphError** – If the requested operation could not be performed
### Methods
| Method | Description |
| --- | --- |
| `__init__(*args, **kwargs)` | Set up state information. |
| `edit(*args, **kwargs)` | Edit and/or create an OmniGraph from the given description. |
| `evaluate(*args, **kwargs)` | Wait for the next Graph evaluation cycle - await this function to ensure it is finished before returning. |
| `evaluate_sync(*args, **kwargs)` | Run the next Graph evaluation cycle immediately. |
### Attributes
| Attribute | Description |
| --- | --- |
| `PrimCreationData_t(*args, **kwargs)` | alias of Union[Tuple[str | Path, dict[str | tuple[str | Type, any]], str], Tuple[str | Path, str], Tuple[str | Path, dict[str | tuple[str | Type, any]], str]] |
## TYPE_CHECKING
If True then verbose type checking will happen in various locations so that more legible error messages can be emitted.
## __init__
Set up state information. You only need to create an instance of the Controller if you are going to use the edit() function more than once, when it needs to remember the node mapping used for creation. Args are passed on to the parent classes who have inits and interpreted by them as they see fit.
### Parameters
- **graph_id** – If specified then operations are performed on this graph_id unless it is overridden in a particular function call. See GraphController.create_graph() for the data types accepted for the graph description.
- **path_to_object_map** – Dictionary of relative paths mapped on to their full path after creation so that the edit_commands can use either full paths or short-forms to specify the nodes.
- **update_usd** – If specified then override whether to update the USD after the operations (default False)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
- **allow_exists_attr** – If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False)
- **allow_exists_node** – If True then node creation operation won’t fail when the node already exists in the scene graph (default False)
- **allow_exists_prim** – If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False)
Check the help information for GraphController.__init__(), NodeController.__init__(), DataView.__init__(), and ObjectLookup.__init__() for details on what other constructor arguments are accepted.
## Keys
alias of GraphSetupKeys
## edit
classmethod edit(*args, **kwargs) → Tuple[Graph, List[Node], List[Prim], Dict[str, Union[Node]]]
Edit and/or create an OmniGraph from the given description.
This function provides a single call that will make a set of modifications to an OmniGraph. It can be used to create a new graph from scratch or to make changes to an existing graph.
If the “undoable” mode is not set to False then a single undo will revert everything done via this call.
The description below contains different sections that perform different operations on the graph. They are always done in the order listed to minimize conflicts. If you need to execute them in a different order then use multiple calls to edit().
This function can be called either from the class or using an instantiated object. When calling from an object context the arguments passed in will take precedence over the arguments provided to the constructor. Here are some of the legal ways to call the edit function:
```python
# For example purposes "cmds()" is a function that returns a dictionary of editing commands
(graph, _, _, _) = og.Controller.edit("/TestGraph", cmds())
new_controller = og.Controller(graph)
new_controller.edit(cmds())
og.Controller.edit(graph, cmds())
new_controller.edit(graph, cmds())
new_controller.edit(graph, cmds(), undoable=False) # Overrides the normal undoable state of new_controller
```
Below is the list of the allowed operations, in the order in which they will be performed.
The parameters are described as lists, though if you have only one parameter for a given operation you can pass it without it being in a list.
```python
{ OPERATION: [List, Of, Arguments] }
{ OPERATION: SingleArgument }
```
For brevity the shortcut “keys = og.Controller.Keys” is assumed to exist.
- **keys.DELETE_NODES**: NodeSpecs_t
- Deletes a node or list of nodes. If the node specification is a relative path then it must be in the list of full paths that the controller created in a previous call to edit().
```python
{ keys.DELETE_NODES: ["NodeInGraph", "/Some/Other/Graph/Node", my_omnigraph_node] }
```
- **keys.CREATE_VARIABLES**: [(VariableName_t, VariableType_t)] or [(VariableName_t, VariableType_t, Any)]
- Constructs a variable on the graph with the given name and type and an optional default value. The type can be specified as either a ogn type string (e.g. “float4”), or as an og.Type (e.g. og.Type(og.BaseDataType.FLOAT))
```python
{ keys.CREATE_VARIABLES: [("velocity", "float3"), ("count", og.Type(og.BaseDataType.FLOAT), 4)] }
```
- **keys.CREATE_NODES**: [(Path_t, Union[NodeType_t, dict])]
- Constructs a node of the given type at the given path. If the path is a relative one then it is added directly under the graph being edited. A map is remembered between the given path, relative or absolute, and the node created at it so that further editing functions can refer to the node by that name directly rather than trying to infer the final full name.
```python
{ keys.CREATE_NODES: [("NodeInGraph", "omni.graph.tutorial.SimpleData"), ("Inner/Node/Path", og.NodeType(node_type_name))] }
```
- The node type can also be a dictionary of editing commands. In that scenario, the created node becomes a compound node which uses the commands to construct a subgraph that defines its execution.
```python
{ keys.CREATE_NODES: [("CompoundNode", {
keys.CREATE_NODES: ("NodesInCompound", "omni.graph.tutorial.SimpleData")
})] }
```
- keys.CREATE_PRIMS: [(Path_t, {ATTR_NAME: (AttributeType_t, ATTR_VALUE)}, Optional(PRIM_TYPE))]
> Constructs a prim at path “PRIM_PATH” containing a set of attributes with specified types and values. Only those attribute types supported by USD can be used here, though the type specification can be in OGN form - invalid types result in an error. Whereas relative paths on nodes are treated as being relative to the graph, for prims a relative path is relative to the stage root. Prims are not allowed inside an OmniGraph and attempts to create one there will result in an error.
>
> Note that the PRIM_TYPE can appear with or without an attribute definition. (Many prim types are part of a schema and do not require explicit attributes to be added.)
```python
```
- keys.EXPOSE_PRIMS: [(cls.PrimExposureType, Prim_t, NewNode_t)]
> Exposes a prim to OmniGraph through creation of one of the node types designed to do that. The first member of the tuple is the method used to expose the prim. The prim path is the second member of the tuple and it must already exist in the USD stage. The third member of the tuple is a node name with the same restrictions as the name in the CREATE_NODES edit.
```python
```
- keys.CREATE_ATTRIBUTES: [(AttributeSpec_t, AttributeTypeSpec_t)]
> Constructs one or more new dynamic attributes on nodes. The first argument of the tuple defines the location of the new attribute by path and/or node. The second argument of the tuple defines the type and port of the attribute in a flexible way (see the type definition for more details). Any combination of specifications can be used to define new attributes. Unspecified ports default the attribute to being an input.
```python
```
- keys.CONNECT: [(AttributeSpec_t, AttributeSpec_t)]
> Makes a connection between the given source and destination attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path:
```python
```
- keys.DISCONNECT: [(AttributeSpec_t, AttributeSpec_t)]
> Breaks a connection between the given source and destination attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path:
```python
```
- keys.DISCONNECT_ALL: [AttributeSpec_t]
> Breaks all connections to and from the given attributes. The local name of a newly created node may be made as part of the node in the spec, or the node portion of the attribute path:
```python
```
- keys.PROMOTE_ATTRIBUTES: [(AttributeSpec_t, str)]
> Promotes attributes on a node in a compound graph instance as attributes on the parent compound node with the given name. Only input and output attributes on a node in a compound graph can be promoted. The prefix of the promoted name is optional; the ‘inputs’ prefix will be prepended for input attributes, and the ‘outputs’ prefix will be prepended for output attributes if necessary.
```python
{keys.PROMOTE_ATTRIBUTES: [("NodeInGraph.inputs:value", "inputs:new_name"), ("OtherNodeInGraph.outputs:value", "result")]}
```
- keys.SET_VALUES: [AttributeSpec_t, Any] or [AttributeSpec_t, Any, AttributeType_t]
> Sets the value of the given list of attributes.
```python
{keys.SET_VALUES: [("/World/Graph/Node.inputs:attr1", 1.0), (("inputs:attr2", node), 2.0)]}
```
> In the case of extended attribute types you may also need to supply a data type, which is the type the attribute will resolve to when the value is set. To supply a type, add it as a third parameter to the attribute value:
```python
{keys.SET_VALUES: [("inputs:ext1", node), 2.0, "float"]}
```
Here’s a simple call that first deletes an existing node “/World/PushGraph/OldNode”, then creates two nodes of type “omni.graph.tutorials.SimpleData”, connects their “a_int” attributes, disconnects their “a_float” attributes and sets the input “a_int” of the source node to the value 5. It also creates two unused USD Prim nodes, one with a float attribute named “attrFloat” with value 2.0, and the other with a boolean attribute named “attrBool” with the value true.
```python
controller = og.Controller()
keys = og.Controller.Keys
(graph, nodes_constructed, prims_constructed, path_to_object_map) = controller.edit("/World/PushGraph", {
keys.DELETIONS: ["OldNode"],
keys.CREATE_NODES: [("src", "omni.graph.tutorials.SimpleData"), ("dst", "omni.graph.tutorials.SimpleData")],
keys.CREATE_PRIMS: [("Prim1", {"attrFloat": ("float", 2.0)}), ("Prim2", {"attrBool": ("bool", True)})],
keys.CONNECT: [("src.outputs:a_int", "dst.inputs:a_int")],
keys.DISCONNECT: [("src.outputs:a_float", "dst.inputs:a_float")],
keys.SET_VALUES: [("src.inputs:a_int", 5)],
keys.CREATE_VARIABLES: [("a_float_var", og.Type(og.BaseDataType.FLOAT)), ("a_bool_var", "bool", True)]
})
```
> Note
> The controller object remembers where nodes are created so that you can use short forms for the node paths for convenience. That’s why in the above graph the node paths for creation and the node specifications in the connections just says “src” and “dst”. As they have no leading “/” they are treated as being relative to the graph path and will actually end up in “/World/PushGraph/src” and “/World/PushGraph/dst”.
> Node specifications with a leading “/” are assumed to be absolute paths and must be inside the path of an existing or created graph. e.g. the NODES reference could have been “/World/PushGraph/src”, however using “/src” would have been an error.
> This node path mapping is remembered across multiple calls to edit() so you can always use the shortform so long as you use the same Controller object.
```
### Parameters
- **graph_id** – Identifier that says which graph is being edited. See GraphController.create_graph() for the data types accepted for the graph description.
- **edit_commands** – Dictionary of commands and parameters indicating what modifications are to be made to the specified graph. A strict set of keys is accepted. Each of the values in the dictionary can be either a single value or a list of values of the proscribed type.
- **path_to_object_map** – Dictionary of relative paths mapped on to their full path after creation so that the edit_commands can use either full paths or short-forms to specify the nodes.
- **update_usd** – If specified then override whether to update the USD after the operations (default False)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
- **allow_exists_attr** – If True then attribute creation operation won’t fail when the attribute already exists on the node it was being added to (default False)
- **allow_exists_node** – If True then node creation operation won’t fail when the node already exists in the scene graph (default False)
- **allow_exists_prim** – If True then prim creation operation won’t fail when the prim already exists in the scene graph (default False)
### Returns
- the og.Graph being used for the operation
- the list of og.Nodes created by the operation
- the list of Usd.Prims created by the operation
- the map of node/prim path name to the created og.Node/Usd.Prim objects. Can usually be ignored; it will be used internally to manage the shortform names of the paths used in multiple commands.
### Return type
(Graph, list[Node], list[Usd.Prim], dict[str, str])
### Raises
- **OmniGraphError** – if any of the graph creation instructions could not be fulfilled. The graph will be left in the partially constructed state it reached at the time of the error.
### evaluate
```python
await og.Controller.evaluate() # Evaluates all graphs
controller = og.Controller.edit("/TestGraph", {})
await controller.evaluate() # Evaluates only "/TestGraph"
await og.Controller.evaluate("/TestGraph") # Evaluates only "/TestGraph"
controller.evaluate(graph_id="/OtherGraph") # Evaluates only "/OtherGraph" (not its own "/TestGraph")
```
#### Parameters
- **obj** – Either cls or self depending on how the function was called
- **graph_id** (GraphSpecs_t) – Graph or list of graphs to evaluate - None means all existing graphs
#### Raises
- **OmniGraphError** – If the graph evaluated explicitly does not exist or if it is a pre-render or post-render graph.
<em class="property">
<span class="pre">
classmethod
<span class="w">
<span class="sig-name descname">
<span class="pre">
evaluate_sync
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
<span class="sig-paren">
)
<dd>
<p>
Run the next Graph evaluation cycle immediately.
<p>
This function can be called either from the class or using an instantiated object. The first argument is
positional, being either the class or object.
<div class="highlight-python notranslate">
<div class="highlight">
<pre><span>
<span class="n">controller
<span class="n">controller
<span class="n">og
<span class="n">controller
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
obj
– Either cls or self depending on how evaluate_sync() was called
<li>
<p>
<strong>
graph_id
(
<em>
GraphSpecs_t
) – Graph or list of graphs to evaluate - None means all existing graphs
<dt class="field-even">
Raises
<dd class="field-even">
<p>
<strong>
OmniGraphError
– If the graph evaluated explicitly does not exist or if it is a pre-render or post-render graph.
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.graph.core.Controller.TYPE_CHECKING">
<span class="sig-name descname">
<span class="pre">
TYPE_CHECKING
<em class="property">
<span class="w">
<span class="p">
<span class="pre">
=
<span class="w">
<span class="pre">
True
<dd>
<p>
If True then verbose type checking will happen in various locations so that more legible error messages can
be emitted. Set it to False to run a little bit faster, with errors just reporting raw Python error messages.
<footer>
<hr/>
| 20,631 |
omni.graph.core.create_node_type.md | # create_node_type
## create_node_type
```markdown
create_node_type(func: Optional[callable] = None, * , unique_name: Optional[str] = None, ui_name: Optional[str] = None, add_execution_pins: bool = False, metadata: Optional[Any] = None)
```markdown
- **func**: Optional[callable] = None
- **unique_name**: Optional[str] = None
- **ui_name**: Optional[str] = None
- **add_execution_pins**: bool = False
- **metadata**: Optional[Any] = None
```markdown
<span class="pre">
[
<span class="pre">
dict
<span class="p">
<span class="pre">
[
<span class="pre">
str
<span class="p">
<span class="pre">
,
<span class="w">
<span class="pre">
str
<span class="p">
<span class="pre">
]
<span class="p">
<span class="pre">
]
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
None
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
callable
<dd>
<p>
Decorator to transform a Python function into an OmniGraph node type definition.
The decorator is configured to allow use with and without parameters. When used without parameters all of the
default values for the parameters are assumed.
<p>
If the function is called from the __main__ context, as it would if it were executed from the script editor or
from a file, then the decorator is assumed to be creating a short-lived node type definition and the default
module name “__autonode__” is applied to indicate this. Any attempts to save a scene containing these short-term
node types will be flagged as a warning.
<p class="rubric">
Examples
<div class="doctest highlight-default notranslate">
<div class="highlight">
<pre><span>
<span class="gp">>>>
<span class="gp">>>>
<span class="gp">>>>
<span class="go">>>>
<span class="gp">>>>
<span class="gp">>>>
<span class="gp">>>>
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
func
– the function object being wrapped. Should be a pure python function object or any other callable which
<li>
<p>
<strong>
form
(
<em>
has an `__annotations__` property. If "None" then the decorator was called using the parameterized
) –
<li>
<p>
<strong>
"@create_node_type
–
<li>
<p>
<strong>
unique_name
– Override the default unique name, which is the function name in the module namespace
<li>
<p>
<strong>
ui_name
– Name that appears in the node type’s menu and node display.
<li>
<p>
<strong>
add_execution_pins
– Include both input and output execution pins so that this can be used as a trigger node
<li>
<p>
<strong>
graph.
(
<em>
type in an action
) –
<li>
<p>
<strong>
metadata
– Dictionary of extra metadata to apply to the node type
<dt class="field-even">
Returns
<dd class="field-even">
<p>
Decorated version of the function that will create the node type definition
<footer>
<hr/>
| 3,049 |
omni.graph.core.create_prim_view_from_prims.md | # create_prim_view_from_prims
## create_prim_view_from_prims
Create a prim view from a list of prims
### Parameters
- **prims** – List of strings or Sdf.Paths of the prim location | 181 |
omni.graph.core.create_prim_view_from_query.md | # create_prim_view_from_query
## create_prim_view_from_query
### omni.graph.core.create_prim_view_from_query
```python
omni.graph.core.create_prim_view_from_query(include: list, exclude: list = []) -> omni.graph.core._omni_graph_core.IPrimView
```
Create a prim view from lists of tuples of (name, type) pairs, used to create a query that returns a subset of Prims in fabric.
Note that the prim view returned may not return any Prims until it has been applied to a graph.
#### Parameters
- **include** – Attributes that must exist on the Prim to be returned by the query.
- **exclude** – Attributes that must not exist on the Prim to be returned by the query. | 667 |
omni.graph.core.Database.md | # Database
## Overview
Base class for the generated database class for .ogn nodes (Python and C++ implementations).
Defines some common functionality that is the same for nodes of all types, to help cut down on the amount of redundant generated code.
Like the C++ equivalent, you can access the ABI data types normally passed to the compute as `db.abi_node()` and `db.abi_context()`.
Derived classes will have these class member variables instantiated, which are manipulated here in order to keep the amount of generated code to a minimum.
### Methods
- **__init__(node)**
- Initialize the helper classes for roles and sizes - attribute values are defined in the derived classes.
- **dynamic_attribute_data(node, port_type)**
- Gets the dynamic attribute data class stored on each node for a given port type.
- **get_internal_state(node, inst_id)**
- Returns the internal state information on the node, or None if it does not exist.
- **get_metadata(metadata_key[, attribute])**
- Get metadata related to this node.
### omni.graph.core.Database Methods
- **get_variable** *(name)*
- Get the value of a variable with a given name.
- **log_error** *(message[, add_context])*
- Log an error message from a compute method, for when the compute data is inconsistent or unexpected.
- **log_info** *(message)*
- Log an information message from a compute method, when status information is required about the compute.
- **log_warn** *(message)*
- Log a warning message from a compute method, when the compute is consistent but produced no results.
- **log_warning** *(message)*
- Log a warning message from a compute method, when the compute is consistent but produced no results.
- **move** *(dst, src)*
- Deprecated function.
- **per_instance_internal_state** *(node)*
- Returns the internal state information on the node, or None if it does not exist.
- **per_node_data** *(node)*
- Returns the per-node data for the given node.
- **per_node_errors** *(node)*
- Returns the compute errors on the node, or [] if it does not exist.
- **per_node_internal_state** *(node)*
- (No description provided)
- **set_dynamic_attribute_memory_location** *(on_gpu)*
- Set the memory location from which dynamic attribute values will be retrieved.
- **set_variable** *(name, value)*
- Set the value of a variable.
- **shared_internal_state** *(node)*
- Returns the internal state information on the node, or None if it does not exist.
### omni.graph.core.Database Attributes
- **INTERFACE**
- Attribute interface definition - things that don't change between nodes of the same type.
- **PER_NODE_DATA**
- (Incomplete data)
- **PER_NODE_DATA**
- Dictionary for data that is different on every node of the same type.
- **ROLE_BUNDLE**
- DEPRECATED - use omni.graph.core.AttributeRole.BUNDLE
- **ROLE_COLOR**
- DEPRECATED - use omni.graph.core.AttributeRole.COLOR
- **ROLE_EXECUTION**
- DEPRECATED - use omni.graph.core.AttributeRole.EXECUTION
- **ROLE_FRAME**
- DEPRECATED - use omni.graph.core.AttributeRole.FRAME
- **ROLE_MATRIX**
- DEPRECATED - use omni.graph.core.AttributeRole.MATRIX
- **ROLE_NORMAL**
- DEPRECATED - use omni.graph.core.AttributeRole.NORMAL
- **ROLE_OBJECT_ID**
- DEPRECATED - use omni.graph.core.AttributeRole.OBJECT_ID
- **ROLE_PATH**
- DEPRECATED - use omni.graph.core.AttributeRole.PATH
- **ROLE_POINT**
- DEPRECATED - use omni.graph.core.AttributeRole.POSITION
- **ROLE_QUATERNION**
- DEPRECATED - use omni.graph.core.AttributeRole.QUATERNION
- **ROLE_TARGET**
- DEPRECATED - use omni.graph.core.AttributeRole.TARGET
- **ROLE_TEXCOORD**
- DEPRECATED - use omni.graph.core.AttributeRole.TEXCOORD
- **ROLE_TIMECODE**
- DEPRECATED - use omni.graph.core.AttributeRole.TIMECODE
- **ROLE_TRANSFORM**
- DEPRECATED - use omni.graph.core.AttributeRole.FRAME
- **ROLE_VECTOR**
- DEPRECATED - use omni.graph.core.AttributeRole.VECTOR
- **abi_context**
- (No description provided)
| Property | Description |
|----------|-------------|
| abi_context | The graph context to which this database belongs |
| abi_node | The node to which this database belongs |
| internal_state | The internal state data on the node owning this database |
| per_instance_state | The internal state data on the node owning this database |
| shared_state | The internal state data on the node owning this database |
### __init__
Initialize the helper classes for roles and sizes - attribute values are defined in the derived classes
**Parameters:**
- **node** – Node to which the database belongs
### dynamic_attribute_data
Gets the dynamic attribute data class stored on each node for a given port type
**Parameters:**
- **node** – Node on which the dynamic attributes should be found
- **port_type** – Port type for the dynamic attributes to retrieve
**Returns:**
- Interface to the dynamic attributes on the given node
**Return type:**
- DynamicAttributeInterface
### get_internal_state
### Database Methods
#### get_internal_state(node: Node, inst_id: str)
Returns the internal state information on the node, or None if it does not exist.
**Parameters:**
- **node** – Node for which the internal state is to be retrieved
**Returns:**
- Internal state object attached to the given node
**Return type:**
- Any
#### get_metadata(metadata_key: str, attribute: Optional[Attribute] = None)
Get metadata related to this node.
**Parameters:**
- **metadata_key** – Name of the metadata value to return
- **attribute** – Attribute on which the metadata lives. If None then look at the node type’s metadata
**Returns:**
- Metadata value string, or None if the named metadata key did not exist
**Return type:**
- str | None
#### get_variable(name: str)
Get the value of a variable with a given name. Returns None if the variable does not exist on the graph.
**Parameters:**
- **name** – Name of the variable to retrieve
**Returns:**
- Value of the variable, or None if it does not exist on this node’s graph
**Return type:**
- Any
#### log_error(message: str)
Logs an error message.
**Parameters:**
- **message** – The error message to log
### log_error
Log an error message from a compute method, for when the compute data is inconsistent or unexpected.
**Parameters**
- **message** – Text of the message to log
- **add_context** – If True then add the stack trace from the location of the log report
### log_info
Log an information message from a compute method, when status information is required about the compute. Usually the compute will be successful, the information is for debugging or analysis.
**Parameters**
- **message** – Text of the message to log
### log_warn
Log a warning message from a compute method, when the compute is consistent but produced no results. This method is identical to log_warning; both exist because there are different conventions in other code about which name to use, so to avoid wasted developer time fixing unimportant incorrect guesses both are implemented.
**Parameters**
- **message** – Text of the message to log
### log_warning
Log a warning message from a compute method, when the compute is consistent but produced no results. This method is identical to log_warn; both exist because there are different conventions in other code about which name to use, so to avoid wasted developer time fixing unimportant incorrect guesses both are implemented.
**Parameters**
- **message** – Text of the message to log
### move
Deprecated function. Will perform a copy instead of moving.
**Parameters**
- **dst** – Attribute
- **src** – Attribute
### per_instance_internal_state(node: Node)
Returns the internal state information on the node, or None if it does not exist
**Parameters**
- **node** – Node for which the internal state is to be retrieved
**Returns**
- Internal state object attached to the given node
**Return type**
- Any
### per_node_data(node: Node)
Returns the per-node data for the given node
**Parameters**
- **node** – OmniGraph node for which the data is to be retrieved
**Raises**
- **og.OmniGraphError** – If the per-node data is missing, most likely because the node is not initialized
### per_node_errors(node: Node)
Returns the compute errors on the node, or [] if it does not exist
**Parameters**
- **node** – Node for which the errors are to be retrieved
**Returns**
- List of errors reported on the node
**Return type**
- list[str]
### set_dynamic_attribute_memory_location(on_gpu: bool, gpu_ptr_kind: ~omni.graph.core._omni_graph_core.PtrToPtrKind = <PtrToPtrKind.NA: 0>)
Set the memory location from which dynamic attribute values will be retrieved
**Parameters**
- **on_gpu** – If true the data will be returned from GPU memory, else from CPU memory
- **gpu_ptr_kind** – (Default is <PtrToPtrKind.NA: 0>)
**gpu_ptr_kind** – Ignored for CPU memory. For GPU memory specifies whether attribute data will be returned as a GPU pointer to the GPU memory, or a CPU pointer to the GPU memory.
## set_variable
```python
set_variable(name: str, value: Any)
```
Set the value of a variable. `og.OmniGraphError` will be raised if the variable does not exist on the graph, or if there is type mismatch.
### Parameters
- **name** – Name of the variable to set
- **value** – New value for the variable
### Raises
- **OmniGraphError** – If the variable did not exist or could not be set
## shared_internal_state
```python
classmethod shared_internal_state(node: Node)
```
Returns the internal state information on the node, or None if it does not exist.
### Parameters
- **node** – Node for which the internal state is to be retrieved
### Returns
- Internal state object attached to the given node
### Return type
- Any
## INTERFACE
```python
INTERFACE = {}
```
Attribute interface definition - things that don’t change between nodes of the same type.
## PER_NODE_DATA
```python
PER_NODE_DATA = {}
```
Dictionary for data that is different on every node of the same type.
## ROLE_BUNDLE
DEPRECATED - use `omni.graph.core.AttributeRole.BUNDLE`
## ROLE_COLOR
DEPRECATED - use `omni.graph.core.AttributeRole.COLOR`
## ROLE_EXECUTION
DEPRECATED - use `omni.graph.core.AttributeRole.EXECUTION`
## ROLE_FRAME
DEPRECATED - use `omni.graph.core.AttributeRole.FRAME`
- **ROLE_FRAME**
- DEPRECATED - use omni.graph.core.AttributeRole.FRAME
- **ROLE_MATRIX**
- DEPRECATED - use omni.graph.core.AttributeRole.MATRIX
- **ROLE_NORMAL**
- DEPRECATED - use omni.graph.core.AttributeRole.NORMAL
- **ROLE_OBJECT_ID**
- DEPRECATED - use omni.graph.core.AttributeRole.OBJECT_ID
- **ROLE_PATH**
- DEPRECATED - use omni.graph.core.AttributeRole.PATH
- **ROLE_POINT**
- DEPRECATED - use omni.graph.core.AttributeRole.POSITION
- **ROLE_QUATERNION**
- DEPRECATED - use omni.graph.core.AttributeRole.QUATERNION
- **ROLE_TARGET**
- DEPRECATED - use omni.graph.core.AttributeRole.TARGET
- **ROLE_TEXCOORD**
- DEPRECATED - use omni.graph.core.AttributeRole.TEXCOORD
- **ROLE_TIMECODE**
- DEPRECATED - use omni.graph.core.AttributeRole.TIMECODE
- **ROLE_TRANSFORM**
- DEPRECATED - use omni.graph.core.AttributeRole.FRAME
- **ROLE_VECTOR**
- DEPRECATED - use omni.graph.core.AttributeRole.VECTOR
- **abi_context**
- The graph context to which this database belongs
- Type: GraphContext
- **abi_node**
- The node to which this database belongs
- Type: Node
## Node
### internal_state
property internal_state
The internal state data on the node owning this database
Type: Any
### per_instance_state
property per_instance_state
The internal state data on the node owning this database
Type: Any
### shared_state
property shared_state
The internal state data on the node owning this database
Type: Any | 11,697 |
omni.graph.core.DataView.md | # DataView
## DataView
Helper class for getting and setting attribute data values. The setting operation is undoable.
Interfaces:
- force_usd_update
- get
- get_array_size
- gpu_ptr_kind
- set
All of the interface functions can either be called from an instantiation of this object or from a class method of the same name with an added attribute parameter that tells where to get and set values.
### Methods
- **__init__(*args, **kwargs)**
- Initializes the data view class to prepare it for evaluating or setting an attribute value. The arguments are flexible so that you can either construct an object that will persist its settings across all method calls, or you can pass in overrides to the method calls to use instead.
- **force_usd_update([force_update])**
- [Description not provided]
- **get(*args, **kwargs)**
- Returns the current value on the owned attribute.
- **get_array_size(*args, **kwargs)**
- Returns the current number of array elements on the owned attribute.
- **set(*args, **kwargs)**
- [Description not provided]
### Attributes
| Attribute | Description |
|--------------------------|-----------------------------------------------------------------------------------------------|
| `gpu_ptr_kind` | The memory location of pointers to GPU arrays |
### DataView Class Methods
#### `__init__(*args, **kwargs)`
Initializes the data view class to prepare it for evaluating or setting an attribute value. The arguments are flexible so that you can either construct an object that will persist its settings across all method calls, or you can pass in overrides to the method calls to use instead. In the case of class method calls, the values passed in will be the only ones used.
The “attribute” value can be used by keyword or positionally. All other arguments must specify their keyword.
```python
og.Controller(update_usd=True) # Good
og.Controller("inputs:attr") # Good
og.Controller(update_usd=True, attribute="inputs:attr") # Good
og.Controller("inputs:attr", True) # Bad
```
**Parameters:**
- **attribute** – (AttributeWithValue_t) Description of an attribute object with data that can be accessed
- **update_usd** – (bool) Should the modification to the value immediately update the USD? Defaults to True
- **undoable** – (bool) Is the modification to the value undoable? Defaults to True
- **on_gpu** – (bool) Is the data being modified on the GPU? Defaults to True
- **gpu_ptr_kind** – (og.PtrToPtrKind) How should GPU array data be returned? Defaults to True
- **instance** – (int) When working with instantiated graphs, an index representing the instance
#### `get(*args, **kwargs)`
Returns the current value on the owned attribute. This function can be called either from the class or using an instantiated object. The first argument is mandatory, being either the class or object. All others are by keyword or by position and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
**Parameters:**
- **obj** – Either cls or self depending on how the function was called
- **attribute** – Attribute whose value is to be retrieved. If used in an object context and a value was provided in the constructor then this value overrides that value. It’s mandatory, so if it was not provided in the constructor or here then an error is raised.
- **on_gpu** – Is the value stored on the GPU?
- **reserved_element_count** – For array attributes, if not None then the array will pre-reserve this many elements
- **return_type** – (Type) The type of the return value
<details>
<summary>展开查看转换后的markdown格式数据
### Attributes
- **array_wrap**
- For array attributes this specifies how the return data is to be wrapped.
- **gpu_ptr_kind**
- Type of data to return for GPU arrays (only used if on_gpu=True)
- **instance**
- When working with instantiated graphs, an index representing the instance
### Raises
- **OmniGraphError**
- If the current attribute is not valid or its value could not be retrieved
### get_array_size(*args, **kwargs)
- Returns the current number of array elements on the owned attribute.
- This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
#### Parameters
- **obj**
- Either cls or self depending on how get_array_size() was called
- **attribute**
- Attribute whose size is to be retrieved. If used in an object context and a value was provided in the constructor then this value overrides that value. It’s mandatory, so if it was not provided in the constructor or here then an error is raised.
#### Raises
- **OmniGraphError**
- If the current attribute is not valid or is not an array type
### set(*args, **kwargs)
- Sets the current value on the owned attribute. This is an undoable action.
- This function can be called either from the class or using an instantiated object. Both the attribute and value argument are mandatory and will raise an error if omitted. The attribute value may optionally be set through the constructor instead, if this function is called from an object context. These arguments may be set positionally or by keyword. The remaining arguments are optional but must be specified by keyword only. In an object context the defaults will be taken from the constructor, else they will use the function defaults.
#### Example
```python
og.Controller.set("inputs:attr", new_value) # Good
og.Controller("inputs:attr").set(new_value) # Good
og.Controller.set("inputs:attr") # Bad - missing value
og.Controller.set("inputs:attr", new_value, undoable=False) # Good
og.Controller("inputs:attr", undoable=False).set(new_value) # Good
```
#### Parameters
- **obj**
- Either cls or self depending on how the function was called
- **attribute**
- Attribute whose value is to be set. If used in an object context and a value was provided
```
- **set_attribute**(*attribute_name*, *value*, *on_gpu=False*, *update_usd=False*, *undoable=True*, *gpu_ptr_kind=None*)
- **attribute_name** – The name of the attribute to set. It’s mandatory, so if it was not provided in the constructor or here then an error is raised.
- **value** – The new value for the attribute. It’s mandatory, so if it was not provided in the constructor or here then an error is raised.
- **on_gpu** – Is the value stored on the GPU?
- **update_usd** – Should the value immediately propagate to USD?
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten
- **gpu_ptr_kind** – Type of data to expect for GPU arrays (only used if on_gpu=True)
- **Returns**
- True if the value was set successfully
- **Return type**
- bool
- **Raises**
- **OmniGraphError** – If the current attribute is not valid or could not be set to the given value
- **gpu_ptr_kind** : PtrToPtrKind
- The memory location of pointers to GPU arrays
- **Type**
- PtrToPtrKind | 7,302 |
omni.graph.core.DataWrapper.md | # DataWrapper
## DataWrapper
Wrapper around typed memory data.
This class provides no functionality for manipulating the data, only for inspecting it and extracting it for other code to manipulate it. e.g. you could extract CPU data as a numpy array and modify values, though you cannot change its size, or you could extract the pointer to the GPU data for passing in to a GPU-aware package like TensorFlow. External functions will perform these conversions.
### Attributes
- **memory**: Address of the data in the memory space
- **dtype**: Data type information for the individual data elements
- **shape**: Shape of the data
### shape
Array shape of the memory
### device
Device on which the memory is located.
### gpu_ptr_kind
Arrays of GPU pointers can either be on the GPU or the CPU, depending on where you want to reference them. If the shape is an array and device is cuda then this tells where ‘memory’ lives
### Methods
| Method | Description |
|--------|-------------|
| `__init__(memory, dtype, shape, device[, ...])` | Sets up the wrapper for the passed-in data. |
| `is_array()` | Checks to see if the data wrapped type is an array |
#### __init__(memory, dtype, shape, device[, gpu_ptr_kind=PtrToPtrKind.NA: 0])
Sets up the wrapper for the passed-in data.
**Parameters:**
- **memory** – Integer containing the memory address of the data
- **dtype** – Data type of the referenced data
- **shape** – Array shape of the referenced data
- **device** – Device on which the memory is located.
- **gpu_ptr_kind** – Location of pointers that point to GPU arrays
#### is_array()
Checks to see if the data wrapped type is an array
**Returns:**
- True iff the data shape indicates that it is an arbitrary sized array of some kind
**Return type:**
- bool | 1,771 |
omni.graph.core.data_shape_from_type.md | # data_shape_from_type
## data_shape_from_type
Return the dtype,shape information that corresponds to the given attribute type.
For easy testing gather sizes are set to 2 items and array sizes are set to 0 elements.
e.g. a gathered bool[] would return a shape of ((0, 0))
**Parameters**
- **attribute_type** – Type from which to infer the shape
- **is_gathered** – Is the data shape for an array of the attribute type?
**Returns**
Data type and shape corresponding to the attribute type
**Return type**
(Dtype, DataWrapperShapeTypes) | 537 |
omni.graph.core.deregister_node_type.md | # deregister_node_type
**Permalink to this heading**
## deregister_node_type
**Permalink to this definition**
**omni.graph.core.deregister_node_type**(name: str) → bool
Deregisters a python subnode type with OmniGraph.
**Parameters:**
- **name** (str) – Name of the Python node type being deregistered
**Returns:**
- True if the deregistration was successful, else False
**Return type:**
- bool | 400 |
omni.graph.core.deregister_post_load_file_format_upgrade_callback.md | # deregister_post_load_file_format_upgrade_callback
## deregister_post_load_file_format_upgrade_callback
```python
def deregister_post_load_file_format_upgrade_callback(postload_handle: int) -> None:
```
De-registers the postload callback to be invoked when the file format version changes.
**Parameters:**
- **postload_handle** (int) – The handle that was returned during the register_post_load_file_format_upgrade_callback call | 432 |
omni.graph.core.deregister_pre_load_file_format_upgrade_callback.md | # deregister_pre_load_file_format_upgrade_callback
## deregister_pre_load_file_format_upgrade_callback
```python
omni.graph.core.deregister_pre_load_file_format_upgrade_callback(preload_handle: int) -> None
```
De-registers the preload callback to be invoked when the file format version changes.
### Parameters
- **preload_handle** (int) – The handle that was returned during the register_pre_load_file_format_upgrade_callback call | 435 |
omni.graph.core.developer_mode_active.md | # developer_mode_active
## developer_mode_active
```python
omni.graph.core.developer_mode_active(ext_name: str) -> tuple[bool, list[str]]
```
Check to see if AutoNode developer mode is active on the given extension:
:param ext_name: Name of the extension to check
**Returns**
- is the extension in developer mode?, list[str]: List of import paths specified)
**Return type**
- (bool
``` | 390 |
omni.graph.core.Device.md | # Device
## Device
```python
class omni.graph.core.Device(device_name: str)
```
Bases: `object`
Device type for memory location of the data types
### Methods
| Method | Description |
|--------|-------------|
| `__init__(device_name)` | Initialize the device with the given name |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `cpu` | Is the device a CPU? |
| `cuda` | Is the device a GPU programmed with CUDA? |
```python
def __init__(device_name: str):
Initialize the device with the given name
```
```python
cpu: bool
cuda: bool
```
### Device Properties
#### cpu
- **Description**: Is the device a CPU?
- **Type**: bool
#### cuda
- **Description**: Is the device a GPU programmed with CUDA?
- **Type**: bool | 753 |
omni.graph.core.Dtype.md | # Dtype
## Dtype
```python
class omni.graph.core.Dtype(tuple_count: Optional[int] = None, size: Optional[int] = None, base_type: Optional[BaseDataType] = None, ctype: Optional[object] = None)
```
- `tuple_count`: Optional[int] = None
- `size`: Optional[int] = None
- `base_type`: Optional[BaseDataType] = None
- `ctype`: Optional[object] = None
```
## Attributes
- **tuple_count**
- The number of atomic elements in this type
- Type: int
- **size**
- The total size in bytes of this type
- Type: int
- **base_type**
- The base data type of this type
- Type: omni.graph.core._omni_graph_core.BaseDataType
- **ctype**
- The ctypes representation used by this data type in Fabric
- Type: object
## Methods
- **__init__**([tuple_count, size, base_type, ctype])
- **is_matrix_type**()
- Returns true if the dtype is a matrix.
## Attributes
- **base_type**
- **ctype**
- **size**
- **tuple_count**
### Dtype Class
#### `__init__(self, name: Optional[str] = None, base_type: Optional[BaseDataType] = None, ctype: Optional[object] = None)`
- **Parameters**:
- `name`: Optional[str] = None
- `base_type`: Optional[BaseDataType] = None
- `ctype`: Optional[object] = None
- **Returns**: None
#### `is_matrix_type()`
- **Returns**: bool
- **Description**: Returns true if the dtype is a matrix. Uses derived class knowledge to keep it simple. | 1,367 |
omni.graph.core.DynamicAttributeAccess.md | # DynamicAttributeAccess
## DynamicAttributeAccess
```
class omni.graph.core.DynamicAttributeAccess(context_id: GraphContext, node: Node, attributes, dynamic_attributes: DynamicAttributeInterface)
```
Bases: `object`
Base class for the generated classes that contain the access properties for all attributes. Each of the port containers, db.inputs/db.outputs/db.state, houses the attribute data access properties. These containers are constructed when the database is created, with hardcoded properties for all statically defined attributes. This class intercepts getattr/setattr/delattr calls to check to see if the property being requested is a dynamic attribute, and if so then it uses the properties stored in the per-node data as the access points.
So the lookup sequence goes like this:
- db -> og.Database
- .inputs -> ValuesForInput(DynamicAttributeAccess)
- .myAttribute -> DynamicAttributeAccess.__getattr__
-> ValuesForInput.__getattr__ (if the above fails)
It makes the bold assumption that the attributes are all set up nicely; no duplicate names, invalid types, missing configuration, etc.
Attributes use leading underscores to minimize name collisions with the dynamically added attributes. (Double underscores would have been preferable but would have made access from the derived classes problematic.)
```
### Attributes
#### _context
Graph context used for evaluating this node
#### _node
The OmniGraph node to which this data belongs
#### _attributes
The set of attributes on this object’s port
#### _dynamic_attributes
Container holding the per-node specification of dynamic attributes, not visible to derived classes
### Methods
| Method | Description |
|--------|-------------|
| `__init__(context_id, node, attributes, dynamic_attributes)` | Initialize common data used for all attribute port types |
| `get_dynamic_attributes()` | Get the interface to the dynamic attributes |
#### __init__(context_id, node, attributes, dynamic_attributes)
Initialize common data used for all attribute port types
**Parameters:**
- `context_id`: Context of the evaluation
- `node`: Node owning the attribute
- `attributes`: List of attributes belonging to this accessor
- `dynamic_attributes`: Interface to the dynamic attributes
#### get_dynamic_attributes()
Get the interface to the dynamic attributes
**Returns:**
- Direct access to the dynamic attributes managed by this class
<dd>
<p>
avoiding the __getattr__ override
<dt class="field-even">
Return type
<dd class="field-even">
<p>
DynamicAttributeInterface
<footer>
<hr/>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
| 2,685 |
omni.graph.core.DynamicAttributeInterface.md | # DynamicAttributeInterface
## DynamicAttributeInterface
Class providing a container for dynamic attribute access interfaces.
One of these objects is created per-node, per-port, to contain getter and setter properties on dynamic
attributes for their node and port type. These classes persist in the per-node data and their property
members are updated based on the addition and removal of dynamic attributes from their node. The base class
implementation for the attribute accessors, DynamicAttributeAccess, uses this to determine whether an attribute
access request was made on a static or dynamic attribute.
The per-node data on the database will contain one of these objects per port-type. When the database is
created it will be attached to the primary attribute access classes via the base class below,
DynamicAttributeAccess.
### _port_type
Type of port managed by this class (only one allowed per instance). Single underscore only so that
the base class of the attribute information can access it.
### _element_counts
Dictionary of str:int values which maps the names of dynamic output array attributes to the
of pending elements to allocate for their array data (required since Fabric takes the element
counter as an argument to the data retrieval so it can’t be set ahead of time). It is set when
a size is set, reset when a value is set, and read from Fabric when it’s value is requested.
The key values will be the special attribute name that has “_size” appended to it (until such
time as the attribute value can support size access itself).
### _interfaces
Dictionary of str:og.Attribute values which maps the names of a dynamic attribute to the actual
attribute on the node.
### Attributes
#### _on_gpu
If True then values are requested from the GPU memory, else the CPU memory
#### _gpu_ptr_kind
Ignored for CPU memory. For GPU memory specifies whether attribute data will be returned as a GPU pointer to the GPU memory, or a CPU pointer to the GPU memory.
### Methods
#### __init__(port_type)
Initialize the namespace used for attributes managed here
#### add_attribute(new_attribute)
Add in the interface for a newly created attribute.
#### get(property_name)
Returns the value of the named attribute
#### has_attribute(property_name)
Returns True if the given property name is a known dynamic attribute on this object
#### remove_attribute(old_attribute)
Remove the interface for a newly deleted attribute
#### set(property_name[, locked, new_value])
Sets the value of the named attribute
#### set_default_memory_location(on_gpu[, ...])
Set the default memory location from which dynamic attribute values will be retrieved.
#### __init__(port_type: AttributePortType)
Initialize the namespace used for attributes managed here
- Parameters:
- **port_type** – Port type for the dynamic attribute
#### add_attribute(new_attribute: Attribute)
Add in the interface for a newly created attribute.
- This creates a new attribute on this object named for the new attribute. The value of that attribute is a pair of functions that will get and set the value for that attribute.
Parameters
----------
new_attribute
- Attribute that was just added
Raises
------
og.OmniGraphError
- If the attribute has a mismatched port type
get
---
get(property_name: str) -> Any
Returns the value of the named attribute
Parameters
----------
property_name
- Name of the property within the namespace of this object’s port type
Returns
-------
Value of the attribute’s data
Return type
-----------
Any
Raises
------
og.OmniGraphError
- If the attribute is unknown
has_attribute
-------------
has_attribute(property_name: str) -> bool
Returns True if the given property name is a known dynamic attribute on this object
Parameters
----------
property_name
- Name of the property to look for
Returns
-------
True if a dynamic attribute of the given name exists here
Return type
-----------
bool
remove_attribute
----------------
remove_attribute(old_attribute: Attribute)
Remove the interface for a newly deleted attribute
Parameters
----------
old_attribute
- Attribute that is about to be removed
Raises
------
og.OmniGraphError
- If the attribute has a mismatched port type, or the property didn’t exist
set
---
set(property_name: str, locked: bool = False, new_value)
Sets the attribute with the given name and value, and optionally locks it
Parameters
----------
property_name
- Name of the property to set
locked
- If True, the attribute will be locked and cannot be modified
new_value
- The new value for the attribute
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
bool
<dd>
<p>
Sets the value of the named attribute
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
property_name
– Name of the property within the namespace of this object’s port type
<li>
<p>
<strong>
locked
– True if setting read-only values is currently locked (i.e. inside a compute)
<li>
<p>
<strong>
new_value
– Value to be set on the attribute with the given name
<dt class="field-even">
Raises
<dd class="field-even">
<ul class="simple">
<li>
<p>
<strong>
og.OmniGraphError
– If the attribute is unknown
<li>
<p>
<strong>
og.ReadOnlyError
– If writing is locked and the attribute is read-only
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
True if the value was set
<dt class="field-even">
Return type
<dd class="field-even">
<p>
bool
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.DynamicAttributeInterface.set_default_memory_location">
<span class="sig-name descname">
<span class="pre">
set_default_memory_location
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
on_gpu:
<span class="pre">
bool
,
<em class="sig-param">
<span class="n">
<span class="pre">
gpu_ptr_kind:
<span class="pre">
~omni.graph.core._omni_graph_core.PtrToPtrKind
<span class="pre">
=
<span class="pre">
<PtrToPtrKind.NA:
<span class="pre">
0>
<span class="sig-paren">
)
<dd>
<p>
Set the default memory location from which dynamic attribute values will be retrieved.
This is what will be used if you access dynamic attribute values in the same way you access regular
attribute values - e.g. value = db.inputs.dyn_attr.
<p>
The settings of the two flags will determine the type of memory returned for array attributes, such as float[],
double[3][], and matrixd[4][], and non-array attributes such as int[4], uint, and bool.
<p>
Array attributes
<table>
<colgroup>
<col style="width: 28%"/>
<col style="width: 36%"/>
<col style="width: 36%"/>
<thead>
<tr>
<th>
<th>
on_gpu=True
<th>
on_gpu=False
<tbody>
<tr>
<td>
og.PtrToPtrKind.CPU
<td>
CPU Pointers to GPU arrays
<td>
CPU Pointers to CPU arrays
<tr>
<td>
og.PtrToPtrKind.GPU
<td>
GPU Pointers to GPU arrays
<td>
CPU Pointers to CPU arrays
<tr>
<td>
og.PtrToPtrKind.NA
<td>
GPU Pointers to GPU arrays
<td>
CPU Pointers to CPU arrays
<p>
Non-Array attributes are always returned as CPU values.
<p>
There is currently no supported way of overriding these access methods. If not specified they will default to
everything being on the CPU.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
on_gpu
– If true then array attributes will be returned from GPU memory, else from CPU memory
<li>
<p>
<strong>
gpu_ptr_kind
– Determines if there is a CPU memory wrapper around the GPU allocated memory, as above.
| 8,578 |
omni.graph.core.eAccessLocation.md | # eAccessLocation
## eAccessLocation
Bases: `pybind11_object`
What type of non-attribute data does this node access
Members:
- E_USD : Accesses the USD stage data
- E_GLOBAL : Accesses data that is not part of the node or node type
- E_STATIC : Accesses data that is shared by every instance of a particular node type
- E_TOPOLOGY : Accesses information on the topology of the graph to which the node belongs
### Methods
- `__init__(self, value)`
### Attributes
- `E_GLOBAL`
- `E_STATIC`
- `E_TOPOLOGY`
- `E_USD`
- `name`
- `value`
## Method: __init__
```
__init__(self: omni.graph.core._omni_graph_core.eAccessLocation, value: int) -> None
## Property: name
```
property name
``` | 690 |
omni.graph.core.eAccessType.md | # eAccessType
## eAccessType
```python
class omni.graph.core.eAccessType
```
Bases: `pybind11_object`
How does the node access the data described by the enum eAccessLocation
Members:
- E_NONE: There is no access to data of the associated type
- E_READ: There is only read access to data of the associated type
- E_WRITE: There is only write access to data of the associated type
- E_READ_WRITE: There is both read and write access to data of the associated type
### Methods
```python
__init__(self, value)
```
### Attributes
- `E_NONE`
- `E_READ`
- `E_READ_WRITE`
- `E_WRITE`
- `name`
- `value`
### __init__
__init__(self: omni.graph.core._omni_graph_core.eAccessType, value: int) -> None
### name
property name | 717 |
omni.graph.core.eComputeRule.md | # eComputeRule
## eComputeRule
```python
class omni.graph.core.eComputeRule
```
Bases: `pybind11_object`
How the node is allowed to be computed
Members:
- E_DEFAULT : Nodes are computed according to the default evaluator rules
- E_ON_REQUEST : The evaluator may skip computing this node until explicitly requested with INode::requestCompute
### Methods
```python
__init__(self, value)
```
### Attributes
- `E_DEFAULT`
- `E_ON_REQUEST`
- `name`
- `value`
```
## __init__
```python
__init__(self: omni.graph.core._omni_graph_core.eComputeRule, value)
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dt class="sig sig-object py" id="omni.graph.core.eComputeRule.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
| 1,195 |
omni.graph.core.eComputeRule_omni.graph.core.eComputeRule.md | # eComputeRule
## eComputeRule
```python
class omni.graph.core.eComputeRule
```
Bases: `pybind11_object`
How the node is allowed to be computed
Members:
- E_DEFAULT : Nodes are computed according to the default evaluator rules
- E_ON_REQUEST : The evaluator may skip computing this node until explicitly requested with INode::requestCompute
### Methods
```python
__init__(self, value)
```
### Attributes
- `E_DEFAULT`
- `E_ON_REQUEST`
- `name`
- `value`
```
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.eComputeRule.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<dd>
<footer>
<hr/>
| 1,133 |
omni.graph.core.ePurityStatus.md | # ePurityStatus
## ePurityStatus
- **Bases**: `pybind11_object`
The purity of the node implementation. For some context, a “pure” node is one whose initialize, compute, and release methods are entirely deterministic, i.e. they will always produce the same output attribute values for a given set of input attribute values, and do not access, rely on, or otherwise mutate data external to the node’s scope.
### Members
- **E_IMPURE**: Node is assumed to not be pure
- **E_PURE**: Node can be considered pure if explicitly specified by the node author
### Methods
- `__init__(self, value)`
### Attributes
- **E_IMPURE**
- **E_PURE**
- `name`
- `value`
```
<span class="pre">
omni.graph.core._omni_graph_core.ePurityStatus
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<a class="headerlink" href="#omni.graph.core.ePurityStatus.__init__" title="Permalink to this definition">
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.ePurityStatus.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<a class="headerlink" href="#omni.graph.core.ePurityStatus.name" title="Permalink to this definition">
<dd>
<footer>
<hr/>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
| 1,605 |
omni.graph.core.ePurityStatus_omni.graph.core.ePurityStatus.md | # ePurityStatus
## ePurityStatus
- **Bases**: `pybind11_object`
- **Description**: The purity of the node implementation. For some context, a “pure” node is one whose initialize, compute, and release methods are entirely deterministic, i.e. they will always produce the same output attribute values for a given set of input attribute values, and do not access, rely on, or otherwise mutate data external to the node’s scope.
- **Members**:
- `E_IMPURE`: Node is assumed to not be pure.
- `E_PURE`: Node can be considered pure if explicitly specified by the node author.
### Methods
- `__init__(self, value)`:
### Attributes
- `E_IMPURE`
- `E_PURE`
- `name`
- `value` | 674 |
omni.graph.core.eThreadSafety.md | # eThreadSafety
## eThreadSafety
```python
class omni.graph.core.eThreadSafety
```
Bases: `pybind11_object`
How thread safe is the node during evaluation
Members:
- E_SAFE : Nodes can be evaluated in multiple threads safely
- E_UNSAFE : Nodes cannot be evaluated in multiple threads safely
- E_UNKNOWN : The thread safety status of the node type is unknown
### Methods
- `__init__(self, value)`
### Attributes
- `E_SAFE`
- `E_UNKNOWN`
- `E_UNSAFE`
- `name`
- `value`
## __init__
```python
__init__(self, value)
```
:
omni.graph.core._omni_graph_core.eThreadSafety
value : int
)
→ None
property
name | 610 |
omni.graph.core.eVariableScope.md | # eVariableScope
## eVariableScope
```
Bases: `pybind11_object`
Scope in which the variable has been made available
Members:
- E_PRIVATE : Variable is accessible only to its graph
- E_READ_ONLY : Variable can be read by other graphs
- E_PUBLIC : Variable can be read/written by other graphs
### Methods
- `__init__(self, value)`
### Attributes
- `E_PRIVATE`
- `E_PUBLIC`
- `E_READ_ONLY`
- `name`
- `value`
:
omni.graph.core._omni_graph_core.eVariableScope
,
value : int
)
→ None
property
name | 499 |
omni.graph.core.ExecutionAttributeState.md | # ExecutionAttributeState
## Overview
Bases: `pybind11_object`
Current execution state of an attribute [DEPRECATED: See omni.graph.action.IActionGraph]
### Members
- DISABLED : Execution is disabled
- ENABLED : Execution is enabled
- ENABLED_AND_PUSH : Output attribute connection is enabled and the node is pushed to the evaluation stack
- LATENT_PUSH : Push this node as a latent event for the current entry point
- LATENT_FINISH : Output attribute connection is enabled and the latent state is finished for this node
### Methods
- `__init__(self, value)`
### Attributes
- `DISABLED`
- `ENABLED`
- `ENABLED_AND_PUSH`
- `LATENT_FINISH`
- `LATENT_PUSH`
| name | value |
| ---- | ----- |
| name | |
| value | |
__init__(self: omni.graph.core._omni_graph_core.ExecutionAttributeState, value: int) -> None
property name | 834 |
omni.graph.core.ExtendedAttributeType.md | # ExtendedAttributeType
## ExtendedAttributeType
- **Bases:** `pybind11_object`
- **Description:** Extended attribute type, if any
### Members
- `EXTENDED_ATTR_TYPE_REGULAR` : Deprecated: use `og.ExtendedAttributeType.REGULAR`
- `EXTENDED_ATTR_TYPE_UNION` : Deprecated: use `og.ExtendedAttributeType.UNION`
- `EXTENDED_ATTR_TYPE_ANY` : Deprecated: use `og.ExtendedAttributeType.ANY`
- `REGULAR` : Attribute has a fixed data type
- `UNION` : Attribute has a list of allowable types of data
- `ANY` : Attribute can take any type of data
### Methods
- `__init__(self, value)`
### Attributes
- `ANY`
- `EXTENDED_ATTR_TYPE_ANY`
- `EXTENDED_ATTR_TYPE_REGULAR`
- `EXTENDED_ATTR_TYPE_UNION`
- `REGULAR`
- `UNION` | 708 |
omni.graph.core.ExtensionInformation.md | # ExtensionInformation
## Public Interface
- get_node_types_by_extension()
- get_nodes_by_extension()
## Methods
### `__init__()`
- Initialize the caches to be empty
### `get_node_types_by_extension()`
- Returns a tuple of two dictionaries.
### `get_nodes_by_extension()`
- Returns a tuple of three dictionaries.
## Attributes
### `KEY_UNKNOWN_EXTENSION`
## get_node_types_by_extension
```
```python
get_node_types_by_extension() -> Dict[str, List[str]]
```
Returns a tuple of two dictionaries. The first is the dictionary of enabled extensions to the list of nodes in the scene whose node types they implement, the second is the same thing for disabled extensions.
## get_nodes_by_extension
```python
get_nodes_by_extension() -> Tuple[Dict[str, List[str]], Dict[str, List[str]]]
```
Returns a tuple of three dictionaries.
- Map of enabled extensions to the list of nodes in the scene whose node types they implement
- Map of disabled extensions to the list of nodes in the scene whose node types they implement | 1,017 |
omni.graph.core.FileFormatVersion.md | # FileFormatVersion
## FileFormatVersion
- **Bases**: `pybind11_object`
- **Description**: Version number for the OmniGraph file format
### Methods
- `__init__(self, major_version, minor_version)`
- **Description**: Set up the values defining the file format version
### Attributes
- `majorVersion`
- **Description**: Major version, introduces incompatibilities
- `minorVersion`
- **Description**: Minor version, introduces compatible changes only
#### `__init__` Method
- **Parameters**:
- `self` : `omni.graph.core._omni_graph_core.FileFormatVersion`
- `major_version` : `int`
- `minor_version` : `int`
### omni.graph.core.FileFormatVersion.__init__
**Parameters**
- **major_version** (int) – Major version, introduces incompatibilities
- **minor_version** (int) – Minor version, introduces compatible changes only
#### Description
Set up the values defining the file format version
### omni.graph.core.FileFormatVersion.majorVersion
**Description**
Major version, introduces incompatibilities
### omni.graph.core.FileFormatVersion.minorVersion
**Description**
Minor version, introduces compatible changes only | 1,131 |
omni.graph.core.FunctionResult.md | # FunctionResult
## FunctionResult
```
class omni.graph.core.FunctionResult
```
Bases: pybind11_object
Value indicating whether a function call succeeded
Members:
- FAILURE : The function call failed
- SUCCESS : The function call succeeded
- DEFERRED : The action invoked by the function call has been deferred
### Methods
- __init__(self, value)
### Attributes
- DEFERRED
- FAILURE
- SUCCESS
- name
- value
__init__(self, value)
<em class="sig-param">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.FunctionResult
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.FunctionResult.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<dd>
<footer>
<hr/>
| 1,128 |
omni.graph.core.Functions.md | # omni.graph.core Functions
## Functions Summary:
| Function Name | Description |
|---------------|-------------|
| attribute_value_as_usd | Returns the value, converted into a type suitable for setting through the USD API compatible with |
| create_node_type | Decorator to transform a Python function into an OmniGraph node type definition. |
| data_shape_from_type | Return the dtype,shape information that corresponds to the given attribute type. |
| developer_mode_active | Check to see if AutoNode developer mode is active on the given extension: |
| get_graph_settings | Return the current settings for the graph. This is just a copy of the settings. Changing it will not |
| get_kit_version | Returns the currently running version of Kit as a tuple of (major, minor) numbers. |
| get_port_type_namespace | Returns a string representing the namespace attributes of the named port type reside in |
| in_compute | Mark block of code executed at runtime. Optimizations can apply like setting values without undo support. |
| is_attribute_plain_data | Is the given attribute numeric or string data? |
| is_in_compute | Mark entry of OmniGraph runtime computation. |
| python_value_as_usd | |
| Function Name | Description |
|---------------|-------------|
| python_value_as_usd | Converts the given python value to the equivalent USD value |
| resolve_base_coupled | Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth |
| resolve_fully_coupled | Resolves attribute types given a set of attributes which are fully type coupled |
| traverse_downstream_graph | Traverses the nodes downstream from the input nodes and apply the predicate on visited nodes |
| traverse_upstream_graph | Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes |
| acquire_interface | acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.graph.core._omni_graph_core.ComputeGraph |
| attach | attach(stage_id: int, mps: float) -> None |
| create_prim_view_from_prims | create_prim_view_from_prims(prims: list) -> omni.graph.core._omni_graph_core.IPrimView |
| create_prim_view_from_query | create_prim_view_from_query(include: list, exclude: list = []) -> omni.graph.core._omni_graph_core.IPrimView |
| deregister_node_type | deregister_node_type(name: str) -> bool |
| deregister_post_load_file_format_upgrade_callback | deregister_post_load_file_format_upgrade_callback(postload_handle: int) -> None |
| deregister_pre_load_file_format_upgrade_callback | deregister_pre_load_file_format_upgrade_callback(preload_handle: int) -> None |
| detach | detach() -> None |
| get_all_graphs | get_all_graphs() -> List[omni.graph.core._omni_graph_core.Graph] |
| get_all_graphs_and_subgraphs | get_all_graphs_and_subgraphs() -> List[omni.graph.core._omni_graph_core.Graph] |
| get_bundle_tree_factory_interface | get_bundle_tree_factory_interface() -> omni.graph.core._omni_graph_core.IBundleFactory |
| get_compute_cuda_device | get_compute_cuda_device() -> int |
| get_compute_graph_contexts | get_compute_graph_contexts() -> List[omni.graph.core._omni_graph_core.GraphContext] |
| get_global_orchestration_graphs | get_global_orchestration_graphs() -> List[omni.graph.core._omni_graph_core.Graph] |
| get_global_orchestration_graphs_in_pipeline_stage | get_global_orchestration_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph] |
| 方法名 | 描述 |
| --- | --- |
| get_graph_by_path | get_graph_by_path(path: str) -> object |
| get_graphs_in_pipeline_stage | get_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph] |
| get_node_by_path | get_node_by_path(path: str) -> object |
| get_node_categories_interface | get_node_categories_interface() -> omni.graph.core._omni_graph_core.INodeCategories |
| get_node_type | get_node_type(node_type_name: str) -> omni.graph.core._omni_graph_core.NodeType |
| get_node_type_forwarding_interface | get_node_type_forwarding_interface() -> omni::core::Api<omni::graph::core::unstable::INodeTypeForwarding_abi> |
| get_node_type_forwarding_interface2 | get_node_type_forwarding_interface2() -> omni::core::Api<omni::graph::core::INodeTypeForwarding2_abi> |
| get_registered_nodes | get_registered_nodes() -> List[str] |
| is_global_graph_prim | is_global_graph_prim(prim_path: str) -> bool |
| on_shutdown | on_shutdown() -> None |
| register_node_type | register_node_type(name: object, version: int) -> None |
| register_post_load_file_format_upgrade_callback | register_post_load_file_format_upgrade_callback(callback: object) -> int |
| register_pre_load_file_format_upgrade_callback | register_pre_load_file_format_upgrade_callback(callback: object) -> int |
| register_python_node | register_python_node() -> None |
| release_interface | release_interface(arg0: omni.graph.core._omni_graph_core.ComputeGraph) -> None |
| set_test_failure | set_test_failure(has_failure: bool) -> None |
| shutdown_compute_graph | shutdown_compute_graph() -> None |
| test_failure_count | test_failure_count() -> int |
| update | update(current_time: float, elapsed_time: float) -> None | | 5,291 |
omni.graph.core.get_all_graphs.md | # get_all_graphs
## get_all_graphs
```python
omni.graph.core.get_all_graphs() -> List[omni.graph.core._omni_graph_core.Graph]
```
Get all of the top-level non-orchestration graphs
**Returns:**
A list of the top level graphs (non-orchestration) in OmniGraph.
**Return type:**
list[omni.graph.core.Graph]
``` | 309 |
omni.graph.core.get_all_graphs_and_subgraphs.md | # get_all_graphs_and_subgraphs
## get_all_graphs_and_subgraphs
→ List[omni.graph.core._omni_graph_core.Graph]
### Description
Get all of the non-orchestration graphs
### Returns
- A list of the (non-orchestration) in OmniGraph.
### Return type
- list[omni.graph.core.Graph] | 279 |
omni.graph.core.get_bundle_tree_factory_interface.md | # get_bundle_tree_factory_interface
## get_bundle_tree_factory_interface
```python
omni.graph.core.get_bundle_tree_factory_interface()
```
Gets an object that can interface with an IBundleFactory
**Returns:**
Object that can interface with the bundle tree
**Return type:**
[omni.graph.core.IBundleFactory](omni.graph.core.IBundleFactory.html#omni.graph.core.IBundleFactory)
``` | 382 |
omni.graph.core.get_compute_cuda_device.md | # get_compute_cuda_device
## get_compute_cuda_device
```python
omni.graph.core.get_compute_cuda_device() -> int
```
Gets the CUDA device ID used by OmniGraph.
- **Returns**: The CUDA device used by OmniGraph.
- **Return type**: int
``` | 237 |
omni.graph.core.get_compute_graph_contexts.md | # get_compute_graph_contexts
## get_compute_graph_contexts
```python
omni.graph.core.get_compute_graph_contexts() -> List[omni.graph.core.GraphContext]
```
Gets all of the current graph contexts
**Returns:**
A list of all graph contexts in OmniGraph.
**Return type:**
list[omni.graph.core.GraphContext]
``` | 311 |
omni.graph.core.get_global_orchestration_graphs.md | # get_global_orchestration_graphs
## get_global_orchestration_graphs
```python
omni.graph.core.get_global_orchestration_graphs() -> List[omni.graph.core._omni_graph_core.Graph]
```
Gets the global orchestration graphs
**Returns:**
A list of the global orchestration graphs that house all other graphs.
**Return type:**
list[omni.graph.core.Graph]
``` | 354 |
omni.graph.core.get_global_orchestration_graphs_in_pipeline_stage.md | # get_global_orchestration_graphs_in_pipeline_stage
## get_global_orchestration_graphs_in_pipeline_stage
```python
omni.graph.core.get_global_orchestration_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core.GraphPipelineStage) -> List[omni.graph.core.Graph]
```
Returns a list of the global orchestration graphs that house all other graphs for a given pipeline stage.
**Parameters:**
- **pipeline_stage** (`omni.graph.core.GraphPipelineStage`) – The pipeline stage in question
**Returns:**
- A list of the global orchestration graphs in the given pipeline stage
**Return type:**
- list[`omni.graph.core.Graph`]
``` | 626 |
omni.graph.core.get_graphs_in_pipeline_stage.md | # get_graphs_in_pipeline_stage
## get_graphs_in_pipeline_stage
### omni.graph.core.get_graphs_in_pipeline_stage
→ List[omni.graph.core._omni_graph_core.Graph]
#### Parameters
- **pipeline_stage** (omni.graph.core.GraphPipelineStage) – The pipeline stage in question
#### Returns
- The list of graphs belonging to the pipeline stage
#### Return type
- list[omni.graph.core.Graph] | 382 |
omni.graph.core.get_graph_by_path.md | # get_graph_by_path
## get_graph_by_path
```python
omni.graph.core.get_graph_by_path(path: str) -> object
```
Finds the graph with the given path.
### Parameters
- **path** (str) – The path of the graph. For example “/World/PushGraph”
### Returns
- The matching graph, or None if it was not found.
### Return type
- [omni.graph.core.Graph](omni.graph.core.Graph.html#omni.graph.core.Graph)
``` | 398 |
omni.graph.core.get_graph_settings.md | # get_graph_settings
## get_graph_settings
### get_graph_settings
#### get_graph_settings
##### get_graph_settings
###### get_graph_settings
####### get_graph_settings
###### get_graph_settings
##### get_graph_settings
#### get_graph_settings
### get_graph_settings
## get_graph_settings
# get_graph_settings
| 334 |
omni.graph.core.get_kit_version.md | # get_kit_version
Returns the currently running version of Kit as a tuple of (major, minor) numbers.
## Returns
- Major, minor version of Kit running, or (0, 0) if the Kit version could not be determined.
## Return type
- (int, int) | 235 |
omni.graph.core.get_node_by_path.md | # get_node_by_path
## get_node_by_path
```python
omni.graph.core.get_node_by_path(path: str) -> object
```
Get a node that lives at a given path
**Parameters:**
- **path** (str) – Path at which to find the node
**Returns:**
- The node corresponding to a node path in OmniGraph, None if no node was found at that path.
**Return type:**
- [omni.graph.core.Node](omni.graph.core.Node.html#omni.graph.core.Node) | 412 |
omni.graph.core.get_node_categories_interface.md | # get_node_categories_interface
## get_node_categories_interface
```python
omni.graph.core.get_node_categories_interface()
```
- **Returns**: Object that can interface with the category data
- **Return type**: [omni.graph.core.INodeCategories](omni.graph.core.INodeCategories.html#omni.graph.core.INodeCategories)
Gets an object for accessing the node categories | 365 |
omni.graph.core.get_node_type.md | # get_node_type
## get_node_type
### omni.graph.core.get_node_type
Returns the registered node type object with the given name.
#### Parameters
- **node_type_name** (str) – Name of the registered NodeType to find and return
#### Returns
- NodeType object registered with the given name, None if it is not registered
#### Return type
- [omni.graph.core.NodeType](omni.graph.core.NodeType.html#omni.graph.core.NodeType) | 426 |
omni.graph.core.get_node_type_forwarding_interface.md | # get_node_type_forwarding_interface
## get_node_type_forwarding_interface
```python
omni.graph.core.get_node_type_forwarding_interface()
```
- **Deprecated:** Use `get_node_type_forwarding_interface2()` instead. | 214 |
omni.graph.core.get_node_type_forwarding_interface2.md | # get_node_type_forwarding_interface2
## get_node_type_forwarding_interface2
```python
omni.graph.core.get_node_type_forwarding_interface2()
```
- **Returns**: Object that can interface with the node type forward data
- **Return type**: [omni.graph.core.INodeTypeForwarding2](#omni.graph.core.INodeTypeForwarding2)
Gets an object for accessing the node type forwarding | 371 |
omni.graph.core.get_port_type_namespace.md | # get_port_type_namespace
## get_port_type_namespace
```
```markdown
omni.graph.core.get_port_type_namespace(port_type: AttributePortType) -> str
```
```markdown
Returns a string representing the namespace attributes of the named port type reside in
``` | 256 |
omni.graph.core.get_registered_nodes.md | # get_registered_nodes
## get_registered_nodes
```python
omni.graph.core.get_registered_nodes() -> List[str]
```
Get the currently registered node type names
**Returns:**
- The list of names of node types currently registered
**Return type:**
- list[str]
``` | 262 |
omni.graph.core.Graph.md | # Graph
## Class omni.graph.core.Graph
**Bases:** `pybind11_object`
Object containing everything necessary to execute a connected set of nodes.
### Methods
- **`__init__(*args, **kwargs)`**
- **`change_pipeline_stage(self, newPipelineStage)`**
- Change the pipeline stage that this graph is in (simulation, pre-render, post-render, on-demand)
- **`create_graph_as_node(self, name, path, ...)`**
- Creates a graph that is wrapped by a node in the current graph.
- **`create_node(self, path, node_type, use_usd)`**
- Given the path to the node and the type of the node, creates a node of that type at that path.
- **`create_subgraph(self, subgraphPath[, ...])`**
- Given the path to the subgraph, create the subgraph at that path.
- **`create_variable(self, name, type)`**
- Creates a variable on the graph.
- **deregister_error_status_change_callback** - De-registers the error status change callback to be invoked when the error status of nodes change during evaluation.
- **destroy_node**(self, node_path, update_usd) - Given the path to the node, destroys the node at that path.
- **evaluate**(self) - Tick the graph by causing it to evaluate.
- **find_variable**(self, name) - Find the variable with the given name in the graph.
- **get_context**(self) - Gets the context associated to the graph
- **get_default_graph_context**(self) - Gets the default context associated with this graph
- **get_evaluator_name**(self) - Gets the name of the evaluator being used on this graph
- **get_event_stream**(self) - Get the event stream the graph uses for notification of changes.
- **get_graph_backing_type**(self) - Gets the data type backing this graph
- **get_handle**(self) - Gets a unique handle identifier for this graph
- **get_instance_count**(self) - Gets the number of instances this graph has
- **get_node**(self, path) - Given a path to the node, returns the object for the node.
- **get_nodes**(self) - Gets the list of nodes currently in this graph
- **get_owning_compound_node**(self) - Returns the compound node for which this graph is the compound subgraph of.
- **get_parent_graph**(self) - Gets the immediate parent graph of this graph
| Method | Description |
|--------|-------------|
| `get_path_to_graph(self)` | Gets the path to this graph |
| `get_pipeline_stage(self)` | Gets the pipeline stage to which this graph belongs |
| `get_subgraph(self, path)` | Gets the subgraph living at the given path below this graph |
| `get_subgraphs(self)` | Gets the list of subgraphs under this graph |
| `get_variables(self)` | Returns the list of variables defined on the graph. |
| `inspect(self, inspector)` | Runs the inspector on the graph |
| `is_auto_instanced(self)` | Returns whether this graph is an auto instance or not. |
| `is_compound_graph(self)` | Returns whether this graph is a compound graph. |
| `is_disabled(self)` | Checks to see if the graph is disabled |
| `is_valid(self)` | Checks to see if the graph object is valid |
| `register_error_status_change_callback(self, ...)` | Registers a callback to be invoked after graph evaluation for all the nodes whose error status changed during the evaluation. |
| `reload_from_stage(self)` | Force the graph to reload by deleting it and re-parsing from the stage. |
| `reload_settings(self)` | Reload the graph settings. |
| `remove_variable(self, variable)` | Removes the given variable from the graph. |
| `rename_node(self, path, new_path)` | Given the path to the node, renames the node at that path. |
| Method | Description |
|--------|-------------|
| `rename_subgraph(self, path, new_path)` | Renames the path of a subgraph |
| `set_auto_instancing_allowed(self, arg0)` | Allows (or not) this graph to be an auto-instance, ie. |
| `set_disabled(self, disable)` | Sets whether this graph object is to be disabled or not. |
| `set_prim_view(self, view)` | Apply a view to a graph: a view is a way to dynamically maintain a list of instances for a graph. |
| `set_usd_notice_handling_enabled(self, enable)` | Sets whether this graph object has USD notice handling enabled. |
| `usd_notice_handling_enabled(self)` | Checks whether this graph has USD notice handling enabled. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `CURRENT_FILE_FORMAT_VERSION` | |
| `evaluation_mode` | The evaluation mode sets how the graph will be evaluated. |
### Methods
```python
__init__(self, *args, **kwargs)
```
```python
change_pipeline_stage(self, newPipelineStage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> None
```
Change the pipeline stage that this graph is in (simulation, pre-render, post-render, on-demand)
Parameters:
- `newPipelineStage` (omni.graph.core.GraphPipelineStage) – The new pipeline stage of the graph
```
## create_graph_as_node
```python
create_graph_as_node(self: omni.graph.core._omni_graph_core.Graph, name: str, path: str, evaluator: str, is_global_graph: bool, is_backed_by_usd: bool, backing_type: omni.graph.core._omni_graph_core.GraphBackingType, pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage, evaluation_mode: omni.graph.core._omni_graph_core.GraphEvaluationMode = <GraphEvaluationMode.GRAPH_EVALUATION_MODE_AUTOMATIC: 0>) -> omni.graph.core._omni_graph_core.Node
```
Creates a graph that is wrapped by a node in the current graph.
### Parameters
- **name** (str) – The name of the node
- **path** (str) – The path to the graph
- **evaluator** (str) – The name of the evaluator to use for the graph
- **is_global_graph** (bool) – Whether this is a global graph
- **is_backed_by_usd** (bool) – Whether the constructs are to be backed by USD
- **backing_type** (omni.graph.core.GraphBackingType) – The kind of cache backing this graph
- **pipeline_stage** (omni.graph.core.GraphPipelineStage) – What stage in the pipeline the global graph is at (simulation, pre-render, post-render)
- **evaluation_mode** (omni.graph.core.GraphEvaluationMode) – What mode to use when evaluating the graph
### Returns
- Node wrapping the graph that was created
### Return type
- omni.graph.core.Node
Given the path to the node and the type of the node, creates a node of that type at that path.
**Parameters**
- **path** (`str`) – The path to the node
- **node_type** (`str`) – The type of the node
- **use_usd** (`bool`) – Whether or not to create the USD backing for the node
**Returns**
- The newly created node
**Return type**
- omni.graph.core.Node
Given the path to the subgraph, create the subgraph at that path.
**Parameters**
- **subgraphPath** (`str`) – The path to the subgraph
- **evaluator** (`str`) – The evaluator type
- **createUsd** (`bool`) – Whether or not to create the USD backing for the node
**Returns**
- Subgraph object created for the given path.
**Return type**
- omni.graph.core.Graph
### Graph.create_variable
Creates a variable on the graph.
#### Parameters
- **name** (str) – The name of the variable
- **type** (omni.graph.core.Type) – The type of the variable to create.
#### Returns
A reference to the newly created variable, or None if the variable could not be created.
#### Return type
omni.graph.core.IVariable
### Graph.deregister_error_status_change_callback
De-registers the error status change callback to be invoked when the error status of nodes change during evaluation.
#### Parameters
- **status_change_handle** (int) – The handle that was returned during the register_error_status_change_callback call
### Graph.destroy_node
Given the path to the node, destroys the node at that path.
#### Parameters
- **node_path** (str) – The path to the node
- **update_usd** (bool) – Whether or not to destroy the USD backing for the node
## Graph Methods
### destroy
- **Description**: Destroys the node.
- **Returns**: True if the node was successfully destroyed
- **Return type**: bool
### evaluate
- **Description**: Tick the graph by causing it to evaluate.
- **Parameters**:
- `self` : omni.graph.core._omni_graph_core.Graph
- **Returns**: None
### find_variable
- **Description**: Find the variable with the given name in the graph.
- **Parameters**:
- `name` (str) – The name of the variable to find.
- **Returns**: The variable with the given name, or None if not found.
- **Return type**: omni.graph.core.IVariable | None
### get_context
- **Description**: Gets the context associated to the graph
- **Returns**: The context associated to the graph
- **Return type**: omni.graph.core.GraphContext
### get_default_graph_context
- **Description**: Gets the default context associated with this graph
- **Returns**: The default context associated with this graph
- **Return type**: omni.graph.core.GraphContext
### Returns
The default graph context associated with this graph.
### Return type
omni.graph.core.GraphContext
### get_evaluator_name
```python
get_evaluator_name(self: omni.graph.core._omni_graph_core.Graph) -> str
```
Gets the name of the evaluator being used on this graph
#### Returns
The name of the graph evaluator (dirty_push, push, execution)
#### Return type
str
### get_event_stream
```python
get_event_stream(self: omni.graph.core._omni_graph_core.Graph) -> carb.events._events.IEventStream
```
Get the event stream the graph uses for notification of changes.
#### Returns
Event stream to monitor for graph changes
#### Return type
carb.events.IEventStream
### get_graph_backing_type
```python
get_graph_backing_type(self: omni.graph.core._omni_graph_core.Graph) -> omni.graph.core._omni_graph_core.GraphBackingType
```
Gets the data type backing this graph
#### Returns
Returns the type of data structure backing this graph
#### Return type
omni.graph.core.GraphBackingType
### get_handle
```python
get_handle(self: omni.graph.core._omni_graph_core.Graph) -> int
```
Gets a unique handle identifier for this graph
#### Returns
Unique handle identifier for this graph
#### Return type
int
### get_instance_count
```python
get_instance_count(self: omni.graph.core._omni_graph_core.Graph) -> int
```
Gets the number of instances this graph has.
**Returns:**
- The number of instances the graph has (0 if the graph is standalone).
- **Return type:** int
### get_node
```python
get_node(self: omni.graph.core._omni_graph_core.Graph, path: str) -> omni.graph.core._omni_graph_core.Node
```
Given a path to the node, returns the object for the node.
**Parameters:**
- **path** (str) – The path to the node
**Returns:**
- Node object for the given path, None if it does not exist
- **Return type:** omni.graph.core.Node
### get_nodes
```python
get_nodes(self: omni.graph.core._omni_graph_core.Graph) -> List[omni.graph.core._omni_graph_core.Node]
```
Gets the list of nodes currently in this graph.
**Returns:**
- The nodes in this graph.
- **Return type:** list[omni.graph.core.Node]
### get_owning_compound_node
```python
get_owning_compound_node(self: omni.graph.core._omni_graph_core.Graph) -> ???
```
???
```
Returns the compound node for which this graph is the compound subgraph of.
Returns:
- (og.Node) If this graph is a compound graph, the owning compound node. Otherwise, this an invalid node is returned.
get_parent_graph(self: omni.graph.core._omni_graph_core.Graph) -> object
- Gets the immediate parent graph of this graph
- Returns: The immediate parent graph of this graph (may be None)
- Return type: omni.graph.core.Graph | None
get_path_to_graph(self: omni.graph.core._omni_graph_core.Graph) -> str
- Gets the path to this graph
- Returns: The path to this graph (may be empty).
- Return type: str
get_pipeline_stage(self: omni.graph.core._omni_graph_core.Graph) -> omni.graph.core._omni_graph_core.GraphPipelineStage
- Gets the pipeline stage to which this graph belongs
- Returns: The type of pipeline stage of this graph (simulation, pre-render, post-render)
- Return type: omni.graph.core.PipelineStage
get_subgraph(self: omni.graph.core._omni_graph_core.Graph, path: str) -> ...
- ...
## omni.graph.core._omni_graph_core.Graph
### get_subgraph
Gets the subgraph living at the given path below this graph
#### Parameters
- **path** (str) – Path to the subgraph to find
#### Returns
- Subgraph at the path, or None if not found
#### Return type
- omni.graph.core.Graph | None
### get_subgraphs
Gets the list of subgraphs under this graph
#### Returns
- List of graphs that are subgraphs of this graph
#### Return type
- list[omni.graph.core.Graph]
### get_variables
Returns the list of variables defined on the graph.
#### Returns
- The current list of variables on the graph.
#### Return type
- list[omni.graph.core.IVariable]
### inspect
Runs the inspector on the graph
#### Parameters
- **inspector** (omni.inspect.Inspector) – The inspector to run
#### Returns
- True if the inspector was successfully run on the graph, False if it is not supported
#### Return type
- bool
bool
is_auto_instanced(self: omni.graph.core._omni_graph_core.Graph) -> bool
Returns whether this graph is an auto instance or not. An auto instance is a graph that got merged as an instance with all other similar graphs in the stage.
- Returns: True if this graph is an auto instance
- Return type: bool
is_compound_graph(self: omni.graph.core._omni_graph_core.Graph) -> bool
Returns whether this graph is a compound graph. A compound graph is subgraph that controlled by a compound node.
- Returns: True if this graph is a compound graph
- Return type: bool
is_disabled(self: omni.graph.core._omni_graph_core.Graph) -> bool
Checks to see if the graph is disabled
- Returns: True if this graph object is disabled.
- Return type: bool
is_valid(self: omni.graph.core._omni_graph_core.Graph) -> bool
Checks to see if the graph object is valid
- Returns: True if this graph object is valid.
- Return type: bool
register_error_status_change_callback(self: omni.graph.core._omni_graph_core.Graph) -> bool
## omni.graph.core.Graph.register_error_status_change_callback
Registers a callback to be invoked after graph evaluation for all the nodes whose error status changed during the evaluation. The callback receives a list of the nodes whose error status changed.
### Parameters
- **callback** (callable) – The callback function
### Returns
A handle that can be used for deregistration. Note the calling module is responsible for deregistration of the callback in all circumstances, including where the extension is hot-reloaded.
### Return type
int
## omni.graph.core.Graph.reload_from_stage
Force the graph to reload by deleting it and re-parsing from the stage.
This is potentially destructive if you have internal state information in any nodes.
## omni.graph.core.Graph.reload_settings
Reload the graph settings.
## omni.graph.core.Graph.remove_variable
Removes the given variable from the graph.
### Parameters
- **variable** (omni.graph.core.IVariable) – The variable to remove.
### Returns
True if the variable was successfully removed, False otherwise.
### Return type
bool
## omni.graph.core.Graph.rename_node
### rename_node
```python
rename_node(self: omni.graph.core._omni_graph_core.Graph, path: str, new_path: str) -> bool
```
Given the path to the node, renames the node at that path.
**Parameters:**
- **path** (str) – The path to the node
- **new_path** (str) – The new path
**Returns:**
- True if the node was successfully renamed
**Return type:**
- bool
### rename_subgraph
```python
rename_subgraph(self: omni.graph.core._omni_graph_core.Graph, path: str, new_path: str) -> bool
```
Renames the path of a subgraph
**Parameters:**
- **path** (str) – Path to the subgraph being renamed
- **new_path** (str) – New path for the subgraph
### set_auto_instancing_allowed
```python
set_auto_instancing_allowed(self: omni.graph.core._omni_graph_core.Graph, arg0: bool) -> bool
```
Allows (or not) this graph to be an auto-instance, ie. to be executed vectorized as an instance amongst all other identical graph
**Parameters:**
- **allowed** (bool) – Whether this graph is allowed to be an auto instance.
### Returns
- Whether this graph was allowed to be an auto instance before this call.
### Return type
- bool
### set_disabled
- **Parameters**
- **disable** (bool) – True if the graph is to be disabled
### set_prim_view
- Apply a view to a graph: a view is a way to dynamically maintain a list of instances for a graph.
- **Parameters**
- **view** (IPrimViewPtr) – The view to apply to that graph
- **Returns**
- whether or not the view has been successfully applied to the graph.
- **Return type**
- bool
### set_usd_notice_handling_enabled
- Sets whether this graph object has USD notice handling enabled.
- **Parameters**
- **enable** (bool) – True to enable USD notice handling, False to disable.
### usd_notice_handling_enabled
- (self: omni.graph.core._omni_graph_core.Graph, enable: bool) -> None
## omni.graph.core.Graph.usd_notice_handling_enabled
Checks whether this graph has USD notice handling enabled.
### Returns
- True if USD notice handling is enabled on this graph.
- Return type: bool
## omni.graph.core.Graph.evaluation_mode
The evaluation mode sets how the graph will be evaluated.
- GRAPH_EVALUATION_MODE_AUTOMATIC - Evaluate the graph in Standalone mode when there are no relationships to it, otherwise it will be evaluated in Instanced mode.
- GRAPH_EVALUATION_MODE_STANDALONE - Evaluates the graph with the graph Prim as the graph target, and ignore Prims with relationships to the graph Prim. Use this mode when constructing self-contained graphs that evaluate independently.
- GRAPH_EVALUATION_MODE_INSTANCED - Evaluates only when the graph there are relationships from OmniGraphAPI interfaces. Each Prim with a relationship to the graph Prim will cause an evaluation, with the Graph Target set to path of Prim with the OmniGraphAPI interface. Use this mode when the graph represents as an asset or template that can be applied to multiple Prims.
### Type
- omni.graph.core.GraphEvaluationMode | 17,874 |
omni.graph.core.GraphBackingType.md | # GraphBackingType
## GraphBackingType
- **Bases:** `pybind11_object`
- **Description:** Location of the data backing the graph
### Members
- `GRAPH_BACKING_TYPE_FLATCACHE_SHARED` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_SHARED`
- `GRAPH_BACKING_TYPE_FLATCACHE_WITH_HISTORY` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY`
- `GRAPH_BACKING_TYPE_FLATCACHE_WITHOUT_HISTORY` : Deprecated: Use `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY`
- `GRAPH_BACKING_TYPE_FABRIC_SHARED` : Data is a regular Fabric instance
- `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY` : Data is a Fabric instance without any history
- `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY` : Data is a Fabric instance with a ring buffer of history
- `GRAPH_BACKING_TYPE_NONE` : No data is stored for the graph
- `GRAPH_BACKING_TYPE_UNKNOWN` : The data backing is not currently known
### Methods
- `__init__(self, value)`
### Attributes
- `GRAPH_BACKING_TYPE_FABRIC_SHARED`
- `GRAPH_BACKING_TYPE_FABRIC_WITHOUT_HISTORY`
- `GRAPH_BACKING_TYPE_FABRIC_WITH_HISTORY`
- `GRAPH_BACKING_TYPE_FLATCACHE_SHARED`
- `GRAPH_BACKING_TYPE_FLATCACHE_WITHOUT_HISTORY`
| GRAPH_BACKING_TYPE_FLATCACHE_WITH_HISTORY |
| --- |
| GRAPH_BACKING_TYPE_NONE |
| GRAPH_BACKING_TYPE_UNKNOWN |
| name |
| value |
### __init__
```python
__init__(self: omni.graph.core._omni_graph_core.GraphBackingType, value: int) -> None
```
### name
```
property name
```
``` | 1,405 |
omni.graph.core.GraphContext.md | # GraphContext
## GraphContext
- **Bases:** `pybind11_object`
- **Description:** Execution context for a graph
### Methods
- `__init__(*args, **kwargs)`
- `get_attribute_as_bool(self, attribute[, ...])` - Deprecated.
- `get_attribute_as_boolarray(self, attribute)` - Deprecated.
- `get_attribute_as_double(self, attribute[, ...])` - Deprecated.
- `get_attribute_as_doublearray(self, attribute)` - Deprecated.
- `get_attribute_as_float(self, attribute[, ...])` - Deprecated.
| 方法名 | 描述 |
| --- | --- |
| `get_attribute_as_floatarray(self, attribute)` | get_attribute_as_floatarray is deprecated. |
| `get_attribute_as_half(self, attribute[, ...])` | get_attribute_as_half is deprecated. |
| `get_attribute_as_halfarray(self, attribute)` | get_attribute_as_halfarray is deprecated. |
| `get_attribute_as_int(self, arg0, arg1, arg2, ...)` | get_attribute_as_int is deprecated. |
| `get_attribute_as_int64(self, attribute[, ...])` | get_attribute_as_int64 is deprecated. |
| `get_attribute_as_int64array(self, attribute)` | get_attribute_as_int64array is deprecated. |
| `get_attribute_as_intarray(self, arg0, arg1, ...)` | get_attribute_as_intarray is deprecated. |
| `get_attribute_as_nested_doublearray(self, ...)` | get_attribute_as_nested_doublearray is deprecated. |
| `get_attribute_as_nested_floatarray(self, ...)` | get_attribute_as_nested_floatarray is deprecated. |
| `get_attribute_as_nested_halfarray(self, ...)` | get_attribute_as_nested_halfarray is deprecated. |
| `get_attribute_as_nested_intarray(self, attribute)` | get_attribute_as_nested_intarray is deprecated. |
| `get_attribute_as_string(self, attribute[, ...])` | get_attribute_as_string is deprecated. |
| `get_attribute_as_uchar(self, attribute[, ...])` | get_attribute_as_uchar is deprecated. |
| `get_attribute_as_uchararray(self, attribute)` | get_attribute_as_uchararray is deprecated. |
- `get_attribute_as_uint(self, attribute[, ...])` is deprecated.
- `get_attribute_as_uint64(self, attribute[, ...])` is deprecated.
- `get_attribute_as_uint64array(self, attribute)` is deprecated.
- `get_attribute_as_uintarray(self, attribute)` is deprecated.
- `get_bundle(self, path)` - Get the bundle object as read-write.
- `get_elapsed_time(self)` - Returns the time between last evaluation of the graph and "now"
- `get_elem_count(*args, **kwargs)` - Overloaded function.
- `get_frame(self)` - Returns the global playback time in frames
- `get_graph(self)` - Gets the graph associated with this graph context
- `get_graph_target(self[, index])` - Get the Prim path of the graph target.
- `get_input_bundle(*args, **kwargs)` - Overloaded function.
- `get_input_target_bundles(self, node, ...[, ...])` - Get all input targets in the relationship with the given name on the specified compute node.
- `get_is_playing(self)` - Returns the state of global playback
- `get_output_bundle(*args, **kwargs)` - Overloaded function.
- `get_time(self)` - Returns the current time
Returns the global playback time
get_time_since_start(self)
Returns the elapsed time since the app started
inspect(self, inspector)
Runs the inspector on the graph context
is_valid(self)
Checks to see if this graph context object is valid
set_bool_attribute(self, arg0, arg1)
set_bool_attribute is deprecated.
set_boolarray_attribute(self, arg0, arg1)
set_boolarray_attribute is deprecated.
set_double_attribute(self, arg0, arg1)
set_double_attribute is deprecated.
set_double_matrix_attribute(self, arg0, arg1)
set_double_matrix_attribute is deprecated.
set_doublearray_attribute(self, arg0, arg1)
set_doublearray_attribute is deprecated.
set_float_attribute(self, arg0, arg1)
set_float_attribute is deprecated.
set_floatarray_attribute(self, arg0, arg1)
set_floatarray_attribute is deprecated.
set_half_attribute(self, arg0, arg1)
set_half_attribute is deprecated.
set_halfarray_attribute(self, arg0, arg1)
set_halfarray_attribute is deprecated.
set_int64_attribute(self, arg0, arg1)
set_int64_attribute is deprecated.
set_int64array_attribute(self, arg0, arg1)
set_int64array_attribute is deprecated.
set_int_attribute(self, arg0, arg1)
| Method | Description |
|--------|-------------|
| `set_int_attribute(self, arg0, arg1)` | set_int_attribute is deprecated. |
| `set_intarray_attribute(self, arg0, arg1)` | set_intarray_attribute is deprecated. |
| `set_nested_doublearray_attribute(self, arg0, ...)` | set_nested_doublearray_attribute is deprecated. |
| `set_nested_floatarray_attribute(self, arg0, arg1)` | set_nested_floatarray_attribute is deprecated. |
| `set_nested_halfarray_attribute(self, arg0, arg1)` | set_nested_halfarray_attribute is deprecated. |
| `set_nested_intarray_attribute(self, arg0, arg1)` | set_nested_intarray_attribute is deprecated. |
| `set_string_attribute(self, arg0, arg1)` | set_string_attribute is deprecated. |
| `set_uchar_attribute(self, arg0, arg1)` | set_uchar_attribute is deprecated. |
| `set_uchararray_attribute(self, arg0, arg1)` | set_uchararray_attribute is deprecated. |
| `set_uint64_attribute(self, arg0, arg1)` | set_uint64_attribute is deprecated. |
| `set_uint64array_attribute(self, arg0, arg1)` | set_uint64array_attribute is deprecated. |
| `set_uint_attribute(self, arg0, arg1)` | set_uint_attribute is deprecated. |
| `set_uintarray_attribute(self, arg0, arg1)` | set_uintarray_attribute is deprecated. |
| `write_bucket_to_backing(self, bucket_id)` | This method was internal, and is now obsolete: it does not function anymore. |
### omni.graph.core.GraphContext.__init__
```python
__init__(self, *args, **kwargs)
```
### omni.graph.core.GraphContext.get_attribute_as_bool
```python
get_attribute_as_bool(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> bool
```
get_attribute_as_bool is deprecated. Use og.Controller.get() instead.
### omni.graph.core.GraphContext.get_attribute_as_boolarray
```python
get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0)
```
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_boolarray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_boolarray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
numpy.ndarray
<span class="p">
<span class="pre">
[
<span class="pre">
bool
<span class="p">
<span class="pre">
]
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_boolarray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_boolarray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_double">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_double
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_double" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_double is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_doublearray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_doublearray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
numpy.ndarray
<span class="p">
<span class="pre">
[
<span class="pre">
numpy.float64
<span class="p">
<span class="pre">
]
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_float">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_float
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_float" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_float is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_floatarray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_floatarray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_floatarray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_floatarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_floatarray
```python
def get_attribute_as_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32]:
pass
```
**Deprecated:** Use `og.Controller.get()` instead.
### get_attribute_as_half
```python
def get_attribute_as_half(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float:
pass
```
**Deprecated:** Use `og.Controller.get()` instead.
### get_attribute_as_halfarray
```python
def get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float:
pass
```
**Deprecated:** Use `og.Controller.get()` instead.
```python
omni.graph.core._omni_graph_core.Attribute
```
```python
getDefault : bool = False
```
```python
write : bool = False
```
```python
writeElemCount : int = 0
```
```python
→ numpy.ndarray [numpy.float32]
```
```python
get_attribute_as_int(self : omni.graph.core._omni_graph_core.GraphContext, arg0 : omni.graph.core._omni_graph_core.Attribute, arg1 : bool, arg2 : bool, arg3 : int) → int
```
```markdown
get_attribute_as_int is deprecated. Use og.Controller.get() instead.
```
```python
get_attribute_as_int64(self : omni.graph.core._omni_graph_core.GraphContext, attribute : omni.graph.core._omni_graph_core.Attribute, getDefault : bool)
```
get_attribute_as_int64 is deprecated. Use og.Controller.get() instead.
get_attribute_as_int64array is deprecated. Use og.Controller.get() instead.
get_attribute_as_intarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_intarray
- **Parameters**:
- `arg0 : omni.graph.core._omni_graph_core.Attribute`
- `arg1 : bool`
- `arg2 : bool`
- `arg3 : int`
- **Returns**: `numpy.ndarray[numpy.int32]`
- **Note**: get_attribute_as_intarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_nested_doublearray
- **Parameters**:
- `self : omni.graph.core._omni_graph_core.GraphContext`
- `attribute : omni.graph.core._omni_graph_core.Attribute`
- `getDefault : bool = False`
- `write : bool = False`
- `writeElemCount : int = 0`
- **Returns**: `numpy.ndarray[numpy.float64]`
- **Note**: get_attribute_as_nested_doublearray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_nested_floatarray
- **Parameters**:
- `self : omni.graph.core._omni_graph_core.GraphContext`
- `attribute : omni.graph.core._omni_graph_core.Attribute`
- `getDefault : bool = False`
- `write : bool = False`
- `writeElemCount : int = 0`
- **Returns**: `numpy.ndarray[numpy.float32]`
- **Note**: get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead.
get_attribute_as_nested_floatarray(
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.float32]
get_attribute_as_nested_halfarray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.float32]
get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead.
get_attribute_as_nested_halfarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_nested_intarray
```python
get_attribute_as_nested_intarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.int32]
```
get_attribute_as_nested_intarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_string
```python
get_attribute_as_string(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> str
```
### get_attribute_as_string
get_attribute_as_string is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uchar
(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int
get_attribute_as_uchar is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uchararray
(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int
get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uchararray
- **Deprecated**: Use `og.Controller.get()` instead.
### get_attribute_as_uint
- **Deprecated**: Use `og.Controller.get()` instead.
### get_attribute_as_uint64
- **Deprecated**: Use `og.Controller.get()` instead.
### get_attribute_as_uint64
(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → int
get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uint64array
(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.uint64]
get_attribute_as_uint64array is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uintarray
(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.uint64]
get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uintarray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_uintarray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
,
<em class="sig-param">
<span class="n">
<span class="pre">
read
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
numpy.ndarray
<span class="p">
<span class="pre">
[
<span class="pre">
numpy.uint32
<span class="p">
<span class="pre">
]
<dd>
<p>
get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_bundle">
<span class="sig-name descname">
<span class="pre">
get_bundle
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
path
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<dd>
<p>
Get the bundle object as read-write.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
path
(
<em>
str
) – the path to the bundle
<dt class="field-even">
Returns
<dd class="field-even">
<p>
The bundle object at the path, None if there isn’t one
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
<a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core.IBundle2">
omni.graph.core.IBundle2
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elapsed_time">
<span class="sig-name descname">
<span class="pre">
get_elapsed_time
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<dd>
<p>
Returns the time between last evaluation of the graph and “now”
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
the elapsed time
<dt class="field-even">
Return type
<dd class="field-even">
<p>
float
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elem_count">
<span class="sig-name descname">
<span class="pre">
get_elem_count
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
### omni.graph.core.GraphContext.get_elem_count
Overloaded function.
1. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, attribute_data: omni::graph::core::Py_AttributeData) -> int
2. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int
get_elem_count is deprecated. Use og.Controller.get_array_size() instead.
```
```markdown
### omni.graph.core.GraphContext.get_frame
Returns the global playback time in frames
- **Returns**: the global playback time in frames
- **Return type**: float
```
```markdown
### omni.graph.core.GraphContext.get_graph
Gets the graph associated with this graph context
- **Returns**: The graph associated with this graph context.
- **Return type**: omni.graph.core.Graph
```
```markdown
### omni.graph.core.GraphContext.get_graph_target
Get the Prim path of the graph target.
The graph target is defined as the parent Prim of the compute graph, except during instancing - where OmniGraph executes a graph once for each Prim. In the case of instancing, the graph target will change at each execution to be the path of the instance. If this is called outside of graph execution, the path of the graph Prim is returned, or an empty token if the graph does not have a Prim associated with it.
- **Parameters**:
- **index** (int) – The index of instance to fetch. By default, the graph context index is used.
- **Returns**: The prim path of the current graph target.
- **Return type**: str
<p>
str
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_input_bundle">
<span class="sig-name descname">
<span class="pre">
get_input_bundle
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
<span class="sig-paren">
)
<a class="headerlink" href="#omni.graph.core.GraphContext.get_input_bundle" title="Permalink to this definition">
<dd>
<p>
Overloaded function.
<ol class="arabic">
<li>
<p>
get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IConstBundle2
<blockquote>
<div>
<p>
Get the bundle object as read only.
<dl class="simple">
<dt>
Args:
<dd>
<p>
path (str): the path to the bundle
<dt>
Returns:
<dd>
<p>
omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
<li>
<p>
get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IConstBundle2
<blockquote>
<div>
<p>
Get a bundle object that is an input attribute.
<dl class="simple">
<dt>
Args:
<dd>
<p>
node (omni.graph.core.Node): the node on which the bundle can be found
attribute_name (str): the name of the input attribute
instance (int): an instance index when getting value on an instantiated graph
<dt>
Returns:
<dd>
<p>
omni.graph.core.IConstBundle2: The bundle object at the path, None if there isn’t one
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_input_target_bundles">
<span class="sig-name descname">
<span class="pre">
get_input_target_bundles
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
node
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Node.html#omni.graph.core.Node" title="omni.graph.core._omni_graph_core.Node">
<span class="pre">
omni.graph.core._omni_graph_core.Node
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute_name
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
,
<em class="sig-param">
<span class="n">
<span class="pre">
instance
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
18446744073709551614
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<a class="reference internal" href="omni.graph.core.IConstBundle2.html#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2">
<span class="pre">
omni.graph.core._omni_graph_core.IConstBundle2
<span class="p">
<span class="pre">
]
<a class="headerlink" href="#omni.graph.core.GraphContext.get_input_target_bundles" title="Permalink to this definition">
<dd>
<p>
Get all input targets in the relationship with the given name on the specified compute node.
<p>
The targets are returned as bundle objects.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
node
(<a class="reference internal" href="omni.graph.core.Node.html#omni.graph.core.Node" title="omni.graph.core.Node"><em>omni.graph.core.Node
<li>
<p>
<strong>
attribute_name
(<em>str
<li>
<p>
<strong>
instance
(<em>int
<dt class="field-even">
Returns
<dd class="field-even">
<p>
The list of input targets, as bundle objects.
### Return type
- list[omni.graph.core.IConstBundle2]
### get_is_playing
- **Function**: get_is_playing(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns**:
- True if playback has started, False if playback is stopped
- **Return type**: bool
### get_output_bundle
- **Function**: get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, *args, **kwargs)
- **Description**: Overloaded function.
- 1. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IBundle2
- **Description**: Get a bundle object that is an output attribute.
- **Args**:
- path (str): the path to the bundle
- **Returns**: omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
- 2. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IBundle2
- **Description**: Get a bundle object that is an output attribute.
- **Args**:
- node (omni.graph.core.Node): the node on which the bundle can be found
- attribute_name (str): the name of the output attribute
- instance (int): an instance index when getting value on an instantiated graph
- **Returns**: omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
### get_time
- **Function**: get_time(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns**:
- the global playback time in seconds
- **Return type**: float
### get_time_since_start
- **Function**: get_time_since_start(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns**:
- the time since the start of global playback
- **Return type**: float
### get_time_since_start
Returns the elapsed time since the app started
#### Returns
- the number of seconds since the app started in seconds
#### Return type
- float
### inspect
Runs the inspector on the graph context
#### Parameters
- **inspector** (`omni.inspect.Inspector`) – The inspector to run
#### Returns
- True if the inspector was successfully run on the context, False if it is not supported
#### Return type
- bool
### is_valid
Checks to see if this graph context object is valid
#### Returns
- True if this object is valid
#### Return type
- bool
### set_bool_attribute
set_bool_attribute is deprecated. Use og.Controller.set() instead.
### set_boolarray_attribute
### set_boolarray_attribute
```python
set_boolarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[bool], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_boolarray_attribute is deprecated. Use og.Controller.set() instead.
### set_double_attribute
```python
set_double_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_double_attribute is deprecated. Use og.Controller.set() instead.
### set_double_matrix_attribute
```python
set_double_matrix_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_double_matrix_attribute is deprecated. Use og.Controller.set() instead.
### set_doublearray_attribute
```python
set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_doublearray_attribute is deprecated. Use og.Controller.set() instead.
### set_doublearray_attribute
```python
set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_doublearray_attribute is deprecated. Use og.Controller.set() instead.
### set_float_attribute
```python
set_float_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_float_attribute is deprecated. Use og.Controller.set() instead.
### set_floatarray_attribute
```python
set_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_floatarray_attribute is deprecated. Use og.Controller.set() instead.
### set_half_attribute
```python
set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_half_attribute is deprecated. Use og.Controller.set() instead.
### set_half_attribute
```python
def set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> None:
```
set_half_attribute is deprecated. Use og.Controller.set() instead.
### set_halfarray_attribute
```python
def set_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None:
```
set_halfarray_attribute is deprecated. Use og.Controller.set() instead.
### set_int64_attribute
```python
def set_int64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None:
```
set_int64_attribute is deprecated. Use og.Controller.set() instead.
### set_int64array_attribute
```python
def set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None:
```
set_int64array_attribute is deprecated. Use og.Controller.set() instead.
### set_int64array_attribute
```python
set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
- **Deprecated**: Use `og.Controller.set()` instead.
### set_int_attribute
```python
set_int_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
- **Deprecated**: Use `og.Controller.set()` instead.
### set_intarray_attribute
```python
set_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
- **Deprecated**: Use `og.Controller.set()` instead.
### set_nested_doublearray_attribute
```python
set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
- **Deprecated**: Use `og.Controller.set()` instead.
### set_nested_doublearray_attribute
```python
set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_floatarray_attribute
```python
set_nested_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_halfarray_attribute
```python
set_nested_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_intarray_attribute
```python
set_nested_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[int]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
**set_nested_intarray_attribute**(
**arg0**: List[List[int]],
**arg1**: omni.graph.core._omni_graph_core.Attribute
) -> None
**set_string_attribute**(
**self**: omni.graph.core._omni_graph_core.GraphContext,
**arg0**: str,
**arg1**: omni.graph.core._omni_graph_core.Attribute
) -> None
**set_uchar_attribute**(
**self**: omni.graph.core._omni_graph_core.GraphContext,
**arg0**: int,
**arg1**: omni.graph.core._omni_graph_core.Attribute
) -> None
**set_uchararray_attribute**(
**self**: omni.graph.core._omni_graph_core.GraphContext,
**arg0**: int
) -> None
---
**set_nested_intarray_attribute** is deprecated. Use og.Controller.set() instead.
**set_string_attribute** is deprecated. Use og.Controller.set() instead.
**set_uchar_attribute** is deprecated. Use og.Controller.set() instead.
**set_uchararray_attribute** is deprecated. Use og.Controller.set() instead.
### set_uchararray_attribute
```python
set_uchararray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uchararray_attribute is deprecated. Use og.Controller.set() instead.
### set_uint64_attribute
```python
set_uint64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uint64_attribute is deprecated. Use og.Controller.set() instead.
### set_uint64array_attribute
```python
set_uint64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uint64array_attribute is deprecated. Use og.Controller.set() instead.
### set_uint_attribute
```python
set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uint_attribute is deprecated. Use og.Controller.set() instead.
### set_uint_attribute
```python
set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uint_attribute is deprecated. Use og.Controller.set() instead.
### set_uintarray_attribute
```python
set_uintarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_uintarray_attribute is deprecated. Use og.Controller.set() instead.
### write_bucket_to_backing
```python
write_bucket_to_backing(self: omni.graph.core._omni_graph_core.GraphContext, bucket_id: omni::fabric::BucketId) -> None
```
This method was internal, and is now obsolete: it does not function anymore. In order to write back to USD, you can directly use the USD API.
``` | 49,523 |
omni.graph.core.GraphContext_omni.graph.core.GraphContext.md | # GraphContext
Execution context for a graph
## Methods
- `__init__(*args, **kwargs)`
- `get_attribute_as_bool(self, attribute[, ...])` - get_attribute_as_bool is deprecated.
- `get_attribute_as_boolarray(self, attribute)` - get_attribute_as_boolarray is deprecated.
- `get_attribute_as_double(self, attribute[, ...])` - get_attribute_as_double is deprecated.
- `get_attribute_as_doublearray(self, attribute)` - get_attribute_as_doublearray is deprecated.
- `get_attribute_as_float(self, attribute[, ...])` - get_attribute_as_float is deprecated.
| 方法名 | 描述 |
| --- | --- |
| `get_attribute_as_floatarray(self, attribute)` | get_attribute_as_floatarray is deprecated. |
| `get_attribute_as_half(self, attribute[, ...])` | get_attribute_as_half is deprecated. |
| `get_attribute_as_halfarray(self, attribute)` | get_attribute_as_halfarray is deprecated. |
| `get_attribute_as_int(self, arg0, arg1, arg2, ...)` | get_attribute_as_int is deprecated. |
| `get_attribute_as_int64(self, attribute[, ...])` | get_attribute_as_int64 is deprecated. |
| `get_attribute_as_int64array(self, attribute)` | get_attribute_as_int64array is deprecated. |
| `get_attribute_as_intarray(self, arg0, arg1, ...)` | get_attribute_as_intarray is deprecated. |
| `get_attribute_as_nested_doublearray(self, ...)` | get_attribute_as_nested_doublearray is deprecated. |
| `get_attribute_as_nested_floatarray(self, ...)` | get_attribute_as_nested_floatarray is deprecated. |
| `get_attribute_as_nested_halfarray(self, ...)` | get_attribute_as_nested_halfarray is deprecated. |
| `get_attribute_as_nested_intarray(self, attribute)` | get_attribute_as_nested_intarray is deprecated. |
| `get_attribute_as_string(self, attribute[, ...])` | get_attribute_as_string is deprecated. |
| `get_attribute_as_uchar(self, attribute[, ...])` | get_attribute_as_uchar is deprecated. |
| `get_attribute_as_uchararray(self, attribute)` | get_attribute_as_uchararray is deprecated. |
- `get_attribute_as_uint(self, attribute[, ...])` is deprecated.
- `get_attribute_as_uint64(self, attribute[, ...])` is deprecated.
- `get_attribute_as_uint64array(self, attribute)` is deprecated.
- `get_attribute_as_uintarray(self, attribute)` is deprecated.
- `get_bundle(self, path)` - Get the bundle object as read-write.
- `get_elapsed_time(self)` - Returns the time between last evaluation of the graph and "now"
- `get_elem_count(*args, **kwargs)` - Overloaded function.
- `get_frame(self)` - Returns the global playback time in frames
- `get_graph(self)` - Gets the graph associated with this graph context
- `get_graph_target(self[, index])` - Get the Prim path of the graph target.
- `get_input_bundle(*args, **kwargs)` - Overloaded function.
- `get_input_target_bundles(self, node, ...[, ...])` - Get all input targets in the relationship with the given name on the specified compute node.
- `get_is_playing(self)` - Returns the state of global playback
- `get_output_bundle(*args, **kwargs)` - Overloaded function.
- `get_time(self)` - Returns the current time of the graph context
Returns the global playback time
```python
get_time_since_start(self)
```
Returns the elapsed time since the app started
```python
inspect(self, inspector)
```
Runs the inspector on the graph context
```python
is_valid(self)
```
Checks to see if this graph context object is valid
```python
set_bool_attribute(self, arg0, arg1)
```
set_bool_attribute is deprecated.
```python
set_boolarray_attribute(self, arg0, arg1)
```
set_boolarray_attribute is deprecated.
```python
set_double_attribute(self, arg0, arg1)
```
set_double_attribute is deprecated.
```python
set_double_matrix_attribute(self, arg0, arg1)
```
set_double_matrix_attribute is deprecated.
```python
set_doublearray_attribute(self, arg0, arg1)
```
set_doublearray_attribute is deprecated.
```python
set_float_attribute(self, arg0, arg1)
```
set_float_attribute is deprecated.
```python
set_floatarray_attribute(self, arg0, arg1)
```
set_floatarray_attribute is deprecated.
```python
set_half_attribute(self, arg0, arg1)
```
set_half_attribute is deprecated.
```python
set_halfarray_attribute(self, arg0, arg1)
```
set_halfarray_attribute is deprecated.
```python
set_int64_attribute(self, arg0, arg1)
```
set_int64_attribute is deprecated.
```python
set_int64array_attribute(self, arg0, arg1)
```
set_int64array_attribute is deprecated.
```python
set_int_attribute(self, arg0, arg1)
```
set_int_attribute is deprecated.
| Method | Description |
|--------|-------------|
| set_int_attribute(self, arg0, arg1) | set_int_attribute is deprecated. |
| set_intarray_attribute(self, arg0, arg1) | set_intarray_attribute is deprecated. |
| set_nested_doublearray_attribute(self, arg0, ...) | set_nested_doublearray_attribute is deprecated. |
| set_nested_floatarray_attribute(self, arg0, arg1) | set_nested_floatarray_attribute is deprecated. |
| set_nested_halfarray_attribute(self, arg0, arg1) | set_nested_halfarray_attribute is deprecated. |
| set_nested_intarray_attribute(self, arg0, arg1) | set_nested_intarray_attribute is deprecated. |
| set_string_attribute(self, arg0, arg1) | set_string_attribute is deprecated. |
| set_uchar_attribute(self, arg0, arg1) | set_uchar_attribute is deprecated. |
| set_uchararray_attribute(self, arg0, arg1) | set_uchararray_attribute is deprecated. |
| set_uint64_attribute(self, arg0, arg1) | set_uint64_attribute is deprecated. |
| set_uint64array_attribute(self, arg0, arg1) | set_uint64array_attribute is deprecated. |
| set_uint_attribute(self, arg0, arg1) | set_uint_attribute is deprecated. |
| set_uintarray_attribute(self, arg0, arg1) | set_uintarray_attribute is deprecated. |
| write_bucket_to_backing(self, bucket_id) | This method was internal, and is now obsolete: it does not function anymore. |
### omni.graph.core.GraphContext.__init__
```python
__init__(self, *args, **kwargs)
```
### omni.graph.core.GraphContext.get_attribute_as_bool
```python
get_attribute_as_bool(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> bool
```
get_attribute_as_bool is deprecated. Use og.Controller.get() instead.
### omni.graph.core.GraphContext.get_attribute_as_boolarray
```python
get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0)
```
### get_attribute_as_boolarray
```python
get_attribute_as_boolarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[bool]
```
get_attribute_as_boolarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_double
```python
get_attribute_as_double(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float
```
get_attribute_as_double is deprecated. Use og.Controller.get() instead.
### get_attribute_as_doublearray
```python
get_attribute_as_doublearray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float[]
```
get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_doublearray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_doublearray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
numpy.ndarray
<span class="p">
<span class="pre">
[
<span class="pre">
numpy.float64
<span class="p">
<span class="pre">
]
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_doublearray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_doublearray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_float">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_float
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_float" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_float is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_floatarray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_floatarray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_floatarray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_floatarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_floatarray
```python
get_attribute_as_floatarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32]
```
- **Deprecated**: Use `og.Controller.get()` instead.
### get_attribute_as_half
```python
get_attribute_as_half(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float
```
- **Deprecated**: Use `og.Controller.get()` instead.
### get_attribute_as_halfarray
```python
get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> float
```
- **Deprecated**: Use `og.Controller.get()` instead.
```python
get_attribute_as_halfarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.float32]
```
get_attribute_as_halfarray is deprecated. Use og.Controller.get() instead.
```python
get_attribute_as_int(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute, arg1: bool, arg2: bool, arg3: int) -> int
```
get_attribute_as_int is deprecated. Use og.Controller.get() instead.
```python
get_attribute_as_int64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool)
```
get_attribute_as_int64 is deprecated. Use og.Controller.get() instead.
get_attribute_as_int64array is deprecated. Use og.Controller.get() instead.
get_attribute_as_intarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_intarray
```python
def get_attribute_as_intarray(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: omni.graph.core._omni_graph_core.Attribute,
arg1: bool,
arg2: bool,
arg3: int
) -> numpy.ndarray[numpy.int32]
```
get_attribute_as_intarray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_nested_doublearray
```python
def get_attribute_as_nested_doublearray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) -> numpy.ndarray[numpy.float64]
```
get_attribute_as_nested_doublearray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_nested_floatarray
```python
def get_attribute_as_nested_floatarray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) -> numpy.ndarray[numpy.float32]
```
get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead.
get_attribute_as_nested_floatarray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.float32]
get_attribute_as_nested_floatarray is deprecated. Use og.Controller.get() instead.
get_attribute_as_nested_halfarray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) → numpy.ndarray[numpy.float32]
get_attribute_as_nested_halfarray is deprecated. Use og.Controller.get() instead.
## get_attribute_as_nested_intarray
```python
get_attribute_as_nested_intarray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.int32]
```
get_attribute_as_nested_intarray is deprecated. Use og.Controller.get() instead.
## get_attribute_as_string
```python
get_attribute_as_string(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> str
```
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
str
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_string" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_string is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uchar">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_uchar
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
int
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_uchar" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_uchar is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uchararray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_uchararray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="omni.graph.core.Attribute.html#omni.graph.core.Attribute" title="omni.graph.core._omni_graph_core.Attribute">
<span class="pre">
omni.graph.core._omni_graph_core.Attribute
,
<em class="sig-param">
<span class="n">
<span class="pre">
getDefault
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
write
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
bool
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
False
,
<em class="sig-param">
<span class="n">
<span class="pre">
writeElemCount
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
<span class="w">
<span class="o">
<span class="pre">
=
<span class="w">
<span class="default_value">
<span class="pre">
0
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
int
<a class="headerlink" href="#omni.graph.core.GraphContext.get_attribute_as_uchararray" title="Permalink to this definition">
<dd>
<p>
get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uchararray
```python
get_attribute_as_uchararray(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> numpy.ndarray[numpy.uint8]
```
get_attribute_as_uchararray is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uint
```python
get_attribute_as_uint(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int
```
get_attribute_as_uint is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uint64
```python
get_attribute_as_uint64(self: omni.graph.core._omni_graph_core.GraphContext, attribute: omni.graph.core._omni_graph_core.Attribute, getDefault: bool = False, write: bool = False, writeElemCount: int = 0) -> int
```
get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uint64
```python
get_attribute_as_uint64(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) -> int
```
get_attribute_as_uint64 is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uint64array
```python
get_attribute_as_uint64array(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) -> numpy.ndarray[numpy.uint64]
```
get_attribute_as_uint64array is deprecated. Use og.Controller.get() instead.
### get_attribute_as_uintarray
```python
get_attribute_as_uintarray(
self: omni.graph.core._omni_graph_core.GraphContext,
attribute: omni.graph.core._omni_graph_core.Attribute,
getDefault: bool = False,
write: bool = False,
writeElemCount: int = 0
) -> numpy.ndarray[numpy.uint64]
```
get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead.
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_attribute_as_uintarray">
<span class="sig-name descname">
<span class="pre">
get_attribute_as_uintarray
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
numpy.ndarray
<span class="p">
<span class="pre">
[
<span class="pre">
numpy.uint32
<span class="p">
<span class="pre">
]
<dd>
<p>
get_attribute_as_uintarray is deprecated. Use og.Controller.get() instead.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_bundle">
<span class="sig-name descname">
<span class="pre">
get_bundle
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
path
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
str
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<dd>
<p>
Get the bundle object as read-write.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
path
(
<em>
str
) – the path to the bundle
<dt class="field-even">
Returns
<dd class="field-even">
<p>
The bundle object at the path, None if there isn’t one
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
omni.graph.core.IBundle2
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elapsed_time">
<span class="sig-name descname">
<span class="pre">
get_elapsed_time
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<a class="reference internal" href="#omni.graph.core.GraphContext" title="omni.graph.core._omni_graph_core.GraphContext">
<span class="pre">
omni.graph.core._omni_graph_core.GraphContext
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
float
<dd>
<p>
Returns the time between last evaluation of the graph and “now”
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
the elapsed time
<dt class="field-even">
Return type
<dd class="field-even">
<p>
float
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.GraphContext.get_elem_count">
<span class="sig-name descname">
<span class="pre">
get_elem_count
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
### get_elem_count
Overloaded function.
1. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, attribute_data: omni::graph::core::Py_AttributeData) -> int
2. get_elem_count(self: omni.graph.core._omni_graph_core.GraphContext, arg0: omni.graph.core._omni_graph_core.Attribute) -> int
get_elem_count is deprecated. Use og.Controller.get_array_size() instead.
### get_frame
Returns the global playback time in frames
- Returns: the global playback time in frames
- Return type: float
### get_graph
Gets the graph associated with this graph context
- Returns: The graph associated with this graph context.
- Return type: omni.graph.core.Graph
### get_graph_target
Get the Prim path of the graph target.
Parameters:
- **index** (int) – The index of instance to fetch. By default, the graph context index is used.
Returns:
- The prim path of the current graph target.
Return type: str
<p>
str
### get_input_bundle
```python
get_input_bundle(*args, **kwargs)
```
Overloaded function.
1. ```python
get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IConstBundle2
```
Get the bundle object as read only.
```
Args:
path (str): the path to the bundle
Returns:
omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
```
2. ```python
get_input_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IConstBundle2
```
Get a bundle object that is an input attribute.
```
Args:
node (omni.graph.core.Node): the node on which the bundle can be found
attribute_name (str): the name of the input attribute
instance (int): an instance index when getting value on an instantiated graph
Returns:
omni.graph.core.IConstBundle2: The bundle object at the path, None if there isn’t one
```
### get_input_target_bundles
```python
get_input_target_bundles(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> List[omni.graph.core._omni_graph_core.IConstBundle2]
```
Get all input targets in the relationship with the given name on the specified compute node.
The targets are returned as bundle objects.
Parameters:
- **node** (omni.graph.core.Node) – the node on which the input targets can be found
- **attribute_name** (str) – the name of the relationship attribute
- **instance** (int) – an instance index when getting value on an instantiated graph
Returns:
The list of input targets, as bundle objects.
```
### Return type
- list[omni.graph.core.IConstBundle2]
### get_is_playing
- **Function:** get_is_playing(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns:** True if playback has started, False if playback is stopped
- **Return type:** bool
### get_output_bundle
- **Function:** get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, *args, **kwargs)
- **Description:** Overloaded function.
- 1. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, path: str) -> omni.graph.core._omni_graph_core.IBundle2
- **Description:** Get a bundle object that is an output attribute.
- **Args:**
- path (str): the path to the bundle
- **Returns:** omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
- 2. get_output_bundle(self: omni.graph.core._omni_graph_core.GraphContext, node: omni.graph.core._omni_graph_core.Node, attribute_name: str, instance: int = 18446744073709551614) -> omni.graph.core._omni_graph_core.IBundle2
- **Description:** Get a bundle object that is an output attribute.
- **Args:**
- node (omni.graph.core.Node): the node on which the bundle can be found
- attribute_name (str): the name of the output attribute
- instance (int): an instance index when getting value on an instantiated graph
- **Returns:** omni.graph.core.IBundle2: The bundle object at the path, None if there isn’t one
### get_time
- **Function:** get_time(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns:** the global playback time in seconds
- **Return type:** float
### get_time_since_start
- **Function:** get_time_since_start(self: omni.graph.core._omni_graph_core.GraphContext)
- **Returns:** the time since start of global playback
- **Return type:** float
### get_time_since_start
Returns the elapsed time since the app started
#### Returns
- the number of seconds since the app started in seconds
#### Return type
- float
### inspect
Runs the inspector on the graph context
#### Parameters
- **inspector** (`omni.inspect.Inspector`) – The inspector to run
#### Returns
- True if the inspector was successfully run on the context, False if it is not supported
#### Return type
- bool
### is_valid
Checks to see if this graph context object is valid
#### Returns
- True if this object is valid
#### Return type
- bool
### set_bool_attribute
set_bool_attribute is deprecated. Use og.Controller.set() instead.
### set_boolarray_attribute
### set_boolarray_attribute
```python
set_boolarray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[bool],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
set_boolarray_attribute is deprecated. Use og.Controller.set() instead.
### set_double_attribute
```python
set_double_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: float,
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
set_double_attribute is deprecated. Use og.Controller.set() instead.
### set_double_matrix_attribute
```python
set_double_matrix_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[List[float]],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
set_double_matrix_attribute is deprecated. Use og.Controller.set() instead.
### set_doublearray_attribute
```python
set_doublearray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[float],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
set_doublearray_attribute is deprecated. Use og.Controller.set() instead.
### set_doublearray_attribute
```python
set_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_doublearray_attribute is deprecated. Use og.Controller.set() instead.
### set_float_attribute
```python
set_float_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_float_attribute is deprecated. Use og.Controller.set() instead.
### set_floatarray_attribute
```python
set_floatarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_floatarray_attribute is deprecated. Use og.Controller.set() instead.
### set_half_attribute
```python
set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: float, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_half_attribute is deprecated. Use og.Controller.set() instead.
### set_half_attribute
```python
set_half_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_half_attribute is deprecated. Use og.Controller.set() instead.
### set_halfarray_attribute
```python
set_halfarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[float], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_halfarray_attribute is deprecated. Use og.Controller.set() instead.
### set_int64_attribute
```python
set_int64_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_int64_attribute is deprecated. Use og.Controller.set() instead.
### set_int64array_attribute
```python
set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_int64array_attribute is deprecated. Use og.Controller.set() instead.
### set_int64array_attribute
```python
set_int64array_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_int64array_attribute is deprecated. Use og.Controller.set() instead.
### set_int_attribute
```python
set_int_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: int, arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_int_attribute is deprecated. Use og.Controller.set() instead.
### set_intarray_attribute
```python
set_intarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_intarray_attribute is deprecated. Use og.Controller.set() instead.
### set_nested_doublearray_attribute
```python
set_nested_doublearray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[List[float]], arg1: omni.graph.core._omni_graph_core.Attribute) -> None
```
set_nested_doublearray_attribute is deprecated. Use og.Controller.set() instead.
### set_nested_doublearray_attribute
```python
set_nested_doublearray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[List[float]],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_floatarray_attribute
```python
set_nested_floatarray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[List[float]],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_halfarray_attribute
```python
set_nested_halfarray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[List[float]],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_nested_intarray_attribute
```python
set_nested_intarray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[List[int]],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated:** Use `og.Controller.set()` instead.
arg0 :
arg1 : omni.graph.core._omni_graph_core.Attribute
)
→ None
set_nested_intarray_attribute is deprecated. Use og.Controller.set() instead.
set_string_attribute (
self : omni.graph.core._omni_graph_core.GraphContext,
arg0 : str,
arg1 : omni.graph.core._omni_graph_core.Attribute
)
→ None
set_string_attribute is deprecated. Use og.Controller.set() instead.
set_uchar_attribute (
self : omni.graph.core._omni_graph_core.GraphContext,
arg0 : int,
arg1 : omni.graph.core._omni_graph_core.Attribute
)
→ None
set_uchar_attribute is deprecated. Use og.Controller.set() instead.
set_uchararray_attribute (
self : omni.graph.core._omni_graph_core.GraphContext,
arg0 : int
)
### set_uchararray_attribute
```python
set_uchararray_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: int,
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated**: Use og.Controller.set() instead.
### set_uint64_attribute
```python
set_uint64_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: int,
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated**: Use og.Controller.set() instead.
### set_uint64array_attribute
```python
set_uint64array_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: List[int],
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated**: Use og.Controller.set() instead.
### set_uint_attribute
```python
set_uint_attribute(
self: omni.graph.core._omni_graph_core.GraphContext,
arg0: int,
arg1: omni.graph.core._omni_graph_core.Attribute
) -> None
```
**Deprecated**: Use og.Controller.set() instead.
### set_uint_attribute
```python
def set_uint_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg1: omni.graph.core._omni_graph_core.Attribute) -> None:
pass
```
**Deprecated:** Use `og.Controller.set()` instead.
### set_uintarray_attribute
```python
def set_uintarray_attribute(self: omni.graph.core._omni_graph_core.GraphContext, arg0: List[int], arg1: omni.graph.core._omni_graph_core.Attribute) -> None:
pass
```
**Deprecated:** Use `og.Controller.set()` instead.
### write_bucket_to_backing
```python
def write_bucket_to_backing(self: omni.graph.core._omni_graph_core.GraphContext, bucket_id: omni::fabric::BucketId) -> None:
pass
```
**Obsolete:** This method does not function anymore. Use the USD API directly to write back to USD.
``` | 47,227 |
omni.graph.core.GraphController.md | # GraphController
## GraphController
Helper class that provides a simple interface to modifying the contents of a graph
### Methods
- **__init__(*args, **kwargs)**
- Initializes the class with a particular configuration.
- **connect(*args, **kwargs)**
- Create a connection between two attributes
- **create_graph(*args, **kwargs)**
- Create a graph from the description
- **create_node(*args, **kwargs)**
- Create an OmniGraph node of the given type and version at the given path.
- **create_prim(*args, **kwargs)**
- Create a prim node containing a predefined set of attribute values and a ReadPrim OmniGraph node for it
| Method | Description |
| --- | --- |
| `create_variable(*args, **kwargs)` | Creates a variable with the given name on the graph |
| `delete_node(*args, **kwargs)` | Deletes one or more OmniGraph nodes. |
| `disconnect(*args, **kwargs)` | Break a connection between two attributes |
| `disconnect_all(*args, **kwargs)` | Break all connections to and from an attribute |
| `expose_prim(*args, **kwargs)` | Create a new compute node attached to an ordinary USD prim or list of prims. |
| `exposed_attribute_name(exposure_type)` | Returns the name of the attribute that will be used to expose the prim for a given exposure type |
| `get_variable_default_value(variable_id)` | Gets the default value of the given variable |
| `node_type_to_expose(exposure_type)` | Returns the type of node that will be used to expose the prim for a given exposure type |
| `set_variable_default_value(variable_id, value)` | Sets the default value of a variable object. |
### Attributes
| Attribute | Description |
| --- | --- |
| `ExposePrimNode_t(*args, **kwargs)` | Typing for information required to expose a prim in a node |
| `ExposePrimNodes_t(*args, **kwargs)` | Typing for information required to expose a list of prims in nodes |
| `PrimExposureType_t(*args, **kwargs)` | Flexible type to specify how to expose the prim |
### `__init__(*args, **kwargs)`
## Class Initialization
Initializes the class with a particular configuration. The arguments are flexible so that classes can initialize only what they need for the calls they will be making. Both arguments are optional, and there may be other arguments present that will be ignored.
### Parameters
- **update_usd** (`bool`) – Should any graphs, nodes, and prims referenced in operations be updated immediately to USD? (default `True`)
- **undoable** (`bool`) – If `True` the operations performed with this instance of the class are added to the undo queue, else they are done immediately and forgotten (default `True`)
- **allow_exists_node** – If `True` then succeed creation of a node when matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match.
- **allow_exists_prim** – If `True` then succeed creation of a prim when matching path and type already exists. It is still a failure if type on the existing prim does not match.
## PrimExposureType Class
Bases: `Enum`
Value that specifies the method of exposing USD prims to OmniGraph
### Attributes
- **AS_ATTRIBUTES** (`'attributes'`) – Expose the prim via a node that creates outputs for all of the prim’s attributes
- **AS_BUNDLE** (`'bundle'`) – Expose the prim via a node that creates a single output bundle with all of the prim’s attributes
- **AS_WRITABLE** (`'writable'`) – Expose the prim to be written to via a node that creates inputs for the prim’s attributes
## connect Method
Create a connection between two attributes. This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
### Parameters
- **obj** – Either `cls` or `self` depending on how the function was called
- **src_spec** – Specification of the attribute to be the source end of the connection
- **dst_spec** – Specification of the attribute to be the destination end of the connection
- **update_usd** – If specified then override whether to delete the node’s USD backing (default `True`)
### create_graph
**classmethod** `create_graph(*args, **kwargs)`
- **Returns**: Graph
- **Description**: Create a graph from the description. This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. The second argument can be positional or by keyword and is mandatory, resulting in an error if omitted. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
#### Code Example
```python
new_graph = og.GraphController.create_graph("/TestGraph")
controller = og.GraphController(undoable=True)
controller.create_graph({"graph_path": "/UndoableGraph", "evaluator_name": "execution"})
```
#### Parameters
- **obj** – Either cls or self, depending on how the function was called
- **graph_id** – Parameters describing the graph to be created. If the graph is just a path then a default graph will be created at that location. If the identifier is a dictionary then it will be interpreted as a set of parameters describing the type of graph to create:
- **graph_path**: Full path to the graph prim to be created to house the OmniGraph
- **evaluator_name**: Type of evaluator the graph should use (default push)
- **fc_backing_type**: og.GraphBackingType that tells you what kind of Fabric to use for graph data (default og.GraphBackingType.GRAPH_BACKING_TYPE_FABRIC_SHARED)
- **pipeline_stage**: og.GraphPipelineStage that tells you which pipeline stage this graph fits into (default og.GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION)
- **evaluation_mode**: og.GraphEvaluationMode that tells you which evaluation mode this graph uses (default og.GraphEvaluationMode.GRAPH_EVALUATION_MODE_AUTOMATIC)
- **update_usd** (bool) – If specified then override whether to create the graph with a USD backing (default True)
- **undoable** (bool) – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
#### Returns
- The created graph
#### Return type
- omni.graph.core.Graph
#### Raises
- **OmniGraphError** – if the graph creation failed for any reason
### create_node
**GraphController.create_node**(*obj*, *node_id*, *node_type_id*, *allow_exists=False*, *version=None*, *update_usd=True*, *undoable=True*)
- **Description**: Create an OmniGraph node of the given type and version at the given path.
- This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. “node_id” and “node_type_id” are mandatory, and can be specified either as positional or keyword arguments. All others are by keyword only and optional, defaulting to the value set in the constructor in the object context where available, and the function defaults elsewhere.
- **Usage**:
```python
og.GraphController.create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType")
og.GraphController(update_usd=True).create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType")
og.GraphController.create_node("/MyGraph/MyNode", "omni.graph.nodes.NodeType", update_usd=True)
og.GraphController.create_node(node_id="/MyGraph/MyNode", node_type="omni.graph.nodes.NodeType")
```
- **Parameters**:
- **obj** – Either cls or self, depending on how the function was called
- **node_id** – Absolute path, or (Relative Path, Graph) where the node will be constructed. If an absolute path was passed in it must be part of an existing graph.
- **node_type_id** – Unique identifier for the type of node to create (name or og.NodeType)
- **allow_exists** – If True then succeed if a node with matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match.
- **version** – Version of the node type to create. By default it creates the most recent.
- **update_usd** – If specified then override whether to create the node with a USD backing or not (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
- **Raises**:
- **og.OmniGraphError** – If one or more of the nodes could not be added to the scene for some reason.
- **Returns**:
- Node(s) added to the scene
- **Return type**:
- omni.graph.core.Node | list[omni.graph.core.Node]
### create_prim
**GraphController.create_prim**(*obj*, *prim_path*, *undoable=True*, *update_usd=True*, *allow_exists=False*, *version=None*)
- **Description**: Create a prim node containing a predefined set of attribute values and a ReadPrim OmniGraph node for it.
- This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. The “prim_path” is mandatory and can appear as either a positional or keyword argument. All others are optional, also by position or keyword, defaulting to the value set in the constructor in the object context if available, and the function defaults elsewhere.
- **Usage**:
```python
og.GraphController.create_prim("/MyPrim")
og.GraphController(undoable=False).create_prim("/MyPrim", undoable=True) # Will be undoable
```
- **Parameters**:
- **obj** – Either cls or self, depending on how the function was called
- **prim_path** – Path to the prim to be created
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
- **update_usd** – If specified then override whether to create the node with a USD backing or not (default True)
- **allow_exists** – If True then succeed if a node with matching path, type, and version already exists. It is still a failure if one of those properties on the existing node does not match.
- **version** – Version of the node type to create. By default it creates the most recent.
- **Returns**:
- Prim
- **Return type**:
- Prim
```python
og.GraphController().create_prim(prim_path="/MyPrim", prim_type="MyPrimType")
og.GraphController.create_prim("/MyPrim")
```
### Parameters
- **obj** – Either cls or self depending on how the function was called
- **prim_path** – Location of the prim
- **attribute_values** – Dictionary of {NAME: (TYPE, VALUE)} for all prim attributes. The TYPE recognizes OGN format, SDF format, or og.Type values. The VALUE should be in a format suitable for passing to pxr::UsdAttribute.Set()
- **prim_type** – The type of prim to create. (default “OmniGraphPrim”)
- **allow_exists** – If True then succeed if a prim with matching path and type already exists. It is still a failure if type on the existing prim does not match.
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
### Returns
- Prim created
### Return type
- Usd.Prim
### Raises
- **OmniGraphError** – If any of the attribute specifications could not be applied to the prim, or if the prim could not be created.
### create_variable
```python
classmethod create_variable(*args, **kwargs) → IVariable
```
Creates a variable with the given name on the graph. This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
#### Parameters
- **graph_id** – The graph to create a variable on
- **name** – The name of the variable to create
- **var_type** – The type of the variable to create, either a string or an OG.Type
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
- **default_value** – The default value of the variable to set, or None to not set a default value. (default None)
#### Raises
- **OmniGraphError** – If the variable can’t be created
#### Returns
- The created variable
#### Return type
- omni.graph.core.IVariable
```
### delete_node
```python
classmethod delete_node(*args, **kwargs)
)
→
bool
Deletes one or more OmniGraph nodes.
This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
Parameters
------------
- **obj** – Either cls or self depending on how the function was called
- **node_id** – Specification of a node or list of nodes to be deleted
- **graph_id** – Only required if the node_id does not contain enough information to uniquely identify it
- **ignore_if_missing** – If True then succeed even if no node with a matching path exists
- **update_usd** – If specified then override whether to delete the node’s USD backing (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
Raises
------
- **OmniGraphError** – If the node does not exist
Returns
-------
- True if the node was successfully deleted
Return type
------------
- bool
```
classmethod
disconnect
(
*args
,
**kwargs
)
Break a connection between two attributes
This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
Parameters
------------
- **obj** – Either cls or self depending on how the function was called
- **src_spec** – Specification of the attribute that is the source end of the connection
- **dst_spec** – Specification of the attribute that is the destination end of the connection
- **update_usd** – If specified then override whether to delete the node’s USD backing (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
Raises
------
- **OmniGraphError** – If attributes could not be found or the disconnection fails
```
classmethod
disconnect_all
(
*args
,
**kwargs
)
Break all connections to and from an attribute
This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
Parameters
------------
- **obj** – Either cls or self depending on how the function was called
- **src_spec** – Specification of the attribute that is the source end of the connection
- **dst_spec** – Specification of the attribute that is the destination end of the connection
- **update_usd** – If specified then override whether to delete the node’s USD backing (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
Raises
------
- **OmniGraphError** – If attributes could not be found or the disconnection fails
```
- **obj** – Either cls or self depending on how the function was called
- **attribute_spec** – Attribute whose connections are to be removed. (attr or (attr, node) pair)
- **update_usd** – If specified then override whether to delete the node’s USD backing (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
Raises:
- **OmniGraphError** – If attribute could not be found, connection didn’t exist, or disconnection fails
```
```markdown
classmethod expose_prim(*args, **kwargs) -> Node
Create a new compute node attached to an ordinary USD prim or list of prims.
This function can be called either from the class or using an instantiated object. The first argument is positional, being either the class or object. All others are by keyword and optional, defaulting to the value set in the constructor in the object context and the function defaults in the class context.
Parameters:
- **obj** – Either cls or self depending on how the function was called
- **exposure_type** – Method for exposing the prim to OmniGraph
- **prim_id** – Identifier of an existing prim in the USD stage
- **node_path_id** – Identifier of a node path that is valid but does not currently exist
- **update_usd** – If specified then override whether to delete the node’s USD backing (default True)
- **undoable** – If True the operation is added to the undo queue, else it is done immediately and forgotten (default True)
Returns:
- Node exposing the prim to OmniGraph
Return type:
- omni.graph.core.Node
Raises:
- **og.OmniGraphError** – if the prim does not exist, or the node path already exists
```
```markdown
classmethod exposed_attribute_name(exposure_type: PrimExposureType_t) -> str
Returns the name of the attribute that will be used to expose the prim for a given exposure type
Parameters:
- **exposure_type** – Type of exposure desired
Returns:
- Name of the attribute at which a connection should be made to the prim for exposure
Return type:
- str
```
### omni.graph.core.GraphController.get_variable_default_value
```python
def get_variable_default_value(variable_id: str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.IVariable | tuple[str | pxr.Sdf.Path | omni.graph.core._omni_graph_core.Graph | pxr.Usd.Prim | pxr.Usd.Typed, str]) -> Any
```
- **Description**: Gets the default value of the given variable
- **Parameters**:
- **variable_id** – The variable whose value is to be set
- **Returns**: The default value of the variable.
- **Return type**: Any
- **Raises**:
- **OmniGraphError** – If the variable is not valid or does not have valid usd backing.
### omni.graph.core.GraphController.node_type_to_expose
```python
@classmethod
def node_type_to_expose(exposure_type: PrimExposureType_t) -> str
```
- **Description**: Returns the type of node that will be used to expose the prim for a given exposure type
- **Parameters**:
- **exposure_type** – Type of exposure desired
- **Returns**: Node type of the appropriate omni.graph.core.Node to use to expose the prim
- **Return type**: str
```
### omni.graph.core.GraphController.set_variable_default_value
```python
@classmethod
def set_variable_default_value(variable_id: str | pxr.Sdf.Path) -> None
```
- **Description**: [Description of the function]
- **Parameters**:
- **variable_id** – The variable ID
- **Returns**: None
- **Return type**: None
```
Sets the default value of a variable object.
Parameters:
- **variable_id** – The variable whose value is to be set
- **value** – The value to set
Raises:
- **OmniGraphError** – If the variable is not valid, does not have valid usd backing, or value
- **is not a compatible type** –
Typing for information required to expose a prim in a node
alias of Tuple[str | Path | Node | Prim | Typed | Graph, str | Path | tuple[str | Path | Graph | Prim | Typed]]
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.graph.core.GraphController.ExposePrimNodes_t">
<span class="sig-name descname">
<span class="pre">
ExposePrimNodes_t
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
<span class="sig-paren">
)
<a class="headerlink" href="#omni.graph.core.GraphController.ExposePrimNodes_t" title="Permalink to this definition">
<dd>
<p>
Typing for information required to expose a list of prims in nodes
<p>
alias of
<code>
Union
[
<code>
Tuple
[
<code>
str
|
<code>
Path
|
<code>
Node
|
<code>
Prim
|
<code>
Typed
|
<code>
Graph
,
<code>
str
|
<code>
Path
|
<code>
tuple
[
<code>
str
|
<code>
Path
|
<code>
Graph
|
<code>
Prim
|
<code>
Typed
]],
<code>
List
[
<code>
Tuple
[
<code>
str
|
<code>
Path
|
<code>
Node
|
<code>
Prim
|
<code>
Typed
|
<code>
Graph
,
<code>
str
|
<code>
Path
|
<code>
tuple
[
<code>
str
|
<code>
Path
|
<code>
Graph
|
<code>
Prim
|
<code>
Typed
]]]
<dl class="py attribute">
<dt class="sig sig-object py" id="omni.graph.core.GraphController.PrimExposureType_t">
<span class="sig-name descname">
<span class="pre">
PrimExposureType_t
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
<span class="sig-paren">
)
<a class="headerlink" href="#omni.graph.core.GraphController.PrimExposureType_t" title="Permalink to this definition">
<dd>
<p>
Flexible type to specify how to expose the prim
alias of
Union
str
```
,
```
PrimExposureType
```
``` | 21,268 |
omni.graph.core.GraphEvaluationMode.md | # GraphEvaluationMode
## GraphEvaluationMode
```
Bases: `pybind11_object`
How the graph evaluation is scheduled
Members:
- GRAPH_EVALUATION_MODE_AUTOMATIC : Evaluation is scheduled based on graph type
- GRAPH_EVALUATION_MODE_STANDALONE : Evaluation is scheduled as a single graph
- GRAPH_EVALUATION_MODE_INSTANCED : Evaluation is scheduled by instances
### Methods
- `__init__(self, value)`
### Attributes
- `GRAPH_EVALUATION_MODE_AUTOMATIC`
- `GRAPH_EVALUATION_MODE_INSTANCED`
- `GRAPH_EVALUATION_MODE_STANDALONE`
- `name`
- `value`
**self** :
**omni.graph.core._omni_graph_core.GraphEvaluationMode**,
**value** : **int** )
→ **None**
**property**
**name** | 664 |
omni.graph.core.GraphEvaluationMode_omni.graph.core.GraphEvaluationMode.md | # GraphEvaluationMode
## GraphEvaluationMode
Bases: `pybind11_object`
How the graph evaluation is scheduled
Members:
- GRAPH_EVALUATION_MODE_AUTOMATIC : Evaluation is scheduled based on graph type
- GRAPH_EVALUATION_MODE_STANDALONE : Evaluation is scheduled as a single graph
- GRAPH_EVALUATION_MODE_INSTANCED : Evaluation is scheduled by instances
### Methods
- `__init__`(self, value)
### Attributes
- `GRAPH_EVALUATION_MODE_AUTOMATIC`
- `GRAPH_EVALUATION_MODE_INSTANCED`
- `GRAPH_EVALUATION_MODE_STANDALONE`
- `name`
- `value`
<em>
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.GraphEvaluationMode
,
<em class="sig-param">
<span class="n">
<span class="pre">
value
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
int
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.GraphEvaluationMode.name">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
name
<dd>
<footer>
<hr/>
| 1,456 |
omni.graph.core.GraphEvent.md | # GraphEvent
## GraphEvent
Bases: `pybind11_object`
Graph modification event.
Members:
- CREATE_VARIABLE : Variable was created
- REMOVE_VARIABLE : Variable was removed
- VARIABLE_TYPE_CHANGE : Variable type was changed
### Methods
- `__init__(self, value)`
### Attributes
- `CREATE_VARIABLE`
- `REMOVE_VARIABLE`
- `VARIABLE_TYPE_CHANGE`
- `name`
- `value`
:
omni.graph.core._omni_graph_core.GraphEvent
,
value: int
)
→ None
property
name
name | 454 |
omni.graph.core.GraphPipelineStage.md | # GraphPipelineStage
## GraphPipelineStage
Pipeline stage in which the graph lives
Members:
- GRAPH_PIPELINE_STAGE_SIMULATION: The regular evaluation stage
- GRAPH_PIPELINE_STAGE_PRERENDER: The stage that evaluates just before rendering
- GRAPH_PIPELINE_STAGE_POSTRENDER: The stage that evaluates just after rendering
- GRAPH_PIPELINE_STAGE_ONDEMAND: The stage evaluating only when requested
- GRAPH_PIPELINE_STAGE_UNKNOWN: The stage is not currently known
### Methods
- `__init__(self, value)`
### Attributes
- `GRAPH_PIPELINE_STAGE_ONDEMAND`
- `GRAPH_PIPELINE_STAGE_POSTRENDER`
- `GRAPH_PIPELINE_STAGE_PRERENDER`
- `GRAPH_PIPELINE_STAGE_SIMULATION`
- `GRAPH_PIPELINE_STAGE_UNKNOWN`
| name |
| ---- |
| value |
```init__```
(
self
:
omni.graph.core._omni_graph_core.GraphPipelineStage
,
value
:
int
)
→
None
```property```
name
```
``` | 843 |
omni.graph.core.GraphRegistry.md | # GraphRegistry
Manager of the node types registered to OmniGraph.
## Methods
- `__init__(self)`
- `get_event_stream(self)`
- Get the event stream for the graph registry change notification.
- `get_node_type_version(self, node_type_name)`
- Finds the version number of the given node type.
- `inspect(self, inspector)`
- Runs the inspector on the graph registry
## Methods
### get_event_stream
```python
get_event_stream(self: omni.graph.core._omni_graph_core.GraphRegistry) -> carb.events._events.IEventStream
```
Get the event stream for the graph registry change notification.
The events that are raised are specified by GraphRegistryEvent. The payload for the added and removed events is the name of the node type being added or removed, and uses the key “node_type”.
**Returns:** Event stream to monitor for graph registry changes
**Return type:** carb.events.IEventStream
### get_node_type_version
```python
get_node_type_version(self: omni.graph.core._omni_graph_core.GraphRegistry, node_type_name: str) -> int
```
Finds the version number of the given node type.
**Parameters:**
- **node_type_name** (str) – Name of the node type to check
**Returns:** Version number registered for the node type, None if it is not registered
**Return type:** int
### inspect
```python
inspect(self: omni.graph.core._omni_graph_core.GraphRegistry, inspector: omni::core::Api<omni::inspect::IInspector_abi>) -> bool
```
Runs the inspector on the graph registry
**Parameters:**
- **inspector** (omni.inspect.Inspector) – The inspector to run
**Returns:** True if the inspector was successfully run on the graph registry, False if it is not supported
**Return type:** bool | 1,688 |
omni.graph.core.GraphRegistryEvent.md | # GraphRegistryEvent
## GraphRegistryEvent
```python
class omni.graph.core.GraphRegistryEvent
```
**Bases:** `pybind11_object`
**Description:** Graph Registry modification event.
**Members:**
- `NODE_TYPE_ADDED`: Node type was registered
- `NODE_TYPE_REMOVED`: Node type was deregistered
- `NODE_TYPE_NAMESPACE_CHANGED`: Namespace of a node type changed
- `NODE_TYPE_CATEGORY_CHANGED`: Category of a node type changed
- `STAGE_PRE_ATTACH`: A stage is being attached
### Methods
```python
__init__(self, value)
```
### Attributes
- `NODE_TYPE_ADDED`
- `NODE_TYPE_CATEGORY_CHANGED`
- `NODE_TYPE_NAMESPACE_CHANGED`
- `NODE_TYPE_REMOVED`
- `STAGE_PRE_ATTACH`
- `name`
``` | 674 |
omni.graph.core.GraphRegistryEvent_omni.graph.core.GraphRegistryEvent.md | # GraphRegistryEvent
## GraphRegistryEvent
Bases: `pybind11_object`
Graph Registry modification event.
Members:
- NODE_TYPE_ADDED : Node type was registered
- NODE_TYPE_REMOVED : Node type was deregistered
- NODE_TYPE_NAMESPACE_CHANGED : Namespace of a node type changed
- NODE_TYPE_CATEGORY_CHANGED : Category of a node type changed
- STAGE_PRE_ATTACH : A stage is being attached
### Methods
- `__init__(self, value)`
### Attributes
- `NODE_TYPE_ADDED`
- `NODE_TYPE_CATEGORY_CHANGED`
- `NODE_TYPE_NAMESPACE_CHANGED`
- `NODE_TYPE_REMOVED`
- `STAGE_PRE_ATTACH`
- `name`
| Column 1 | Column 2 |
|----------|----------|
| `value` | |
| `value` | |
__init__(self: omni.graph.core._omni_graph_core.GraphRegistryEvent, value: int) -> None
property name | 776 |
omni.graph.core.GraphSettings.md | # GraphSettings
## GraphSettings
```python
class omni.graph.core.GraphSettings(evaluator_type: str = 'push', file_format_version: ~typing.Tuple[int, int] = (0, 0), fabric_backing: str = <GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0>, pipeline_stage: str = <GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10>, evaluation_mode: str = <GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1>)
```
Bases: `object`
Container for the set of settings in a graph. This is a class instead of a tuple so that future additions to the settings do not break backward compatibility
### Methods
| Method | Description |
|--------|-------------|
| `__init__(evaluator_type, file_format_version, fabric_backing, pipeline_stage, evaluation_mode)` | |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `evaluation_mode` | |
```
| Property | Description |
|----------|-------------|
| `evaluation_mode` | Default evaluation mode of the graph |
| `evaluator_type` | Type of evaluator to use by default on the graph |
| `fabric_backing` | Type of data backing the graph has |
| `file_format_version` | File format version used when creating the graph |
| `pipeline_stage` | Pipeline stage to which the graph belongs |
### `__init__(evaluator_type: str = 'push', file_format_version: ~typing.Tuple[int, int] = (0, 0), fabric_backing: str = <GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0>, pipeline_stage: str = <GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10>, evaluation_mode: str = <GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1>) -> None`
- **Parameters**:
- `evaluator_type`: Type of evaluator, default 'push'
- `file_format_version`: Tuple of integers, default (0, 0)
- `fabric_backing`: Type of data backing, default <GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0>
- `pipeline_stage`: Pipeline stage, default <GraphPipelineStage.GRAPH_PIPELINE_STAGE_SIMULATION: 10>
- `evaluation_mode`: Evaluation mode, default <GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1>
- **Returns**: None
### `evaluation_mode: str = <GraphEvaluationMode.GRAPH_EVALUATION_MODE_STANDALONE: 1>`
- **Description**: Default evaluation mode of the graph
### `evaluator_type: str = 'push'`
- **Description**: Type of evaluator to use by default on the graph
### `fabric_backing: str = <GraphBackingType.GRAPH_BACKING_TYPE_FLATCACHE_SHARED: 0>`
- **Description**: Type of data backing the graph has
### fabric_backing
Type of data backing the graph has
### file_format_version
File format version used when creating the graph
### pipeline_stage
Pipeline stage to which the graph belongs | 2,716 |
omni.graph.core.IBundle2.md | # IBundle2
## Class
```python
class omni.graph.core.IBundle2(_IBundle2)
```
Provide read write access to recursive bundles.
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `add_attribute(self, type, name)`
- DEPRECATED - use create_attribute() instead.
- `add_attributes(self, types, names)`
- DEPRECATED - use create_attributes() instead.
- `clear(self)`
- DEPRECATED - use clear_contents() instead
- `clear_contents(self[, bundle_metadata, ...])`
- Removes all attributes and child bundles from this bundle, but keeps the bundle itself.
- `copy_attribute(*args, **kwargs)`
- Overloaded function.
- `copy_attributes(*args, **kwargs)`
- Overloaded function.
```
```code
copy_attributes
```
(*args, **kwargs)
Overloaded function.
```code
copy_bundle
```
(self, source_bundle[, overwrite])
Copy bundle data and metadata from the source bundle to this bundle.
```code
copy_child_bundle
```
(*args, **kwargs)
Overloaded function.
```code
copy_child_bundles
```
(*args, **kwargs)
Overloaded function.
```code
create_attribute
```
(self, name, type, element_count)
Creates attribute based on provided name and type.
```code
create_attribute_like
```
(self, pattern_attribute)
Use input attribute as pattern to create attribute in this bundle.
```code
create_attribute_metadata
```
(*args, **kwargs)
Overloaded function.
```code
create_attributes
```
(self, names, types)
Creates attributes based on provided names and types.
```code
create_attributes_like
```
(self, pattern_attributes)
Use input attributes as pattern to create attributes in this bundle.
```code
create_bundle_metadata
```
(*args, **kwargs)
Overloaded function.
```code
create_child_bundle
```
(self, path)
Creates immediate child bundle under specified path in this bundle.
```code
create_child_bundles
```
(self, paths)
Creates immediate child bundles under specified paths in this bundle.
```code
get_attribute_by_name
```
(*args, **kwargs)
Overloaded function.
```code
get_attribute_data
```
(self[, write])
DEPRECATED - use get_attributes() instead
```code
get_attribute_data_count
```
(self)
DEPRECATED - use get_attribute_count() instead
<tr class="row-even">
<td>
<p>
<code>get_attribute_metadata_by_name(*args, **kwargs)
<td>
<p>
Overloaded function.
<tr class="row-odd">
<td>
<p>
<code>get_attribute_names_and_types(self)
<td>
<p>
DEPRECATED - use get_attribute_names() or get_attribute_types() instead
<tr class="row-even">
<td>
<p>
<code>get_attributes(self)
<td>
<p>
Searches for attributes in this bundle by using attribute names.
<tr class="row-odd">
<td>
<p>
<code>get_attributes_by_name(self, names)
<td>
<p>
Searches for attributes in this bundle by using attribute names.
<tr class="row-even">
<td>
<p>
<code>get_bundle_metadata_by_name(*args, **kwargs)
<td>
<p>
Overloaded function.
<tr class="row-odd">
<td>
<p>
<code>get_child_bundle(self, index)
<td>
<p>
Get the child bundle by index.
<tr class="row-even">
<td>
<p>
<code>get_child_bundle_by_name(self, name)
<td>
<p>
Lookup for child under specified name.
<tr class="row-odd">
<td>
<p>
<code>get_child_bundles(self)
<td>
<p>
Get all child bundle handles in this bundle.
<tr class="row-even">
<td>
<p>
<code>get_child_bundles_by_name(self, names)
<td>
<p>
Lookup for children under specified names.
<tr class="row-odd">
<td>
<p>
<code>get_metadata_storage(self)
<td>
<p>
DEPRECATED - DO NOT USE
<tr class="row-even">
<td>
<p>
<code>get_parent_bundle(self)
<td>
<p>
Get the parent of this bundle
<tr class="row-odd">
<td>
<p>
<code>get_prim_path(self)
<td>
<p>
DEPRECATED - use get_path() instead
<tr class="row-even">
<td>
<p>
<code>insert_attribute(self, attribute_to_copy, name)
<td>
<p>
DEPRECATED - use copy_attribute() instead
<tr class="row-odd">
<td>
<p>
<code>insert_bundle(self, bundle_to_copy)
<td>
<p>
DEPRECATED - use copy_bundle() instead.
<tr class="row-even">
<td>
<p>
<code>is_read_only(self)
<td>
Returns if this interface is read-only.
is_valid (self)
DEPRECATED - use bool cast instead
link_attribute (*args, **kwargs)
Overloaded function.
link_attributes (*args, **kwargs)
Overloaded function.
link_child_bundle (*args, **kwargs)
Overloaded function.
link_child_bundles (*args, **kwargs)
Overloaded function.
remove_all_attributes (self)
Remove all attributes from this bundle.
remove_all_child_bundles (self)
Remove all child bundles from this bundle.
remove_attribute (*args, **kwargs)
Overloaded function.
remove_attribute_metadata (*args, **kwargs)
Overloaded function.
remove_attributes (*args, **kwargs)
Overloaded function.
remove_attributes_by_name (self, names)
Looks up the attributes by names and remove their data and metadata.
remove_bundle_metadata (*args, **kwargs)
Overloaded function.
remove_child_bundle (self, bundle)
Looks up the bundle and if it is child of the bundle then remove it.
remove_child_bundles (self, bundles)
Looks up the bundles and if they are children of the bundle then remove them.
remove_child_bundles_by_name (self, names)
<p>Looks up child bundles by name and remove their data and metadata.
<p>Attributes
<dl>
<dt>__init__(*args, **kwargs)
<dd>
<p>Overloaded function.
<ol>
<li>__init__(self: omni.graph.core._omni_graph_core.IBundle2, arg0: omni.core._core.IObject) -> None
<li>__init__(self: omni.graph.core._omni_graph_core.IBundle2) -> None
<dl>
<dt>add_attribute(self: omni.graph.core._omni_graph_core.IBundle2, type: omni::graph::core::Py_Type, name: str) -> omni::graph::core::Py_AttributeData
<dd><p>DEPRECATED - use create_attribute() instead.
<dl>
<dt>add_attributes(self: omni.graph.core._omni_graph_core.IBundle2, types: List[omni::graph::core::Py_Type], names: List[str]) -> None
<dd><p>DEPRECATED - use create_attributes() instead.
<dl>
<dt>clear(self: omni.graph.core._omni_graph_core.IBundle2) -> None
<dd><p>DEPRECATED - use clear_contents() instead
<dl>
<dt>clear_contents(self: omni.graph.core._omni_graph_core.IBundle2, bundle_metadata: bool = True, attributes: bool = True) -> None
<dd><p>DEPRECATED - use clear_contents() instead
### clear_contents
Removes all attributes and child bundles from this bundle, but keeps the bundle itself.
#### Parameters
- **bundle_metadata** (bool) – Clears bundle metadata in this bundle.
- **attributes** (bool) – Clears attributes in this bundle.
- **child_bundles** (bool) – Clears child bundles in this bundle.
#### Returns
- Success if successfully cleared.
#### Return type
- omni.core.Result
### copy_attribute
Overloaded function.
1. copy_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute: omni::graph::core::Py_AttributeData, overwrite: bool = True) -> omni::graph::core::Py_AttributeData
- Create new attribute by copying existing one, including its data.
- Created attribute is owned by this bundle.
- Args:
- attribute (omni.graph.core.AttributeData): Attribute whose data type is to be copied.
- overwrite (bool): Overwrite existing attribute in this bundle.
- Returns:
- omni.graph.core.AttributeData: Copied attribute.
2. copy_attribute(self: omni.graph.core._omni_graph_core.IBundle2, name: str, attribute: omni::graph::core::Py_AttributeData, overwrite: bool = True) -> omni::graph::core::Py_AttributeData
- Create new attribute by copying existing one, including its data.
- Created attribute is owned by this bundle.
- Args:
- name (str): The new name for copied attribute.
- attribute (omni.graph.core.AttributeData): Attribute whose data type is to be copied.
- overwrite (bool): Overwrite existing attribute in this bundle.
- Returns:
- omni.graph.core.AttributeData: Copied attribute.
### copy_attributes
Overloaded function.
1. copy_attributes(self: omni.graph.core._omni_graph_core.IBundle2, attributes: List[omni::graph::core::Py_AttributeData], overwrite: bool = True) -> List[omni::graph::core::Py_AttributeData]
- Create new attributes by copying existing ones, including their data.
- Names of new attributes are taken from source attributes.
- Created attributes are owned by this bundle.
- Args:
- attributes (list[omni.graph.core.AttributeData]): Attributes whose data type is to be copied.
- overwrite (bool): Overwrite existing attributes in this bundle.
- Returns:
- list[omni.graph.core.AttributeData]: Copied attributes.
### Returns:
- list[omni.graph.core.AttributeData]: A list of copied attributes.
### copy_attributes(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], attributes: List[omni::graph::core::Py_AttributeData], overwrite: bool = True) -> List[omni::graph::core::Py_AttributeData]
Create new attributes by copying existing ones, including their data, with possibility of giving them new names.
Created attributes are owned by this bundle.
#### Args:
- names (list[str]): Names for the new attributes.
- attributes (list[omni.graph.core.AttributeData]): Attributes whose data type is to be copied.
- overwrite (bool): Overwrite existing attributes in this bundle.
#### Returns:
- list[omni.graph.core.AttributeData]: A list of copied attributes.
### copy_bundle(self: omni.graph.core._omni_graph_core.IBundle2, source_bundle: omni.graph.core._omni_graph_core.IConstBundle2, overwrite: bool = True) -> None
Copy bundle data and metadata from the source bundle to this bundle.
#### Parameters:
- source_bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied.
- overwrite (bool): Overwrite existing content of the bundle.
### copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs)
Overloaded function.
1. copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2, name: Optional[str] = None) -> omni.graph.core._omni_graph_core.IBundle2
Create new child bundle by copying existing one, with possibility of giving child a new name.
Created bundle is owned by this bundle.
#### Args:
- bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied.
- name (str): Name of new child.
#### Returns:
- omni.graph.core.IBundle2: Newly copied bundle.
2. copy_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, name: str, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2
Create new child bundle by copying existing one, with possibility of giving child a new name.
Created bundle is owned by this bundle.
#### Args:
- name (str): Name of new child.
- bundle (omni.graph.core.IConstBundle2): Bundle whose data is to be copied.
#### Returns:
- omni.graph.core.IBundle2: Newly copied bundle.
Overloaded function.
1. copy_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2], names: Optional[List[str]] = None) -> List[omni.graph.core._omni_graph_core.IBundle2]
Create new child bundles by copying existing ones, with possibility of giving children new names.
Created bundles are owned by this bundle.
Args:
- bundles (list[omni.graph.core.IConstBundle2]): Bundles whose data is to be copied.
- names (list[str]): Names of new children.
Returns:
- list[omni.graph.core.IBundle2]: Newly copied bundles.
2. copy_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]
Create new child bundles by copying existing ones, with possibility of giving children new names.
Created bundles are owned by this bundle.
Args:
- names (list[str]): Names of new children.
- bundles (list[omni.graph.core.IConstBundle2]): Bundles whose data is to be copied.
Returns:
- list[omni.graph.core.IBundle2]: Newly copied bundles.
Creates attribute based on provided name and type.
Created attribute is owned by this bundle.
Parameters:
- name (str) – Name of the attribute.
- type (omni.graph.core.Type) – Type of the attribute.
- element_count (int) – Number of elements in the array.
Returns:
- Newly created attribute.
Return type:
- omni.graph.core.AttributeData
## create_attribute_like
Use input attribute as pattern to create attribute in this bundle.
The name and type are taken from pattern attribute, data is not copied. Created attribute is owned by this bundle.
### Parameters
- **pattern_attribute** (`omni.graph.core.AttributeData`) – Attribute whose name and type is to be used to create new attribute.
### Returns
- Newly created attribute.
### Return type
- `omni.graph.core.AttributeData`
## create_attribute_metadata
Overloaded function.
1. create_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_names: List[str], field_types: List[omni::graph::core::Py_Type]) -> List[omni::graph::core::Py_AttributeData]
- Create attribute metadata fields.
- Args:
- attribute (str): Name of the attribute.
- field_names (list[str]): Names of new metadata field.
- field_types (list[omni.graph.core.Type]): Types of new metadata field.
- element_count (int): Number of elements in the array.
- Returns:
- list[omni.graph.core.AttributeData]: Newly created metadata fields.
2. create_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_name: str, field_type: omni::graph::core::Py_Type, element_count: int = 0) -> omni::graph::core::Py_AttributeData
- Create attribute metadata field.
- Args:
- attribute (str): Name of the attribute.
- field_name (str): Name of new metadata field.
- field_type (omni.graph.core.Type): Type of new metadata field.
- Returns:
- omni.graph.core.AttributeData: Newly created metadata field.
## create_attributes
Creates attributes based on provided names and types.
Created attributes are owned by this bundle.
### Parameters
- **names** (list[str]) – Names of the attributes.
- **types** (list[omni.graph.core.Type]) – Types of the attributes.
### Returns
- A list of created attributes.
### Return type
- list[omni.graph.core.AttributeData]
## create_attributes_like
Use input attributes as pattern to create attributes in this bundle.
Names and types for new attributes are taken from pattern attributes, data is not copied.
Created attributes are owned by this bundle.
### Parameters
- **pattern_attributes** (list[omni.graph.core.AttributeData]) – Attributes whose name and type is to be used to create new attributes.
### Returns
- A list of newly created attributes.
### Return type
- list[omni.graph.core.AttributeData]
## create_bundle_metadata
Overloaded function.
1. create_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_names: List[str], field_types: List[omni::graph::core::Py_Type]) -> List[omni::graph::core::Py_AttributeData]
- Creates bundle metadata fields based on provided names and types.
- Created fields are owned by this bundle.
**Args:**
- field_names (list[str]): Names of the fields.
- field_types (list[omni.graph.core.Type]): Types of the fields.
- element_count (int): Number of elements in the array.
**Returns:**
- list[omni.graph.core.AttributeData]: A list of created fields.
2. create_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_name: str, field_type: omni::graph::core::Py_Type, element_count: int = 0) -> omni::graph::core::Py_AttributeData
- Creates bundle metadata field based on provided name and type.
- Created field are owned by this bundle.
**Args:**
- field_name (str): Name of the field.
- field_type (omni.graph.core.Type): Type of the field.
**Returns:**
- omni.graph.core.AttributeData: Created field.
## create_child_bundle
Creates immediate child bundle under specified path in this bundle.
Created bundle is owned by this bundle.
This method does not work recursively. Only immediate child can be created.
### Parameters
- **path** (str) – New child path in this bundle.
### Returns
- Created child bundle.
## Return type
omni.graph.core.IBundle2
## create_child_bundles
```python
create_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, paths: List[str]) -> List[omni.graph.core._omni_graph_core.IBundle2]
```
Creates immediate child bundles under specified paths in this bundle.
Created bundles are owned by this bundle.
This method does not work recursively. Only immediate children can be created.
### Parameters
**paths** (list[str]) – New children paths in this bundle.
### Returns
A list of created child bundles.
### Return type
list[omni.graph.core.IBundle2]
## get_attribute_by_name
```python
get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs)
```
Overloaded function.
1. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, name: str, readOnly: bool) -> omni::graph::core::Py_AttributeData
2. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IBundle2, name: str) -> omni::graph::core::Py_AttributeData
DEPRECATED - use get_attribute_by_name(name) instead
### Args
- name (str): Attribute name to search for.
### Returns
omni.graph.core.AttributeData: An attribute. If attribute is not found then invalid attribute is returned.
## get_attribute_data
```python
get_attribute_data(self: omni.graph.core._omni_graph_core.IBundle2, write: bool = False)
```
### get_attribute_data
DEPRECATED - use get_attributes() instead
### get_attribute_data_count
DEPRECATED - use get_attribute_count() instead
### get_attribute_metadata_by_name(*args, **kwargs)
Overloaded function.
1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]
- Search for metadata fields for the attribute by using field names.
- Args:
- attribute (str): Name of the attribute.
- field_names (list[str]): Attribute metadata fields to be searched for.
- Returns:
- list[omni.graph.core.AttributeData]: Array of metadata fields in the attribute.
2. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_name: str) -> omni::graph::core::Py_AttributeData
- Search for metadata field for the attribute by using field name.
- Args:
- attribute (str): Name of the attribute.
- field_name (str): Attribute metadata field to be searched for.
- Returns:
- omni.graph.core.AttributeData: Metadata fields in the attribute.
### get_attribute_names_and_types
DEPRECATED - use get_attribute_names() or get_attribute_types() instead
### get_attributes
Searches for attributes in this bundle by using attribute names.
- Parameters
- names (list[str]) – Attribute names to search for.
### Returns
A list of found attributes.
### Return type
list[omni.graph.core.AttributeData]
### get_attributes_by_name
```python
get_attributes_by_name(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> List[omni::graph::core::Py_AttributeData]
```
Searches for attributes in this bundle by using attribute names.
#### Parameters
- **names** (list[str]): Attribute names to search for.
#### Returns
A list of found attributes.
#### Return type
list[omni.graph.core.AttributeData]
### get_bundle_metadata_by_name
```python
get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs)
```
Overloaded function.
1. ```python
get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]
```
Search for field handles in this bundle by using field names.
**Args:**
- field_names (list[str]): Bundle metadata fields to be searched for.
**Returns:**
- list[omni.graph.core.AttributeData]: Metadata fields in this bundle.
2. ```python
get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IBundle2, field_name: str) -> omni::graph::core::Py_AttributeData
```
Search for field handle in this bundle by using field name.
**Args:**
- field_name (str): Bundle metadata fields to be searched for.
**Returns:**
- omni.graph.core.AttributeData: Metadata field in this bundle.
### get_child_bundle
```python
get_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, index: int)
```
## omni.graph.core._omni_graph_core.IBundle2
### get_child_bundle
Get the child bundle by index.
#### Parameters
- **index** (int) – Child bundle index in range [0, child_bundle_count).
#### Returns
- Child bundle under the index. If bundle index is out of range, then invalid bundle is returned.
#### Return type
- omni.graph.core.IBundle2
### get_child_bundle_by_name
Lookup for child under specified name.
#### Parameters
- **path** (str) – Name to child bundle in this bundle.
#### Returns
- Child bundle in this bundle. If child does not exist under the path, then invalid bundle is returned.
#### Return type
- omni.graph.core.IBundle2
### get_child_bundles
Get all child bundle handles in this bundle.
#### Returns
- A list of all child bundles in this bundle.
#### Return type
- list[omni.graph.core.IBundle2]
### get_child_bundles_by_name
Get child bundles by name.
#### Parameters
- **names** (List[str]) – Names of the child bundles to retrieve.
#### Returns
- List of child bundles matching the provided names.
#### Return type
- list[omni.graph.core.IBundle2]
<span class="pre">
]
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<span class="p">
<span class="pre">
]
<dd>
<p>
Lookup for children under specified names.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<p>
<strong>
names
(
<em>
list
<em>
[
<em>
str
<em>
]
) – Names of child bundles in this bundle.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
A list of found child bundles in this bundle.
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
list[
<span class="pre">
omni.graph.core.IBundle2
]
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_metadata_storage">
<span class="sig-name descname">
<span class="pre">
get_metadata_storage
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<dd>
<p>
DEPRECATED - DO NOT USE
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_parent_bundle">
<span class="sig-name descname">
<span class="pre">
get_parent_bundle
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<dd>
<p>
Get the parent of this bundle
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
The parent of this bundle, or invalid bundle if there is no parent.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
<span class="pre">
omni.graph.core.IBundle2
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundle2.get_prim_path">
<span class="sig-name descname">
<span class="pre">
get_prim_path
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self
<span class="p">
<span class="pre">
:
<span class="w">
<span class="n">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
str
<dd>
<p>
DEPRECATED - use get_path() instead
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundle2.insert_attribute">
<span class="sig-name descname">
<span class="pre">
insert_attribute
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self:
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
,
<em class="sig-param">
<span class="n">
<span class="pre">
attribute_to_copy:
<span class="pre">
omni::graph::core::Py_AttributeData
,
<em class="sig-param">
<span class="n">
<span class="pre">
name:
<span class="pre">
### insert_attribute
```python
insert_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute_to_copy: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData
```
DEPRECATED - use copy_attribute() instead
### insert_bundle
```python
insert_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) -> None
```
DEPRECATED - use copy_bundle() instead.
### is_read_only
```python
is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool
```
Returns if this interface is read-only.
### is_valid
```python
is_valid(self: omni.graph.core._omni_graph_core.IBundle2) -> bool
```
DEPRECATED - use bool cast instead
### link_attribute
```python
link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, *args, **kwargs)
```
Overloaded function.
1. ```python
link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, target_attribute: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData
```
Adds an attribute to this bundle as link with names taken from target attribute.
Added attribute is a link to other attribute that is part of another bundle.
The link is owned by this bundle, but target of the link is not.
Removing link from this bundle does not destroy the data link points to.
Args:
- target_attribute (omni.graph.core.AttributeData): Attribute whose data is to be added.
Returns:
- omni.graph.core.AttributeData: Attribute that is a link.
2. ```python
link_attribute(self: omni.graph.core._omni_graph_core.IBundle2, link_name: str, target_attribute: omni::graph::core::Py_AttributeData) -> omni::graph::core::Py_AttributeData
```
Adds an attribute to this bundle as link with custom name.
Added attribute is a link to other attribute that is part of another bundle.
The link is owned by this bundle, but target of the link is not.
Removing link from this bundle does not destroy the data link points to.
### Args:
- link_name (str): Name for new link.
- target_attribute (omni.graph.core.AttributeData): Attribute whose data is to be added.
### Returns:
- omni.graph.core.AttributeData: Attribute that is a link.
### link_attributes(*args, **kwargs)
Overloaded function.
1. link_attributes(self: omni.graph.core._omni_graph_core.IBundle2, target_attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni::graph::core::Py_AttributeData]
- Adds a set of attributes to this bundle as links with names taken from target attributes.
- Added attributes are links to other attributes that are part of another bundle. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the data links point to.
### Args:
- target_attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be added.
### Returns:
- list[omni.graph.core.AttributeData]: A list of attributes that are links.
2. link_attributes(self: omni.graph.core._omni_graph_core.IBundle2, link_names: List[str], target_attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni::graph::core::Py_AttributeData]
- Adds a set of attributes to this bundle as links with custom names.
- Added attributes are links to other attributes that are part of another bundle. The links are owned by this bundle, but targets of the links are not. Removing links from this bundle does not destroy the data links point to.
### Args:
- link_names (list[str]):
- target_attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be added.
### Returns:
- list[omni.graph.core.AttributeData]: A list of attributes that are links.
### link_child_bundle(*args, **kwargs)
Overloaded function.
1. link_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, name: str, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2
- Link a bundle as child in current bundle, under given name.
### Args:
- name (str): The name under which the child bundle should be linked
- bundle (omni.graph.core.IConstBundle2): The bundle to link
### Returns:
- omni.graph.core.IBundle2: The linked bundle.
2. link_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IBundle2
- Link a bundle as child in current bundle.
### Args:
- bundle (omni.graph.core.IConstBundle2): The bundle to link
### Returns:
- omni.graph.core.IBundle2: The linked bundle.
### link_child_bundles(*args, **kwargs)
Overloaded function.
- **link_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str], bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]**
> Link a set of bundles as child in current bundle, under given names.
> ```
> Args:
> names (list[str]): The names under which the child bundles should be linked
> bundles (list[omni.graph.core.IConstBundle2]): The bundles to link
> Returns:
> list[omni.graph.core.IBundle2]: The list of created bundles.
> ```
- **link_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]**
> Link a set of bundles as child in current bundle.
> ```
> Args:
> bundles (list[omni.graph.core.IConstBundle2]): The bundles to link
> Returns:
> list[omni.graph.core.IBundle2]: The list of created bundles.
> ```
- **remove_all_attributes(self: omni.graph.core._omni_graph_core.IBundle2) -> int**
> Remove all attributes from this bundle.
> ```
> Returns:
> Number of attributes successfully removed.
> Return type:
> int
> ```
- **remove_all_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2) -> int**
> Remove all child bundles from this bundle.
> Only empty bundles can be removed.
> ```
> Returns:
> Number of child bundles successfully removed.
> Return type:
> int
> ```
- **remove_attribute(*args, **kwargs)**
> Overloaded function.
> 1. remove_attribute(self: omni.graph.core._omni_graph_core.IBundle2, name: str) -> None
> 2. remove_attribute(self: omni.graph.core._omni_graph_core.IBundle2, attribute: omni::graph::core::Py_AttributeData) -> int
> ```
> Args:
> attribute (omni.graph.core.AttributeData): Attribute whose data is to be removed.
> Returns:
> omni.core.Result: Success if successfully removed.
> ```
> DEPRECATED - use remove_attribute_by_name() instead.
### remove_attribute_metadata
Overloaded function.
1. remove_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_names: List[str]) -> int
- Remove attribute metadata fields.
- Args:
- attribute (str): Name of the attribute.
- field_names (list[str]): Names of the fields to be removed.
- Returns:
- int: Number of fields successfully removed.
2. remove_attribute_metadata(self: omni.graph.core._omni_graph_core.IBundle2, attribute: str, field_name: str) -> int
- Remove attribute metadata field.
- Args:
- attribute (str): Name of the attribute.
- field_name (str): Name of the field to be removed.
- Returns:
- omni.core.Result: Success if successfully removed.
### remove_attributes
Overloaded function.
1. remove_attributes(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> None
- DEPRECATED - use remove_attributes_by_name() instead.
2. remove_attributes(self: omni.graph.core._omni_graph_core.IBundle2, attributes: List[omni::graph::core::Py_AttributeData]) -> int
- Looks up the attributes and if they are part of this bundle then remove them.
- Attribute handles that are not part of this bundle are ignored.
- Args:
- attributes (list[omni.graph.core.AttributeData]): Attributes whose data is to be removed.
- Returns:
- int: number of removed attributes
### remove_attributes_by_name
remove_attributes_by_name(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> int
- Looks up the attributes by names and remove their data and metadata.
- Parameters:
- names (list[str]) – Names of the attributes whose data is to be removed.
- Returns:
- Success if successfully removed.
- Return type:
- omni.core.Result
### remove_bundle_metadata(*args, **kwargs)
Overloaded function.
1. remove_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_names: List[str]) -> int
- Looks up bundle metadata fields and if they are part of this bundle metadata then remove them.
- Fields that are not part of this bundle are ignored.
- Args:
- field_names (list[str]): Names of the fields whose data is to be removed.
- Returns:
- int: Number of fields successfully removed.
2. remove_bundle_metadata(self: omni.graph.core._omni_graph_core.IBundle2, field_name: str) -> int
- Looks up bundle metadata field and if it is part of this bundle metadata then remove it.
- Field that is not part of this bundle is ignored.
- Args:
- field_name (str): Name of the field whose data is to be removed.
- Returns:
- omni.core.Result: Success if successfully removed.
### remove_child_bundle(self: omni.graph.core._omni_graph_core.IBundle2, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> int
- Looks up the bundle and if it is child of the bundle then remove it.
- Bundle handle that is not child of this bundle is ignored. Only empty bundle can be removed.
- Parameters:
- bundle (omni.graph.core.IConstBundle2) – bundle to be removed.
- Returns:
- Success if successfully removed.
- Return type:
- omni.core.Result
### remove_child_bundles(self: omni.graph.core._omni_graph_core.IBundle2, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> int
- Looks up the bundles and if they are children of the bundle then remove them.
## Description
Bundle handles that are not children of this bundle are ignored. Only empty bundles can be removed.
### Parameters
**bundles** (list [omni.graph.core.IConstBundle2]) – Bundles to be removed.
### Returns
Number of child bundles successfully removed.
### Return type
int
## Method: remove_child_bundles_by_name
remove_child_bundles_by_name(self: omni.graph.core._omni_graph_core.IBundle2, names: List[str]) -> int
### Description
Looks up child bundles by name and remove their data and metadata.
### Parameters
**names** (list [str]) – Names of the child bundles to be removed.
### Returns
Success if successfully removed.
### Return type
omni.core.Result | 37,100 |
omni.graph.core.IBundleChanges.md | # IBundleChanges
## IBundleChanges
```python
class omni.graph.core.IBundleChanges
```
Bases: `_IBundleChanges`
Interface for monitoring and handling changes in bundles and attributes.
The IBundleChanges_abi is an interface that provides methods for checking whether bundles and attributes have been modified, and cleaning them if they have been modified. This is particularly useful in scenarios where it’s crucial to track changes and maintain the state of bundles and attributes.
This interface provides several methods for checking and cleaning modifications, each catering to different use cases such as handling single bundles, multiple bundles, attributes, or specific attributes of a single bundle.
The methods of this interface return a BundleChangeType enumeration that indicates whether the checked entity (bundle or attribute) has been modified.
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `activate_change_tracking(*args, **kwargs)`
- Overloaded function.
- `clear_changes(self)`
- Clears all recorded changes.
- `create(arg0)`
-
- `deactivate_change_tracking(*args, **kwargs)`
- Overloaded function.
| get_change(*args, **kwargs) | Overloaded function. |
| --- | --- |
| get_changes(*args, **kwargs) | Overloaded function. |
__init__(self: omni.graph.core._omni_graph_core.IBundleChanges, *args, **kwargs)
- Overloaded function.
- __init__(self: omni.graph.core._omni_graph_core.IBundleChanges, arg0: omni.core._core.IObject) -> None
- __init__(self: omni.graph.core._omni_graph_core.IBundleChanges) -> None
activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, *args, **kwargs)
- Overloaded function.
- activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, handle: omni::graph::core::BundleHandle) -> int
- @brief Activate tracking for specific bundle on its attributes and children.
- @param handle to the specific bundles to enable change tracking.
- @return An omni::core::Result indicating the success of the operation.
- activate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IBundle2) -> None
- Activates the change tracking system for a bundle.
- This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles.
- Args:
- bundle: A bundle to activate change tracking system for.
clear_changes(self: omni.graph.core._omni_graph_core._IBundleChanges) -> int
- Clears all recorded changes.
- This method is used to clear or reset all the recorded changes of the bundles and attributes.
- It can be used when the changes have been processed and need to be discarded.
- An omni::core::Result indicating the success of the operation.
create(arg0: omni::graph::core::Py_GraphContext) -> omni.graph.core._omni_graph_core.IBundleChanges
### deactivate_change_tracking
Overloaded function.
1. deactivate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, handle: omni::graph::core::BundleHandle) -> int
@brief Deactivate tracking for specific bundle on its attributes and children.
@param handle to the specific bundles to enable change tracking.
@return An omni::core::Result indicating the success of the operation.
2. deactivate_change_tracking(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IBundle2) -> None
Deactivates the change tracking system for a bundle.
This method controls the change tracking system of a bundle. It’s only applicable for read-write bundles.
Args:
bundle: A bundle to deactivate change tracking system for.
### get_change
Overloaded function.
1. get_change(self: omni.graph.core._omni_graph_core.IBundleChanges, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.BundleChangeType
Retrieves the change status of a list of bundles.
This method is used to check if any of the provided bundles or their contents have been modified.
Args:
bundles: A list of the bundles to check for modifications.
Returns:
list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each bundle.
2. get_change(self: omni.graph.core._omni_graph_core.IBundleChanges, attribute: omni::graph::core::Py_AttributeData) -> omni.graph.core._omni_graph_core.BundleChangeType
Retrieves the change status of a specific attribute.
This method is used to check if a specific attribute has been modified.
Args:
attribute: The specific attribute to check for modifications.
Returns:
omni.graph.core.BundleChangeType: A BundleChangeType value indicating the type of change (if any) that has occurred to the attribute.
### get_changes
Overloaded function.
1. get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.BundleChangeType]
Retrieves the change status of a list of bundles.
This method is used to check if any of the bundles in the provided list or their contents have been modified.
Args:
bundles: A list of the bundles to check for modifications.
Returns:
list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each bundle.
2. get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, attributes: List[omni::graph::core::Py_AttributeData]) -> List[omni.graph.core._omni_graph_core.BundleChangeType]
Retrieves the change status of a list of attributes.
This method is used to check if any of the attributes in the provided list have been modified.
Args:
attributes: A list of attributes to check for modifications.
Returns:
list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each attribute.
- get_changes(self: omni.graph.core._omni_graph_core.IBundleChanges, entries: sequence) -> List[omni.graph.core._omni_graph_core.BundleChangeType]
- Retrieves the change status for a list of bundles and attributes.
- This method is used to check if any of the bundles or attributes in the provided list have been modified. If an entry in the list is neither a bundle nor an attribute, its change status will be marked as None.
- Args:
- entries: A list of bundles and attributes to check for modifications.
- Returns:
- list[omni.graph.core.BundleChangeType]: A list filled with BundleChangeType values for each entry in the provided list. | 6,521 |
omni.graph.core.IBundleFactory.md | # IBundleFactory
## IBundleFactory
- **Bases:** `_IBundleFactory`
- **Interface to create new bundles**
### Methods
- `__init__(*args, **kwargs)`
- **Overloaded function.**
- `create()`
- **Creates an interface object for bundle factories**
- `create_bundle(self, context, path)`
- **Create bundle at given path.**
- `create_bundles(self, context, paths)`
- **Create bundles at given paths.**
- `get_bundle(*args, **kwargs)`
- **Overloaded function.**
- `get_bundles(*args, **kwargs)`
- **Overloaded function.**
<span class="pre">
__init__
<span class="sig-paren">
(
<em class="sig-param">
<span class="o">
<span class="pre">
*
<span class="n">
<span class="pre">
args
,
<em class="sig-param">
<span class="o">
<span class="pre">
**
<span class="n">
<span class="pre">
kwargs
<span class="sig-paren">
)
<dd>
<p>
Overloaded function.
<ol class="arabic simple">
<li>
<p>
__init__(self: omni.graph.core._omni_graph_core.IBundleFactory, arg0: omni.core._core.IObject) -> None
<li>
<p>
__init__(self: omni.graph.core._omni_graph_core.IBundleFactory) -> None
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create">
<em class="property">
<span class="pre">
static
<span class="w">
<span class="sig-name descname">
<span class="pre">
create
<span class="sig-paren">
(
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
omni::core::Api<omni::graph::core::IBundleFactory2_abi>
<dd>
<p>
Creates an interface object for bundle factories
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
Created instance of bundle factory.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
omni.graph.core.IBundleFactory2
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create_bundle">
<span class="sig-name descname">
<span class="pre">
create_bundle
<span class="sig-paren">
(
<em class="sig-param">
<span class="n">
<span class="pre">
self:
<span class="pre">
omni.graph.core._omni_graph_core.IBundleFactory
,
<em class="sig-param">
<span class="n">
<span class="pre">
context:
<span class="pre">
omni::graph::core::Py_GraphContext
,
<em class="sig-param">
<span class="n">
<span class="pre">
path:
<span class="pre">
str
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<dd>
<p>
Create bundle at given path.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
context
(
<em>
omni.graph.core.GraphContext
) – The context where bundles are created.
<li>
<p>
<strong>
path
(
<em>
str
) – Location for new bundle.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
Bundle instance.
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
omni.graph.core.IBundle2
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IBundleFactory.create_bundles">
<span class="sig-name descname">
<span class="pre">
create_bundles
<span class="sig-paren">
(
<em class="sig-param">
<span class="pre">
self:
<span class="pre">
omni.graph.core._omni_graph_core.IBundleFactory,
<span class="pre">
context:
<span class="pre">
omni::graph::core::Py_GraphContext,
<span class="pre">
paths:
<span class="pre">
List[str]
<span class="sig-paren">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
List
<span class="p">
<span class="pre">
[
<a class="reference internal" href="omni.graph.core.IBundle2.html#omni.graph.core.IBundle2" title="omni.graph.core._omni_graph_core.IBundle2">
<span class="pre">
omni.graph.core._omni_graph_core.IBundle2
<span class="p">
<span class="pre">
]
<dd>
<p>
Create bundles at given paths.
<dl class="field-list simple">
<dt class="field-odd">
Parameters
<dd class="field-odd">
<ul class="simple">
<li>
<p>
<strong>
context
(
<em>
omni.graph.core.GraphContext
) – The context where bundles are created.
<li>
<p>
<strong>
paths
(
<em>
List[str]
) – Locations for new bundles.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
List of bundle instances.
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
List[omni.graph.core.IBundle2]
<em>
omni.graph.core.GraphContext
) – The context where bundles are created.
<strong>
paths
(
<em>
list
<em>
[
<em>
str
<em>
]
) – Locations for new bundles.
Returns
A list of bundle instances.
Return type
list[
omni.graph.core.IBundle2
]
get_bundle(
*args,
**kwargs
)
Overloaded function.
1. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IBundle2) -> omni.graph.core._omni_graph_core.IBundle2
2. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IConstBundle2
DEPRECATED - no conversion is required
get_bundles(
*args,
**kwargs
)
Overloaded function.
1. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IConstBundle2]
2. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]
DEPRECATED - no conversion is required | 5,973 |
omni.graph.core.IBundleFactory2.md | # IBundleFactory2
IBundleFactory version 2.
The version 2 allows to retrieve instances of IBundle instances from paths.
## Methods
| Method | Description |
| ------ | ----------- |
| `__init__(*args, **kwargs)` | Overloaded function. |
| `get_bundle_from_path(self, arg0, arg1)` | Get read write IBundle interface from path. |
| `get_const_bundle_from_path(self, arg0, arg1)` | Get read only IBundle interface from path. |
### `__init__(*args, **kwargs)`
Overloaded function.
1. `__init__(self: omni.graph.core._omni_graph_core.IBundleFactory2, arg0: omni.core._core.IObject) -> None`
2. `__init__(self: omni.graph.core._omni_graph_core.IBundleFactory2) -> None`
### `get_bundle_from_path(self, arg0, arg1)`
Get read write IBundle interface from path.
### `get_const_bundle_from_path(self, arg0, arg1)`
Get read only IBundle interface from path.
## get_bundle_from_path
Get read write IBundle interface from path.
### Parameters
- **context** (omni.graph.core.GraphContext) – The context where bundles belong to.
- **path** (str) – Location of the bundle.
### Returns
- Bundle instance.
### Return type
- omni.graph.core.IBundle2
## get_const_bundle_from_path
Get read only IBundle interface from path.
### Args
- context (omni.graph.core.GraphContext): The context where bundles belong to.
- path (str): Location of the bundle.
### Returns
- omni.graph.core.IConstBundle2: Bundle instance. | 1,409 |
omni.graph.core.IBundleFactory_omni.graph.core.IBundleFactory.md | # IBundleFactory
## IBundleFactory
- Bases: `_IBundleFactory`
- Interface to create new bundles
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `create()`
- Creates an interface object for bundle factories
- `create_bundle(self, context, path)`
- Create bundle at given path.
- `create_bundles(self, context, paths)`
- Create bundles at given paths.
- `get_bundle(*args, **kwargs)`
- Overloaded function.
- `get_bundles(*args, **kwargs)`
- Overloaded function.
<span class="pre">__init__
<span class="sig-paren">(
<em class="sig-param"><span class="o"><span class="pre">*
<em class="sig-param"><span class="o"><span class="pre">**
<span class="sig-paren">)
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.IBundleFactory, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.IBundleFactory) -> None
<span class="pre">static
<span class="sig-name descname"><span class="pre">create
<span class="sig-paren">(
<span class="sig-paren">)
<span class="sig-return"><span class="sig-return-icon">→
Creates an interface object for bundle factories
- Returns: Created instance of bundle factory.
- Return type: omni.graph.core.IBundleFactory2
<span class="sig-name descname"><span class="pre">create_bundle
<span class="sig-paren">(
<em class="sig-param"><span class="n"><span class="pre">self:
<em class="sig-param"><span class="n"><span class="pre">context:
<em class="sig-param"><span class="n"><span class="pre">path:
<span class="sig-paren">)
<span class="sig-return"><span class="sig-return-icon">→
Create bundle at given path.
- Parameters:
- context (omni.graph.core.GraphContext) – The context where bundles are created.
- path (str) – Location for new bundle.
- Returns: Bundle instance.
- Return type: omni.graph.core.IBundle2
<span class="sig-name descname"><span class="pre">create_bundles
<span class="sig-paren">(
<em class="sig-param"><span class="pre">self:
<span class="sig-paren">)
<span class="sig-return"><span class="sig-return-icon">→
Create bundles at given paths.
- Parameters:
- context (omni.graph.core.GraphContext) – The context where bundles are created.
- paths (List[str]) – Locations for new bundles.
- Returns: List of bundle instances.
- Return type: List[omni.graph.core.IBundle2]
<em>
omni.graph.core.GraphContext
) – The context where bundles are created.
<strong>
paths
(
<em>
list
<em>
[
<em>
str
<em>
]
) – Locations for new bundles.
Returns
A list of bundle instances.
Return type
list[
omni.graph.core.IBundle2
]
get_bundle(
*args
,
**kwargs
)
Overloaded function.
1. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IBundle2) -> omni.graph.core._omni_graph_core.IBundle2
2. get_bundle(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundle: omni.graph.core._omni_graph_core.IConstBundle2) -> omni.graph.core._omni_graph_core.IConstBundle2
DEPRECATED - no conversion is required
get_bundles(
*args
,
**kwargs
)
Overloaded function.
1. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IConstBundle2]) -> List[omni.graph.core._omni_graph_core.IConstBundle2]
2. get_bundles(self: omni.graph.core._omni_graph_core.IBundleFactory, context: omni::graph::core::Py_GraphContext, bundles: List[omni.graph.core._omni_graph_core.IBundle2]) -> List[omni.graph.core._omni_graph_core.IBundle2]
DEPRECATED - no conversion is required | 3,635 |
omni.graph.core.IConstBundle2.md | # IConstBundle2
## IConstBundle2
- Bases: `_IConstBundle2`
- Provide read only access to recursive bundles.
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `add_attribute(self, type, name)`
- DEPRECATED - use create_attribute() instead.
- `add_attributes(self, types, names)`
- DEPRECATED - use create_attributes() instead.
- `clear(self)`
- DEPRECATED - use clear_contents() instead
- `get_attribute_by_name(*args, **kwargs)`
- Overloaded function.
- `get_attribute_count(self)`
- Get the number of attributes in this bundle
- `get_attribute_data(self)`
- Get the data of an attribute by name
- `get_attribute_data(self[, write])`
- DEPRECATED - use get_attributes() instead
- `get_attribute_data_count(self)`
- DEPRECATED - use get_attribute_count() instead
- `get_attribute_metadata_by_name(self, *args, **kwargs)`
- Overloaded function.
- `get_attribute_metadata_count(self, attribute)`
- Gets the number of metadata fields in an attribute within the bundle
- `get_attribute_metadata_names(self, attribute)`
- Get names of all metadata fields in the attribute.
- `get_attribute_metadata_types(self, attribute)`
- Get types of all metadata fields in the attribute.
- `get_attribute_names(self)`
- Get the names of all attributes in this bundle.
- `get_attribute_names_and_types(self)`
- DEPRECATED - use get_attribute_names() or get_attribute_types() instead
- `get_attribute_types(self)`
- Get the types of all attributes in this bundle.
- `get_attributes(self)`
- Get all attributes in this bundle.
- `get_attributes_by_name(self, names)`
- Searches for attributes in this bundle by using attribute names.
- `get_bundle_metadata_by_name(self, *args, **kwargs)`
- Overloaded function.
- `get_bundle_metadata_count(self)`
- Get the number of metadata entries
- `get_bundle_metadata_names(self)`
- Get the names of all metadata fields in this bundle.
- `get_bundle_metadata_types(self)`
- Get types of all metadata fields in this bundle.
- `get_child_bundle(self, index)`
- Get the child bundle by index.
- `get_child_bundle_by_name(self, path)`
- Lookup for child under specified path.
- `get_child_bundle_count(self)`
- Get the number of child bundles
- `get_child_bundles(self)`
- Get all child bundle handles in this bundle.
- `get_child_bundles_by_name(self, names)`
- Lookup for children under specified names.
- `get_context(self)`
- Get the context used by this bundle
- `get_metadata_storage(self)`
- Get access to metadata storage that contains all metadata information
- `get_name(self)`
- Get the name of the bundle
- `get_parent_bundle(self)`
- Get the parent bundle
- `get_path(self)`
- Get the path to this bundle
- `get_prim_path(self)`
- DEPRECATED - use get_path() instead
- `insert_attribute(self, attribute_to_copy, name)`
- DEPRECATED - use copy_attribute() instead
- `insert_bundle(self, bundle_to_copy)`
- DEPRECATED - use copy_bundle() instead.
- `is_read_only(self)`
- Returns if this interface is read-only.
- `is_valid(self)`
- Returns if this interface is valid.
| Method | Description |
|--------|-------------|
| (self) | DEPRECATED - use bool cast instead |
| (self, name) | DEPRECATED - use remove_attribute_by_name() instead. |
| (self, names) | DEPRECATED - use remove_attributes_by_name() instead. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| valid | |
### Methods
#### __init__(*args, **kwargs)
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.IConstBundle2, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None
#### add_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, type: omni::graph::core::Py_Type, name: str) -> omni::graph::core::Py_AttributeData
DEPRECATED - use create_attribute() instead.
#### add_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, types: List[omni::graph::core::Py_Type], names: List[str]) -> None
DEPRECATED - use create_attributes() instead.
#### clear(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None
DEPRECATED - use clear_contents() instead
#### get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> omni::graph::core::Py_AttributeData
### get_attribute_by_name
Overloaded function.
1. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str, readOnly: bool) -> omni::graph::core::Py_AttributeData
DEPRECATED - use get_attribute_by_name(name) instead
2. get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> omni::graph::core::Py_AttributeData
Searches for attribute in this bundle by using attribute name.
Args:
- name (str): Attribute name to search for.
Returns:
- omni.graph.core.AttributeData: An attribute. If attribute is not found then invalid attribute is returned.
```
```markdown
### get_attribute_count
Get the number of attributes in this bundle
Returns:
- Number of attributes in this bundle.
- Return type: int
```
```markdown
### get_attribute_data
DEPRECATED - use get_attributes() instead
```
```markdown
### get_attribute_data_count
DEPRECATED - use get_attribute_count() instead
```
```markdown
### get_attribute_metadata_by_name
### get_attribute_metadata_by_name
Overloaded function.
1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]
- Search for metadata fields for the attribute by using field names.
- Args:
- attribute (str): Name of the attribute.
- field_names (list[str]): Attribute metadata fields to be searched for.
- Returns:
- list[omni.graph.core.AttributeData]: Array of metadata fields in the attribute.
2. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_name: str) -> omni::graph::core::Py_AttributeData
- Search for metadata field for the attribute by using field name.
- Args:
- attribute (str): Name of the attribute.
- field_name (str): Attribute metadata field to be searched for.
- Returns:
- omni.graph.core.AttributeData: Metadata fields in the attribute.
### get_attribute_metadata_count
Gets the number of metadata fields in an attribute within the bundle
- Parameters:
- attribute (str): Name of the attribute to count metadata for.
- Returns:
- Number of metadata fields in the attribute.
- Return type:
- int
### get_attribute_metadata_names
Get names of all metadata fields in the attribute.
- Parameters:
- attribute (str): Name of the attribute.
- Returns:
- Array of names in the attribute.
- Return type:
- list[str]
## omni.graph.core.IConstBundle2.get_attribute_metadata_types
### Description
Get types of all metadata fields in the attribute.
#### Parameters
- **attribute** (string) – Name of the attribute.
#### Returns
- Array of types in the attribute.
#### Return type
- list[omni.graph.core.Type]
## omni.graph.core.IConstBundle2.get_attribute_names
### Description
Get the names of all attributes in this bundle.
#### Returns
- A list of the names.
#### Return type
- list[str]
## omni.graph.core.IConstBundle2.get_attribute_names_and_types
### Description
DEPRECATED - use get_attribute_names() or get_attribute_types() instead
## omni.graph.core.IConstBundle2.get_attribute_types
### Description
Get the types of all attributes in this bundle.
#### Returns
- A list of the types.
#### Return type
- list[omni.graph.core.Type]
## omni.graph.core.IConstBundle2.get_attributes
### Description
## get_attributes
Get all attributes in this bundle.
### Returns
- A list of all attributes in this bundle.
### Return type
- list[omni.graph.core.AttributeData]
## get_attributes_by_name
Searches for attributes in this bundle by using attribute names.
### Parameters
- **names** (list[str]) – Attribute names to search for.
### Returns
- A list of found attributes.
### Return type
- list[omni.graph.core.AttributeData]
## get_bundle_metadata_by_name
Overloaded function.
1. get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]
- Search for field handles in this bundle by using field names.
- Args:
- field_names (list[str]): Bundle metadata fields to be searched for.
- Returns:
- list[omni.graph.core.AttributeData]: Metadata fields in this bundle.
2. get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_name: str) -> omni::graph::core::Py_AttributeData
- Search for field handle in this bundle by using field name.
- Args:
- field_name (str): Bundle metadata fields to be searched for.
- Returns:
- omni.graph.core.AttributeData: Metadata field in this bundle.
### get_bundle_metadata_count
```python
get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int
```
Get the number of metadata entries
**Returns:**
- Number of metadata fields in this bundle.
- Return type: int
### get_bundle_metadata_names
```python
get_bundle_metadata_names(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[str]
```
Get the names of all metadata fields in this bundle.
**Returns:**
- Array of names in this bundle.
- Return type: list[str]
### get_bundle_metadata_types
```python
get_bundle_metadata_types(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_Type]
```
Get the types of all metadata fields in this bundle.
**Returns:**
- Array of types in this bundle.
- Return type: list[omni.graph.core.Type]
### get_child_bundle
```python
get_child_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, index: int) -> omni.graph.core._omni_graph_core.IConstBundle2
```
Get the child bundle by index.
**Parameters:**
- **index** (int) – Child bundle index in range [0, child_bundle_count).
### Returns
- Child bundle under the index. If bundle index is out of range, then invalid bundle is returned.
### Return type
- omni.graph.core.IConstBundle2
### get_child_bundle_by_name
- Lookup for child under specified path.
- **Parameters**
- **path** (str) – Path to child bundle in this bundle.
- **Returns**
- Child bundle in this bundle. If child does not exist under the path, then invalid bundle is returned.
- **Return type**
- omni.graph.core.IConstBundle2
### get_child_bundle_count
- Get the number of child bundles
- **Returns**
- Number of child bundles in this bundle.
- **Return type**
- int
### get_child_bundles
- Get all child bundle handles in this bundle.
- **Returns**
- A list of all child bundles in this bundle.
- **Return type**
- list[omni.graph.core.IConstBundle2]
**get_child_bundles_by_name**(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) → List[omni.graph.core._omni_graph_core.IConstBundle2]
- **Description**: Lookup for children under specified names.
- **Parameters**:
- **names** (list[str]) – Names to child bundles in this bundle.
- **Returns**:
- A list of found child bundles in this bundle.
- **Return type**: list[omni.graph.core.IConstBundle2]
**get_context**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni::graph::core::Py_GraphContext
- **Description**: Get the context used by this bundle
- **Returns**:
- The context of this bundle.
- **Return type**: omni.graph.core.GraphContext
**get_metadata_storage**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni.graph.core._omni_graph_core.IConstBundle2
- **Description**: Get access to metadata storage that contains all metadata information
- **Returns**:
- List of bundles with the metadata information
- **Return type**: list[omni.graph.core.IBundle2]
**get_name**(self: omni.graph.core._omni_graph_core.IConstBundle2) → omni.graph.core._omni_graph_core.IConstBundle2
- **Description**: [Description for get_name method]
- **Returns**:
- [Return description]
- **Return type**: [Return type]
## omni.graph.core.IConstBundle2.get_name
- **Description**: Get the name of the bundle
- **Returns**:
- **Description**: The name of this bundle.
- **Type**: str
## omni.graph.core.IConstBundle2.get_parent_bundle
- **Description**: Get the parent bundle
- **Returns**:
- **Description**: The parent of this bundle, or invalid bundle if there is no parent.
- **Type**: omni.graph.core.IConstBundle2
## omni.graph.core.IConstBundle2.get_path
- **Description**: Get the path to this bundle
- **Returns**:
- **Description**: The path to this bundle.
- **Type**: str
## omni.graph.core.IConstBundle2.get_prim_path
- **Description**: DEPRECATED - use get_path() instead
## omni.graph.core.IConstBundle2.insert_attribute
- **Description**: DEPRECATED - use copy_attribute() instead
- **Parameters**:
- **self**: omni.graph.core._omni_graph_core.IConstBundle2
- **attribute_to_copy**: omni::graph::core::Py_AttributeData
- **name**: str
- **Returns**: omni::graph::core::Py_AttributeData
### insert_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) → None
DEPRECATED - use copy_bundle() instead.
### is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) → bool
Returns if this interface is read-only.
### is_valid(self: omni.graph.core._omni_graph_core.IConstBundle2) → bool
DEPRECATED - use bool cast instead
### remove_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) → None
DEPRECATED - use remove_attribute_by_name() instead.
### remove_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) → None
DEPRECATED - use remove_attributes_by_names() instead.
<dl class="function">
<dt id="omni.graph.core.IConstBundle2.remove_attributes">
<span class="sig-prename descclassname">omni.graph.core.IConstBundle2.
<span class="sig-name descname">remove_attributes
<span class="sig-param">
<span class="pre">self
<span class="sig-param">
<span class="pre">attributes
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint">
<span class="pre">None
<dd>
<p>DEPRECATED - use remove_attributes_by_name() instead.
| 14,472 |
omni.graph.core.IConstBundle2_omni.graph.core.IConstBundle2.md | # IConstBundle2
## IConstBundle2
```
Bases: `_IConstBundle2`
Provide read only access to recursive bundles.
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | Overloaded function. |
| `add_attribute(self, type, name)` | DEPRECATED - use create_attribute() instead. |
| `add_attributes(self, types, names)` | DEPRECATED - use create_attributes() instead. |
| `clear(self)` | DEPRECATED - use clear_contents() instead |
| `get_attribute_by_name(*args, **kwargs)` | Overloaded function. |
| `get_attribute_count(self)` | Get the number of attributes in this bundle |
| `get_attribute_data(self)` | |
- `get_attribute_data(self[, write])`
- DEPRECATED - use get_attributes() instead
- `get_attribute_data_count(self)`
- DEPRECATED - use get_attribute_count() instead
- `get_attribute_metadata_by_name(self, *args, **kwargs)`
- Overloaded function.
- `get_attribute_metadata_count(self, attribute)`
- Gets the number of metadata fields in an attribute within the bundle
- `get_attribute_metadata_names(self, attribute)`
- Get names of all metadata fields in the attribute.
- `get_attribute_metadata_types(self, attribute)`
- Get types of all metadata fields in the attribute.
- `get_attribute_names(self)`
- Get the names of all attributes in this bundle.
- `get_attribute_names_and_types(self)`
- DEPRECATED - use get_attribute_names() or get_attribute_types() instead
- `get_attribute_types(self)`
- Get the types of all attributes in this bundle.
- `get_attributes(self)`
- Get all attributes in this bundle.
- `get_attributes_by_name(self, names)`
- Searches for attributes in this bundle by using attribute names.
- `get_bundle_metadata_by_name(self, *args, **kwargs)`
- Overloaded function.
- `get_bundle_metadata_count(self)`
- Get the number of metadata entries
- `get_bundle_metadata_names(self)`
- Get the names of all metadata fields in this bundle.
- `get_bundle_metadata_types(self)`
- Get types of all metadata fields in this bundle.
- `get_child_bundle(self, index)`
- Get the child bundle by index.
- `get_child_bundle_by_name(self, path)`
- Lookup for child under specified path.
- `get_child_bundle_count(self)`
- Get the number of child bundles
- `get_child_bundles(self)`
- Get all child bundle handles in this bundle.
- `get_child_bundles_by_name(self, names)`
- Lookup for children under specified names.
- `get_context(self)`
- Get the context used by this bundle
- `get_metadata_storage(self)`
- Get access to metadata storage that contains all metadata information
- `get_name(self)`
- Get the name of the bundle
- `get_parent_bundle(self)`
- Get the parent bundle
- `get_path(self)`
- Get the path to this bundle
- `get_prim_path(self)`
- DEPRECATED - use get_path() instead
- `insert_attribute(self, attribute_to_copy, name)`
- DEPRECATED - use copy_attribute() instead
- `insert_bundle(self, bundle_to_copy)`
- DEPRECATED - use copy_bundle() instead.
- `is_read_only(self)`
- Returns if this interface is read-only.
- `is_valid(self)`
- Check if the interface is valid.
| Method | Description |
|--------|-------------|
| `remove_attribute(self)` | DEPRECATED - use bool cast instead |
| `remove_attribute(self, name)` | DEPRECATED - use remove_attribute_by_name() instead. |
| `remove_attributes(self, names)` | DEPRECATED - use remove_attributes_by_name() instead. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `valid` | |
### Methods
#### `__init__(self, *args, **kwargs)`
Overloaded function.
1. `__init__(self: omni.graph.core._omni_graph_core.IConstBundle2, arg0: omni.core._core.IObject) -> None`
2. `__init__(self: omni.graph.core._omni_graph_core.IConstBundle2) -> None`
#### `add_attribute(self, type: omni::graph::core::Py_Type, name: str)`
DEPRECATED - use create_attribute() instead.
#### `add_attributes(self, types: List[omni::graph::core::Py_Type], names: List[str])`
DEPRECATED - use create_attributes() instead.
#### `clear(self)`
DEPRECATED - use clear_contents() instead
#### `get_attribute_by_name(self, name)`
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_by_name">
<span class="sig-name descname"><span class="pre">get_attribute_by_name
<span class="sig-paren">(
<em class="sig-param">
<span class="n"><span class="pre">self
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2
,
<em class="sig-param">
<span class="n"><span class="pre">name
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><span class="pre">str
,
<em class="sig-param">
<span class="n"><span class="pre">readOnly
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><span class="pre">bool
<span class="sig-paren">)
<a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_by_name" title="Permalink to this definition">
<dd>
<p>Overloaded function.
<ol class="arabic simple">
<li>
<p>get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str, readOnly: bool) -> omni::graph::core::Py_AttributeData
<p>DEPRECATED - use get_attribute_by_name(name) instead
<ol class="arabic" start="2">
<li>
<p>get_attribute_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> omni::graph::core::Py_AttributeData
<blockquote>
<div>
<p>Searches for attribute in this bundle by using attribute name.
<dl class="simple">
<dt>Args:
<dd>
<p>name (str): Attribute name to search for.
<dt>Returns:
<dd>
<p>omni.graph.core.AttributeData: An attribute. If attribute is not found then invalid attribute is returned.
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_count">
<span class="sig-name descname"><span class="pre">get_attribute_count
<span class="sig-paren">(
<em class="sig-param">
<span class="n"><span class="pre">self
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2
<span class="sig-paren">)
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint"><span class="pre">int
<a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_count" title="Permalink to this definition">
<dd>
<p>Get the number of attributes in this bundle
<dl class="field-list simple">
<dt class="field-odd">Returns
<dd class="field-odd">
<p>Number of attributes in this bundle.
<dt class="field-even">Return type
<dd class="field-even">
<p>int
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_data">
<span class="sig-name descname"><span class="pre">get_attribute_data
<span class="sig-paren">(
<em class="sig-param">
<span class="n"><span class="pre">self
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2
,
<em class="sig-param">
<span class="n"><span class="pre">write
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><span class="pre">bool
<span class="w">
<span class="o"><span class="pre">=
<span class="w">
<span class="default_value"><span class="pre">False
<span class="sig-paren">)
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint"><span class="pre">list
<a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_data" title="Permalink to this definition">
<dd>
<p>DEPRECATED - use get_attributes() instead
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_data_count">
<span class="sig-name descname"><span class="pre">get_attribute_data_count
<span class="sig-paren">(
<em class="sig-param">
<span class="n"><span class="pre">self
<span class="p"><span class="pre">:
<span class="w">
<span class="n"><a class="reference internal" href="#omni.graph.core.IConstBundle2" title="omni.graph.core._omni_graph_core.IConstBundle2"><span class="pre">omni.graph.core._omni_graph_core.IConstBundle2
<span class="sig-paren">)
<span class="sig-return">
<span class="sig-return-icon">→
<span class="sig-return-typehint"><span class="pre">int
<a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_data_count" title="Permalink to this definition">
<dd>
<p>DEPRECATED - use get_attribute_count() instead
<dl class="py method">
<dt class="sig sig-object py" id="omni.graph.core.IConstBundle2.get_attribute_metadata_by_name">
<span class="sig-name descname"><span class="pre">get_attribute_metadata_by_name
<span class="sig-paren">(
<em class="sig-param">
<span class="o"><span class="pre">*
<span class="n"><span class="pre">args
,
<em class="sig-param">
<span class="o"><span class="pre">**
<span class="n"><span class="pre">kwargs
<span class="sig-paren">)
<a class="headerlink" href="#omni.graph.core.IConstBundle2.get_attribute_metadata_by_name" title="Permalink to this definition">
<dd>
<p>DEPRECATED - use get_attribute_metadata_by_name(name) instead
### get_attribute_metadata_by_name
Overloaded function.
1. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]
- Search for metadata fields for the attribute by using field names.
- Args:
- attribute (str): Name of the attribute.
- field_names (list[str]): Attribute metadata fields to be searched for.
- Returns:
- list[omni.graph.core.AttributeData]: Array of metadata fields in the attribute.
2. get_attribute_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, attribute: str, field_name: str) -> omni::graph::core::Py_AttributeData
- Search for metadata field for the attribute by using field name.
- Args:
- attribute (str): Name of the attribute.
- field_name (str): Attribute metadata field to be searched for.
- Returns:
- omni.graph.core.AttributeData: Metadata fields in the attribute.
### get_attribute_metadata_count
Gets the number of metadata fields in an attribute within the bundle
- Parameters:
- attribute (str): Name of the attribute to count metadata for.
- Returns:
- Number of metadata fields in the attribute.
- Return type:
- int
### get_attribute_metadata_names
Get names of all metadata fields in the attribute.
- Parameters:
- attribute (str): Name of the attribute.
- Returns:
- Array of names in the attribute.
- Return type:
- list[str]
### get_attribute_metadata_types
Get types of all metadata fields in the attribute.
**Parameters**
- **attribute** (string) – Name of the attribute.
**Returns**
- Array of types in the attribute.
**Return type**
- list[omni.graph.core.Type]
### get_attribute_names
Get the names of all attributes in this bundle.
**Returns**
- A list of the names.
**Return type**
- list[str]
### get_attribute_names_and_types
DEPRECATED - use get_attribute_names() or get_attribute_types() instead
### get_attribute_types
Get the types of all attributes in this bundle.
**Returns**
- A list of the types.
**Return type**
- list[omni.graph.core.Type]
## Methods
### get_attributes
```python
def get_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_AttributeData]:
```
Get all attributes in this bundle.
**Returns:**
A list of all attributes in this bundle.
**Return type:**
list[omni.graph.core.AttributeData]
### get_attributes_by_name
```python
def get_attributes_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) -> List[omni::graph::core::Py_AttributeData]:
```
Searches for attributes in this bundle by using attribute names.
**Parameters:**
- **names** (list[str]) – Attribute names to search for.
**Returns:**
A list of found attributes.
**Return type:**
list[omni.graph.core.AttributeData]
### get_bundle_metadata_by_name
```python
def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, *args, **kwargs) -> None:
```
Overloaded function.
1. ```python
def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_names: List[str]) -> List[omni::graph::core::Py_AttributeData]:
```
Search for field handles in this bundle by using field names.
**Args:**
- field_names (list[str]): Bundle metadata fields to be searched for.
**Returns:**
list[omni.graph.core.AttributeData]: Metadata fields in this bundle.
2. ```python
def get_bundle_metadata_by_name(self: omni.graph.core._omni_graph_core.IConstBundle2, field_name: str) -> omni::graph::core::Py_AttributeData:
```
Search for field handle in this bundle by using field name.
**Args:**
- field_name (str): Bundle metadata fields to be searched for.
**Returns:**
omni.graph.core.AttributeData: Metadata field in this bundle.
```
### get_bundle_metadata_count
```python
def get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int:
```
Get the count of metadata in this bundle.
**Returns:**
int: The number of metadata in this bundle.
```
### get_bundle_metadata_count
```python
get_bundle_metadata_count(self: omni.graph.core._omni_graph_core.IConstBundle2) -> int
```
Get the number of metadata entries
**Returns**
- Number of metadata fields in this bundle.
- Return type: int
### get_bundle_metadata_names
```python
get_bundle_metadata_names(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[str]
```
Get the names of all metadata fields in this bundle.
**Returns**
- Array of names in this bundle.
- Return type: list[str]
### get_bundle_metadata_types
```python
get_bundle_metadata_types(self: omni.graph.core._omni_graph_core.IConstBundle2) -> List[omni::graph::core::Py_Type]
```
Get the types of all metadata fields in this bundle.
**Returns**
- Array of types in this bundle.
- Return type: list[omni.graph.core.Type]
### get_child_bundle
```python
get_child_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, index: int) -> omni.graph.core._omni_graph_core.IConstBundle2
```
Get the child bundle by index.
**Parameters**
- **index** (int) – Child bundle index in range [0, child_bundle_count).
### Returns
- **Child bundle under the index. If bundle index is out of range, then invalid bundle is returned.**
### Return type
- **omni.graph.core.IConstBundle2**
### get_child_bundle_by_name
- **get_child_bundle_by_name(self: omni.graph.core.IConstBundle2, path: str) -> omni.graph.core.IConstBundle2**
- **Lookup for child under specified path.**
#### Parameters
- **path (str) – Path to child bundle in this bundle.**
#### Returns
- **Child bundle in this bundle. If child does not exist under the path, then invalid bundle is returned.**
#### Return type
- **omni.graph.core.IConstBundle2**
### get_child_bundle_count
- **get_child_bundle_count(self: omni.graph.core.IConstBundle2) -> int**
- **Get the number of child bundles**
#### Returns
- **Number of child bundles in this bundle.**
#### Return type
- **int**
### get_child_bundles
- **get_child_bundles(self: omni.graph.core.IConstBundle2) -> List[omni.graph.core.IConstBundle2]**
- **Get all child bundle handles in this bundle.**
#### Returns
- **A list of all child bundles in this bundle.**
#### Return type
- **list[omni.graph.core.IConstBundle2]**
### get_child_bundles_by_name
- **get_child_bundles_by_name(self: omni.graph.core.IConstBundle2, name: str) -> List[omni.graph.core.IConstBundle2]**
- **Get child bundles by name.**
#### Parameters
- **name (str) – Name of the child bundles to retrieve.**
#### Returns
- **A list of child bundles with the specified name.**
#### Return type
- **list[omni.graph.core.IConstBundle2]**
### get_child_bundles_by_name
- **Parameters**
- **names** (list[str]) – Names to child bundles in this bundle.
- **Returns**
- A list of found child bundles in this bundle.
- **Return type**
- list[omni.graph.core.IConstBundle2]
### get_context
- **Returns**
- The context of this bundle.
- **Return type**
- omni.graph.core.GraphContext
### get_metadata_storage
- **Returns**
- List of bundles with the metadata information
- **Return type**
- list[omni.graph.core.IBundle2]
### get_name
- **Returns**
- The name of this bundle.
- **Return type**
- str
### omni.graph.core.IConstBundle2.get_name
- **Description**: Get the name of the bundle
- **Returns**: The name of this bundle.
- **Return type**: str
### omni.graph.core.IConstBundle2.get_parent_bundle
- **Description**: Get the parent bundle
- **Returns**: The parent of this bundle, or invalid bundle if there is no parent.
- **Return type**: omni.graph.core.IConstBundle2
### omni.graph.core.IConstBundle2.get_path
- **Description**: Get the path to this bundle
- **Returns**: The path to this bundle.
- **Return type**: str
### omni.graph.core.IConstBundle2.get_prim_path
- **Description**: DEPRECATED - use get_path() instead
### omni.graph.core.IConstBundle2.insert_attribute
- **Description**: DEPRECATED - use copy_attribute() instead
- **Parameters**:
- self: omni.graph.core._omni_graph_core.IConstBundle2
- attribute_to_copy: omni::graph::core::Py_AttributeData
- name: str
- **Returns**: omni::graph::core::Py_AttributeData
### insert_bundle(self: omni.graph.core._omni_graph_core.IConstBundle2, bundle_to_copy: omni.graph.core._omni_graph_core.IConstBundle2) -> None
DEPRECATED - use copy_bundle() instead.
### is_read_only(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool
Returns if this interface is read-only.
### is_valid(self: omni.graph.core._omni_graph_core.IConstBundle2) -> bool
DEPRECATED - use bool cast instead
### remove_attribute(self: omni.graph.core._omni_graph_core.IConstBundle2, name: str) -> None
DEPRECATED - use remove_attribute_by_name() instead.
### remove_attributes(self: omni.graph.core._omni_graph_core.IConstBundle2, names: List[str]) -> None
<dl class="function">
<dt id="omni.graph.core.IConstBundle2.remove_attributes">
<span class="sig-prename">omni.graph.core.IConstBundle2.
<span class="sig-name">remove_attributes
<span class="sig-param">
<span class="sig-param-icon">
(
<span class="sig-param-typehint">
<span class="pre">
const_attributes: List[str]
<span class="sig-param-icon">
)
<span class="sig-return">
<span class="sig-return-icon">
→
<span class="sig-return-typehint">
<span class="pre">
None
<dd>
<p>
DEPRECATED - use remove_attributes_by_name() instead.
| 19,956 |
omni.graph.core.INodeCategories.md | # INodeCategories
## Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `define_category(self, category_name, ...)`
- Define a new category
- `get_all_categories()`
- Get the list of available categories and their descriptions.
- `get_node_categories(node_id)`
- Return the list of categories that have been applied to the node.
- `get_node_type_categories(node_type_id)`
- Return the list of categories that have been applied to the node type.
- `remove_category(self, category_name)`
- Remove an existing category, mainly to manage the ones created by a node type for itself
## Attributes
### category_count
### __init__
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.INodeCategories, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.INodeCategories) -> None
### define_category
Define a new category
@param[in] categoryName Name of the new category
@param[in] categoryDescription Description of the category
@return false if there was already a category with the given name
### get_all_categories
Get the list of available categories and their descriptions.
Returns: Dictionary with categories as a name:description dictionary if it succeeded, else None
Return type: dict[str,str]
### get_node_categories
Return the list of categories that have been applied to the node.
Parameters:
- **node_id** (str | Node) – The node, or path to the node, whose categories are to be found
## get_node_type_categories
- **Parameters:**
- **node_type_id** (str | NodeType) – The node type, or name of the node type, whose categories are to be found
- **Returns:**
- A list of category names applied to the node type if it succeeded, else None
- **Return type:** list[str]
## remove_category
- **Description:** Remove an existing category, mainly to manage the ones created by a node type for itself
- **Parameters:**
- **categoryName** Name of the category to remove
- **Returns:** false if there was no category with the given name | 2,029 |
omni.graph.core.INodeTypeForwarding.md | # INodeTypeForwarding
## INodeTypeForwarding
```python
class omni.graph.core.INodeTypeForwarding(_INodeTypeForwarding)
```
@brief Interface that creates a forward on a request for a node type to a different node type
There are a couple of different common use cases for needing a forward:
- Node type gets renamed
- Node type moves from one extension to another
The node type forward specifies the unique node type name so if extension omni.my.extension has a node whose type is specified as “MyNode” then the forward must be from “omni.my.extension.MyNode”.
The forwarding is version-based as well, where the version is a minimum number required for forwarding, the usual node version update mechanism not withstanding. For example, if you set up a forward from “omni.nodes.MyNode” version 2 to “omni.my_nodes.MyNode” version 3 then any larger version number is forwarded to the same location:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(3) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(4) -> omni.my_nodes.MyNode(3)
The forwards can also have multiple versions forwarding to different locations, so if on top of the above forward you also add a forward from “omni.nodes.MyNode” version 3 to “omni.new_nodes.MyNode” version 4 then these become the example forward locations:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4)
- omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4)
Version numbers lower than the first forward are left as-is
- omni.nodes.MyNode(1) -> omni.nodes.MyNode(1)
@note The usual mechanism of calling updateVersionNumber on a node is only applied after a forward so in the above cases requesting omni.nodes.MyNode(2) does not call updateVersionNumber(1,2) on your omni.nodes.MyNode implementation.
Node type forwards are associative, so if A forwards to B and B forwards to C then when you request A you get C. Adding a new forward from omni.my_nodes.MyNode(3) to omni.new_nodes.MyNode(2) above yields this forwarding:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) -> omni.new_nodes.MyNode(2)
- omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4)
- omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4)
## Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `define_forward(self, forward_name, ...)`
- @brief Define a new node type forward.
- `find_forward(self, forward_name, ...)`
- @brief Find a node type forward.
| Method | Description |
|--------|-------------|
| `find_forward(forward_name, forward_version)` | Find a node type name replacement corresponding to the given node type forward name and version. |
| `get_forwarding()` | Get the list of available node type forwarding. |
| `remove_forward(self, forward_name, ...)` | @brief Remove an existing node type forward. |
| `remove_forwarded_type(self, referenced_name, ...)` | @brief Remove forwards referencing a given node type name. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `forward_count` | |
### Methods
#### `__init__(*args, **kwargs)`
Overloaded function.
1. `__init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding, arg0: omni.core._core.IObject) -> None`
2. `__init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding) -> None`
#### `define_forward(self, forward_name: str, forward_version: int, replacement_name: str, replacement_version: int, replacement_extension_id: str) -> bool`
@brief Define a new node type forward.
It is allowed to have the same forwardName to be defined more than once, however the “forwardVersion” must be
different from any existing ones. Later “forwardVersion” numbers will supersede earlier ones in this case.
For example if you have these two forwards set up:
- OldNode,1 -> BetterNode,1,omni.better.extension
- OldNode,2 -> MuchBetterNode,1,omni.much_better.extension
then when version 1 of “OldNode” is requested it will treat it as if you requested “BetterNode”, but when
versions 2 or later are requested it will instead treat it as if you requested “MuchBetterNode”. These can be
chained together:
- OldNode,1 -> BetterNode,1,omni.better.extension
- BetterNode,1 -> MuchBetterNode,1,omni.much_better.extension
@param[in] forwardName Name to be replaced
@param[in] forwardVersion The first version of the forward name to be replaced
@param[in] replacementName Node type name that replaces the forwarded name
@param[in] replacementVersion Version of the node type that replaces the forwarded name
@param[in] extensionId Extension ID in which the replacement node type can be found
@return false if there was already an forward with the given name and initial version number
## find_forward
Find a node type name replacement corresponding to the given node type forward name and version.
### Parameters
- **forward_name** – Name of the node type forward to look up
- **forward_version** – Version number of the node type forward being looked up
### Returns
Matching forward as (new_name, new_version, new_extension) if one was found, else None.
e.g. find_forward(“OldNode”, 2) -> (“NewNode”, 1, “omni.my.extension”)
### Return type
tuple[str,int,str] | None
### Raises
**ValueError** – if there was no forward for the given name/version combination
## get_forwarding
Get the list of available node type forwarding.
### Returns
Dictionary of all defined forwarding as
(forwarded_name, forwarded_version): (new_name, new_version, new_extension) if it succeeded, else None.
e.g. {(“OldNode”, 2): (“NewNode”, 1, “omni.my.extension”)}
### Return type
dict[tuple[str,str], tuple[str,int,str]] | None
### Raises
**ValueError** – if retrieval of the forwarding failed
## remove_forward
Remove a node type forward.
### Parameters
- **self** – omni.graph.core._omni_graph_core.INodeTypeForwarding
- **forward_name** – str
- **forward_version** – int
### Returns
bool
## Description
### Remove an existing node type forward
@brief Remove an existing node type forward.
Since an forwardName + forwardVersion combination is unique there is no need to pass in the replacement information.
Only the forward with the matching version is removed. Any others with the same name remain untouched.
@param[in] forwardName Forward to be removed
@param[in] forwardVersion The version at which the forward is to be removed
@return false if there was already an forward with the given name and initial version number
### Remove forwards referencing a given node type name
@brief Remove forwards referencing a given node type name.
@param[in] referencedName Forward to be removed
@param[in] referencedVersion The version at which the forward is to be removed
@return number of forwards to the given type that were removed | 6,704 |
omni.graph.core.INodeTypeForwarding2.md | # INodeTypeForwarding2
## INodeTypeForwarding2
```python
class omni.graph.core.INodeTypeForwarding2
```
- Bases: `_INodeTypeForwarding2`
- @brief Interface that creates a forward on a request for a node type to a different node type
- There are a couple of different common use cases for needing a forward:
- Node type gets renamed
- Node type moves from one extension to another
- The node type forward specifies the unique node type name so if extension omni.my.extension has a node whose type is specified as “MyNode” then the forward must be from “omni.my.extension.MyNode”.
- The forwarding is version-based as well, where the version is a minimum number required for forwarding, the usual node version update mechanism not withstanding. For example, if you set up a forward from “omni.nodes.MyNode” version 2 to “omni.my_nodes.MyNode” version 3 then any larger version number is forwarded to the same location:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(3) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(4) -> omni.my_nodes.MyNode(3)
- The forwards can also have multiple versions forwarding to different locations, so if on top of the above forward you also add a forward from “omni.nodes.MyNode” version 3 to “omni.new_nodes.MyNode” version 4 then these become the example forward locations:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3)
- omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4)
- omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4)
- Version numbers lower than the first forward are left as-is
- omni.nodes.MyNode(1) -> omni.nodes.MyNode(1)
- @note The usual mechanism of calling updateVersionNumber on a node is only applied after a forward so in the above cases requesting omni.nodes.MyNode(2) does not call updateVersionNumber(1,2) on your omni.nodes.MyNode implementation.
- Node type forwards are associative, so if A forwards to B and B forwards to C then when you request A you get C. Adding a new forward from omni.my_nodes.MyNode(3) to omni.new_nodes.MyNode(2) above yields this forwarding:
- omni.nodes.MyNode(2) -> omni.my_nodes.MyNode(3) -> omni.new_nodes.MyNode(2)
- omni.nodes.MyNode(3) -> omni.new_nodes.MyNode(4)
- omni.nodes.MyNode(4) -> omni.new_nodes.MyNode(4)
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `inspect(self, inspector)`
- Runs the inspector on the scheduling hints.
### Attributes
```
## Methods
### __init__
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding2, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.INodeTypeForwarding2) -> None
### inspect
Runs the inspector on the scheduling hints.
@param[in] inspector The inspector class
@return true if the inspection ran successfully, false if the inspection type is not supported | 2,850 |
omni.graph.core.in_compute.md | # in_compute
## in_compute
Mark block of code executed at runtime. Optimizations can apply like setting values without undo support.
This function is a context manager.
Example:
```python
with omni.graph.in_compute():
exec(state._code_object)
```
### Yields
- **None** – Just used to mark a compute section
``` | 318 |
omni.graph.core.IPrimView.md | # IPrimView
## IPrimView
PrimView is an interface that provides a view to a set of prims for use with OmniGraph instancing.
The prim view provides both a list of prims, and a layout of which prims can be treated as consecutive data in fabric
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | Overloaded function. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `paths` | Returns the list of prim paths as a flat list. |
| `prim_count` | |
| `segments` | Returns the property paths as a list of lists of segments. |
#### `__init__(*args, **kwargs)`
```
## Overloaded function
1. `__init__(self: omni.graph.core._omni_graph_core.IPrimView, arg0: omni.core._core.IObject) -> None`
2. `__init__(self: omni.graph.core._omni_graph_core.IPrimView) -> None`
### paths
property paths
Returns the list of prim paths as a flat list.
### segments
property segments
Returns the property paths as a list of lists of segments.
If the prim view supports ordering prims by bucket, then each sublist represents the prims in a single bucket, in the order they appear in the bucket.
The order of the buckets is arbitrary, but stable between calls where the buckets have not been updated | 1,248 |
omni.graph.core.ISchedulingHints.md | # ISchedulingHints
## ISchedulingHints
- **Bases:** `_ISchedulingHints`
- **Description:** Interface to the list of scheduling hints that can be applied to a node type
### Methods
- `__init__(*args, **kwargs)`
- Overloaded function.
- `get_data_access(self, data_type)`
- Get the type of access the node has for a given data type
- `inspect(self, inspector)`
- Runs the inspector on the scheduling hints.
- `set_data_access(self, data_type, new_access_type)`
- Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access).
### Attributes
- `compute_rule`
- `thread_safety`
### __init__
(
*args
,
**kwargs
)
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints) -> None
### get_data_access
(
self: omni.graph.core._omni_graph_core._ISchedulingHints
,
data_type: omni.graph.core._omni_graph_core.eAccessLocation
)
→
omni.graph.core._omni_graph_core.eAccessType
Get the type of access the node has for a given data type
@param[in] dataType Type of data for which access type is being modified
@returns Value of the access type flag
### inspect
(
self: omni.graph.core._omni_graph_core.ISchedulingHints
,
inspector: omni::core::Api<omni::inspect::IInspector_abi>
)
→
bool
Runs the inspector on the scheduling hints.
@param[in] inspector The inspector class
@return true if the inspection ran successfully, false if the inspection type is not supported
### set_data_access
(
self: omni.graph.core._omni_graph_core._ISchedulingHints
,
data_type: omni.graph.core._omni_graph_core.eAccessLocation
,
new_access_type: omni.graph.core._omni_graph_core.eAccessType
)
→
None
Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access).
Setting any of these flags will, in most cases, automatically mark the node as “not threadsafe”.
One current exception to this is allowing a node to be both threadsafe and a writer to USD, since
such behavior can be achieved if delayed writebacks (e.g. “registerForUSDWriteBack”) are utilized
in the node’s compute method.
@param[in] dataType Type of data for which access type is being modified
@param[in] newAccessType New value of the access type flag | 2,326 |
omni.graph.core.ISchedulingHints2.md | # ISchedulingHints2
## ISchedulingHints2
- Bases: `_ISchedulingHints2`
- Interface extension for ISchedulingHints that adds a new “pure” hint
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | Overloaded function. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `purity_status` | |
### `__init__`
- Overloaded function.
- `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2, arg0: omni.core._core.IObject) -> None`
- `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2) -> None`
- `__init__(self: omni.graph.core._omni_graph_core.ISchedulingHints2, arg0: omni.graph.core._omni_graph_core.ISchedulingHints) -> None` | 725 |
omni.graph.core.ISchedulingHints_omni.graph.core.ISchedulingHints.md | # ISchedulingHints
## ISchedulingHints
- **Bases:** `_ISchedulingHints`
- **Description:** Interface to the list of scheduling hints that can be applied to a node type
### Methods
- `__init__(*args, **kwargs)`
- **Description:** Overloaded function.
- `get_data_access(self, data_type)`
- **Description:** Get the type of access the node has for a given data type
- `inspect(self, inspector)`
- **Description:** Runs the inspector on the scheduling hints.
- `set_data_access(self, data_type, new_access_type)`
- **Description:** Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access).
### Attributes
- `compute_rule`
- `thread_safety`
__init__
(
*args
,
**kwargs
)
Overloaded function.
1. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints, arg0: omni.core._core.IObject) -> None
2. __init__(self: omni.graph.core._omni_graph_core.ISchedulingHints) -> None
get_data_access
(
self: omni.graph.core._omni_graph_core._ISchedulingHints
,
data_type: omni.graph.core._omni_graph_core.eAccessLocation
)
→ omni.graph.core._omni_graph_core.eAccessType
Get the type of access the node has for a given data type
@param[in] dataType Type of data for which access type is being modified
@returns Value of the access type flag
inspect
(
self: omni.graph.core._omni_graph_core.ISchedulingHints
,
inspector: omni::core::Api<omni::inspect::IInspector_abi>
)
→ bool
Runs the inspector on the scheduling hints.
@param[in] inspector The inspector class
@return true if the inspection ran successfully, false if the inspection type is not supported
set_data_access
(
self: omni.graph.core._omni_graph_core._ISchedulingHints
,
data_type: omni.graph.core._omni_graph_core.eAccessLocation
,
new_access_type: omni.graph.core._omni_graph_core.eAccessType
)
→ None
Set the flag describing how a node accesses particular data in its compute _abi (defaults to no access).
Setting any of these flags will, in most cases, automatically mark the node as “not threadsafe”.
One current exception to this is allowing a node to be both threadsafe and a writer to USD, since
such behavior can be achieved if delayed writebacks (e.g. “registerForUSDWriteBack”) are utilized
in the node’s compute method.
@param[in] dataType Type of data for which access type is being modified
@param[in] newAccessType New value of the access type flag
# 标题(根据实际的HTML标题级别确定)
## 子标题(如果有)
### 更小的子标题(如果有)
**加粗文本**(如果有)
*斜体文本*(如果有)
> 引用文本(如果有)
无序列表(如果有):
- 列表项1
- 列表项2
有序列表(如果有):
1. 列表项1
2. 列表项2
代码块(如果有):
```
代码内容
```
段落(如果有):
这里是段落内容。
分割线(如果有):
---
脚注(如果有):
[文本信息](#)(注意:链接被替换为Markdown格式的占位符,实际不包含URL)
图片(如果有):
(注意:图片链接被删除,只保留描述文本) | 2,682 |
omni.graph.core.is_attribute_plain_data.md | # is_attribute_plain_data
## is_attribute_plain_data
Is the given attribute numeric or string data?
### Parameters
- **attrib** – The attribute in question
### Returns
- True if the given attribute is numeric or string data
### Return type
- bool | 251 |
omni.graph.core.is_global_graph_prim.md | # is_global_graph_prim
## is_global_graph_prim
```python
omni.graph.core.is_global_graph_prim(prim_path: str) -> bool
```
Determines if the prim path passed in represents a prim that is backing a global graph
**Parameters:**
- **prim_path** (str) – The path to the prim in question
**Returns:**
- True if the prim path represents a prim that is backing a global graph, False otherwise
**Return type:**
- bool
``` | 416 |
omni.graph.core.is_in_compute.md | # is_in_compute
## is_in_compute
```python
omni.graph.core.is_in_compute() -> bool
```
Mark entry of OmniGraph runtime computation.
**Returns:**
- True if compute is currently underway
**Return type:**
- bool
``` | 215 |
omni.graph.core.IVariable.md | # IVariable
## IVariable
### Bases:
- `_IVariable`
### Description:
Object that contains a value that is local to a graph, available from anywhere in the graph
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | Overloaded function. |
| `get(self, graph_context, instance_path)` | Get the value of a variable |
| `get_array(self, graph_context, ...)` | Get the value of an array variable |
| `set(self, graph_context, value, instance_path)` | Sets the value of a variable |
| `set_type(self, variable_type)` | Changes the type of a variable. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `category` | |
| Property | Description |
|----------|-------------|
| `display_name` | |
| `name` | |
| `scope` | |
| `source_path` | |
| `tooltip` | |
| `type` | Gets the data type of the variable. |
| `valid` | |
### `__init__(*args, **kwargs)`
Overloaded function.
1. `__init__(self: omni.graph.core._omni_graph_core.IVariable, arg0: omni.core._core.IObject) -> None`
2. `__init__(self: omni.graph.core._omni_graph_core.IVariable) -> None`
### `get(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) -> object`
Get the value of a variable
- Parameters:
- `graph_context` (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from.
- `instance_path` (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
- Returns:
- Value of the variable
- Return type:
- Any
### `get_array(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, get_for_write: bool = False, reserved_element_count: int = ...) -> ...`
### omni.graph.core.IVariable.get_array
**Description:** Get the value of an array variable
**Parameters:**
- **graph_context** (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from.
- **get_for_write** (bool) – Should the data be retrieved for writing?
- **reserved_element_count** (int) – If the data is to be retrieved for writing, preallocate this many elements
- **instance_path** (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
**Returns:** Value of the array variable
**Return type:** Any
### omni.graph.core.IVariable.set
**Description:** Sets the value of a variable
**Parameters:**
- **graph_context** (omni.graph.core.GraphContext) – The GraphContext object to store the variable value.
- **on_gpu** (bool) – Is the data to be set on the GPU?
- **instance_path** (str) – Optional path to the prim instance to set the variable value on. By default this will set the variable value on the graph prim.
**Returns:** True if the value was successfully set
**Return type:** bool
### omni.graph.core.IVariable.set_type
**Description:** Changes the type of a variable. Changing the type of a variable may remove the variable’s default value.
**Parameters:**
- **variable_type** (omni::graph::core::Py_Type) – The new type for the variable.
**Returns:** True if the type was successfully changed
**Return type:** bool
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.IVariable.type">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
type
<a class="headerlink" href="#omni.graph.core.IVariable.type" title="Permalink to this definition">
‡
<dd>
<p>
Gets the data type of the variable.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
The data type of the variable.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
omni.graph.core.Type
| 4,089 |
omni.graph.core.IVariable_omni.graph.core.IVariable.md | # IVariable
## IVariable
Object that contains a value that is local to a graph, available from anywhere in the graph
### Methods
| Method | Description |
|--------|-------------|
| `__init__(*args, **kwargs)` | Overloaded function. |
| `get(self, graph_context, instance_path)` | Get the value of a variable |
| `get_array(self, graph_context, ...)` | Get the value of an array variable |
| `set(self, graph_context, value, instance_path)` | Sets the value of a variable |
| `set_type(self, variable_type)` | Changes the type of a variable. |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `category` | |
| display_name |
| --- |
| name |
| scope |
| source_path |
| tooltip |
| [type](#omni.graph.core.IVariable.type) |
| valid |
### __init__
```python
__init__(*args, **kwargs)
```
- Overloaded function.
- __init__(self: omni.graph.core._omni_graph_core.IVariable, arg0: omni.core._core.IObject) -> None
- __init__(self: omni.graph.core._omni_graph_core.IVariable) -> None
### get
```python
get(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, instance_path: str = None) -> object
```
- Get the value of a variable
- Parameters:
- graph_context (omni.graph.core.GraphContext) – The GraphContext object to get the variable value from.
- instance_path (str) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
- Returns: Value of the variable
- Return type: Any
### get_array
```python
get_array(self: omni.graph.core._omni_graph_core.IVariable, graph_context: omni::graph::core::Py_GraphContext, get_for_write: bool = False, reserved_element_count: int = ...) -> ...
```
### Get the value of an array variable
#### Parameters
- **graph_context** (`omni.graph.core.GraphContext`) – The GraphContext object to get the variable value from.
- **get_for_write** (`bool`) – Should the data be retrieved for writing?
- **reserved_element_count** (`int`) – If the data is to be retrieved for writing, preallocate this many elements
- **instance_path** (`str`) – Optional path to the prim instance to fetch the variable value for. By default this will fetch the variable value from the graph prim.
#### Returns
- Value of the array variable
#### Return type
- Any
### Sets the value of a variable
#### Parameters
- **graph_context** (`omni.graph.core.GraphContext`) – The GraphContext object to store the variable value.
- **on_gpu** (`bool`) – Is the data to be set on the GPU?
- **instance_path** (`str`) – Optional path to the prim instance to set the variable value on. By default this will set the variable value on the graph prim.
#### Returns
- True if the value was successfully set
#### Return type
- bool
### Changes the type of a variable. Changing the type of a variable may remove the variable’s default value.
#### Parameters
- **variable_type** (`omni.graph.core.Type`) – The new type for the variable.
<dl class="field-list simple">
<dt class="field-odd">
Type
<dd class="field-odd">
<p>
(
<a class="reference internal" href="omni.graph.core.Type.html#omni.graph.core.Type" title="omni.graph.core.Type">
<em>
omni.graph.core.Type
) – The type to switch the variable to.
<dt class="field-even">
Returns
<dd class="field-even">
<p>
True if the type was successfully changed.
<dt class="field-odd">
Return type
<dd class="field-odd">
<p>
bool
<dl class="py property">
<dt class="sig sig-object py" id="omni.graph.core.IVariable.type">
<em class="property">
<span class="pre">
property
<span class="w">
<span class="sig-name descname">
<span class="pre">
type
<dd>
<p>
Gets the data type of the variable.
<dl class="field-list simple">
<dt class="field-odd">
Returns
<dd class="field-odd">
<p>
The data type of the variable.
<dt class="field-even">
Return type
<dd class="field-even">
<p>
omni.graph.core.Type
| 4,289 |
omni.graph.core.md | # omni.graph.core
## Submodules
Summary:
| Module | Description |
|--------|-------------|
| [omni.graph.core.typing](./omni.graph.core.typing.html) | OmniGraph submodule that handles all of the OmniGraph API typing information. |
## Classes
Summary:
| Class | Description |
|-------|-------------|
| [Attribute](omni.graph.core/omni.graph.core.Attribute.html) | An attribute, defining a data type and value that belongs to a node |
| [AttributeData](omni.graph.core/omni.graph.core.AttributeData.html) | Reference to data defining an attribute’s value |
| [AttributeDataValueHelper](omni.graph.core/omni.graph.core.AttributeDataValueHelper.html) | Class to manage getting and setting of omni.graph.core.AttributeData values. |
| [AttributePortType](omni.graph.core/omni.graph.core.AttributePortType.html) | Port side of the attribute on its node |
| [AttributeRole](omni.graph.core/omni.graph.core.AttributeRole.html) | Interpretation applied to the attribute data |
| [AttributeType](omni.graph.core/omni.graph.core.AttributeType.html) | Utilities for operating with the attribute data type class omni.graph.core.Type and related types |
| [AttributeValueHelper](omni.graph.core/omni.graph.core.AttributeValueHelper.html) | Class to manage getting and setting of Attribute values. |
| [BaseDataType](omni.graph.core/omni.graph.core.BaseDataType.html) | Basic data type for attribute data |
| [BucketId](omni.graph.core/omni.graph.core.BucketId.html) | internal Use only, and obsolete: This type was only useful for writing back to USD, which cannot be achieved anymore through this type. |
- **Bundle**
- —– FOR USE BY GENERATED CODE ONLY —–
- **BundleChangeType**
- Enumeration representing the type of change that occurred in a bundle.
- **BundleChanges**
- —– FOR USE BY GENERATED CODE ONLY —–
- **BundleContainer**
- —– FOR USE BY GENERATED CODE ONLY —–
- **BundleContents**
- —– FOR USE BY GENERATED CODE ONLY —–
- **BundleWriteBlock**
- Creates a thread-local scope to ensure that each bundle
- **ComputeGraph**
- Main OmniGraph interface registered with the extension system
- **ConnectionInfo**
- Attribute and connection type in a given graph connection
- **ConnectionType**
- Type of connection
- **Controller**
- Class to provide a simple interface to a variety OmniGraph manipulation functions.
- **DataView**
- Helper class for getting and setting attribute data values. The setting operation is undoable.
- **DataWrapper**
- Wrapper around typed memory data.
- **Database**
- Base class for the generated database class for .ogn nodes (Python and C++ implementations)
- **Device**
- Device type for memory location of the data types
- **Dtype**
- Common base type for dtypes, defining the members each needs to populate
- **DynamicAttributeAccess**
- Base class for the generated classes that contain the access properties for all attributes.
- **DynamicAttributeInterface**
- Class providing a container for dynamic attribute access interfaces.
- **ExecutionAttributeState**
- Current execution state of an attribute [DEPRECATED: See omni.graph.action.IActionGraph]
- **ExtendedAttributeType**
- Extended attribute type, if any
- **ExtensionInformation**
- Class that manages information about the relationships between nodes and node types, and extensions
- **FileFormatVersion**
- Version number for the OmniGraph file format
- **FunctionResult**
- [内容被截断,请提供完整信息以便继续转换]
- Interface extension for ISchedulingHints that adds a new “pure” hint
- IVariable: Object that contains a value that is local to a graph, available from anywhere in the graph
- MemoryType: Default memory location for an attribute or node’s data
- Node: An element of execution within a graph, containing attributes and connected to other nodes
- NodeController: Helper class that provides a simple interface to modifying the contents of a node
- NodeEvent: Node modification event.
- NodeType: Definition of a node’s interface and structure
- NodeTypeConstructionError: Exception specific to caught errors in the node type construction process
- ObjectLookup: Helper to extract OmniGraph types from various types of descriptions for them.
- OmniGraphAttributeError: Exception to raise when an OmniGraph operation encountered an unrecognized or illegal attribute value
- OmniGraphBindingError: Common base class for all non-exit exceptions.
- OmniGraphError: Exception to raise when there is an error in an OmniGraph operation
- OmniGraphInspector: Provides simple interfaces for inspection of OmniGraph objects
- OmniGraphTypeError: Exception to raise when an OmniGraph operation encountered an unrecognized or illegal type
- OmniGraphValueError: Exception to raise when an OmniGraph operation encountered an illegal value
- PerNodeKeys: Set of key values for per-node data.
- PtrToPtrKind: Memory type for the pointer to a GPU data array
- ReadOnlyError: Exception to raise when there is a write operation on a read-only attribute (i.e. an input)
- RuntimeAttribute: —– FOR USE BY GENERATED CODE ONLY —–
- Settings: Class that packages up all of the OmniGraph settings handling into a common location. The settings themselves
- Severity: Severity level of the log message
- ThreadsafetyTestUtils:
| Name | Description |
|------|-------------|
| ThreadsafetyTestUtils | Utilities for Running Threadsafety Unit Tests from Python Generators for OG nodes |
| Type | Full definition of the data type owned by an attribute |
| TypedValue | Class that encapsulates an arbitrary value with an explicit data type. This can be used when the |
| WrappedArrayType | Enum for the type of array data returned from the get methods |
| eAccessLocation | What type of non-attribute data does this node access |
| eAccessType | How does the node access the data described by the enum eAccessLocation |
| eComputeRule | How the node is allowed to be computed |
| ePurityStatus | The purity of the node implementation. For some context, a “pure” node is |
| eThreadSafety | How thread safe is the node during evaluation |
| eVariableScope | Scope in which the variable has been made available |
### Functions
Summary:
| Name | Description |
|------|-------------|
| attribute_value_as_usd | Returns the value, converted into a type suitable for setting through the USD API compatible with |
| create_node_type | Decorator to transform a Python function into an OmniGraph node type definition. |
| data_shape_from_type | Return the dtype,shape information that corresponds to the given attribute type. |
| developer_mode_active | Check to see if AutoNode developer mode is active on the given extension: |
| get_graph_settings | Return the current settings for the graph. This is just a copy of the settings. Changing it will not |
| get_kit_version | Returns the currently running version of Kit as a tuple of (major, minor) numbers. |
| get_port_type_namespace | Returns a string representing the namespace attributes of the named port type reside in |
| in_compute | Mark block of code executed at runtime. Optimizations can apply like setting values without undo support. |
| is_attribute_plain_data | Is the given attribute numeric or string data? |
| is_in_compute | Mark entry of OmniGraph runtime computation. |
| python_value_as_usd | |
- python_value_as_usd
Converts the given python value to the equivalent USD value
- resolve_base_coupled
Resolves attribute types given a set of attributes, that can have differing tuple counts and/or array depth
- resolve_fully_coupled
Resolves attribute types given a set of attributes which are fully type coupled
- traverse_downstream_graph
Traverses the nodes downstream from the input nodes and apply the predicate on visited nodes
- traverse_upstream_graph
Traverses the nodes upstream from the input nodes and apply the predicate on visited nodes
- acquire_interface
acquire_interface(plugin_name: str = None, library_path: str = None) -> omni.graph.core._omni_graph_core.ComputeGraph
- attach
attach(stage_id: int, mps: float) -> None
- create_prim_view_from_prims
create_prim_view_from_prims(prims: list) -> omni.graph.core._omni_graph_core.IPrimView
- create_prim_view_from_query
create_prim_view_from_query(include: list, exclude: list = []) -> omni.graph.core._omni_graph_core.IPrimView
- deregister_node_type
deregister_node_type(name: str) -> bool
- deregister_post_load_file_format_upgrade_callback
deregister_post_load_file_format_upgrade_callback(postload_handle: int) -> None
- deregister_pre_load_file_format_upgrade_callback
deregister_pre_load_file_format_upgrade_callback(preload_handle: int) -> None
- detach
detach() -> None
- get_all_graphs
get_all_graphs() -> List[omni.graph.core._omni_graph_core.Graph]
- get_all_graphs_and_subgraphs
get_all_graphs_and_subgraphs() -> List[omni.graph.core._omni_graph_core.Graph]
- get_bundle_tree_factory_interface
get_bundle_tree_factory_interface() -> omni.graph.core._omni_graph_core.IBundleFactory
- get_compute_cuda_device
get_compute_cuda_device() -> int
- get_compute_graph_contexts
get_compute_graph_contexts() -> List[omni.graph.core._omni_graph_core.GraphContext]
- get_global_orchestration_graphs
get_global_orchestration_graphs() -> List[omni.graph.core._omni_graph_core.Graph]
- get_global_orchestration_graphs_in_pipeline_stage
get_global_orchestration_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph]
| 方法名 | 描述 |
| --- | --- |
| get_graph_by_path | get_graph_by_path(path: str) -> object |
| get_graphs_in_pipeline_stage | get_graphs_in_pipeline_stage(pipeline_stage: omni.graph.core._omni_graph_core.GraphPipelineStage) -> List[omni.graph.core._omni_graph_core.Graph] |
| get_node_by_path | get_node_by_path(path: str) -> object |
| get_node_categories_interface | get_node_categories_interface() -> omni.graph.core._omni_graph_core.INodeCategories |
| get_node_type | get_node_type(node_type_name: str) -> omni.graph.core._omni_graph_core.NodeType |
| get_node_type_forwarding_interface | get_node_type_forwarding_interface() -> omni::core::Api<omni::graph::core::unstable::INodeTypeForwarding_abi> |
| get_node_type_forwarding_interface2 | get_node_type_forwarding_interface2() -> omni::core::Api<omni::graph::core::INodeTypeForwarding2_abi> |
| get_registered_nodes | get_registered_nodes() -> List[str] |
| is_global_graph_prim | is_global_graph_prim(prim_path: str) -> bool |
| on_shutdown | on_shutdown() -> None |
| register_node_type | register_node_type(name: object, version: int) -> None |
| register_post_load_file_format_upgrade_callback | register_post_load_file_format_upgrade_callback(callback: object) -> int |
| register_pre_load_file_format_upgrade_callback | register_pre_load_file_format_upgrade_callback(callback: object) -> int |
| register_python_node | register_python_node() -> None |
| release_interface | release_interface(arg0: omni.graph.core._omni_graph_core.ComputeGraph) -> None |
| set_test_failure | set_test_failure(has_failure: bool) -> None |
| shutdown_compute_graph | shutdown_compute_graph() -> None |
| test_failure_count | test_failure_count() -> int |
| update | update(current_time: float, elapsed_time: float) -> None | | 11,298 |
omni.graph.core.MemoryType.md | # MemoryType
## MemoryType
- **Bases:** `pybind11_object`
- **Description:** Default memory location for an attribute or node’s data
- **Members:**
- CPU : The memory is on the CPU by default
- CUDA : The memory is on the GPU by default
- ANY : The memory does not have any default device
### Methods
| Method | Description |
|--------|-------------|
| `__init__(self, value)` | |
### Attributes
| Attribute | Description |
|-----------|-------------|
| `ANY` | |
| `CPU` | |
| `CUDA` | |
| `name` | |
| `value` | |
**omni.graph.core._omni_graph_core.MemoryType**
,
**value** : **int**
)
→ **None**
**property**
**name** | 636 |
Subsets and Splits