file_path
stringlengths 21
202
| content
stringlengths 12
1.02M
| size
int64 12
1.02M
| lang
stringclasses 9
values | avg_line_length
float64 3.33
100
| max_line_length
int64 10
993
| alphanum_fraction
float64 0.27
0.93
|
---|---|---|---|---|---|---|
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimPath.rst | .. _omni_graph_nodes_GetPrimPath_3:
.. _omni_graph_nodes_GetPrimPath:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prim Path
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-prim-path
Get Prim Path
=============
.. <description>
Generates a path from the specified relationship. This is useful when an absolute prim path may change.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The prim to determine the path of", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:path", "``path``", "The absolute path of the given prim as a string", "None"
"outputs:primPath", "``token``", "The absolute path of the given prim as a token", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimPath"
"Version", "3"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prim Path"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimPathDatabase"
"Python Module", "omni.graph.nodes"
| 1,685 | reStructuredText | 23.434782 | 103 | 0.569139 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetGraphTargetPrim.rst | .. _omni_graph_nodes_GetGraphTargetPrim_1:
.. _omni_graph_nodes_GetGraphTargetPrim:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Graph Target Prim
:keywords: lang-en omnigraph node sceneGraph nodes get-graph-target-prim
Get Graph Target Prim
=====================
.. <description>
Access the target prim the graph is being executed on. If the graph is executing itself, this will output the prim of the graph. Otherwise the graph is being executed via instancing, then this will output the prim of the target instance.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:prim", "``target``", "The graph target as a prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetGraphTargetPrim"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Graph Target Prim"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetGraphTargetPrimDatabase"
"Python Module", "omni.graph.nodes"
| 1,574 | reStructuredText | 25.694915 | 238 | 0.590216 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnTrig.rst | .. _omni_graph_nodes_Trig_1:
.. _omni_graph_nodes_Trig:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Trigonometric Operation
:keywords: lang-en omnigraph node math:operator,math:conversion threadsafe nodes trig
Trigonometric Operation
=======================
.. <description>
Trigonometric operation of one input in degrees. Supported operations are:
SIN, COS, TAN, ARCSIN, ARCCOS, ARCTAN, DEGREES, RADIANS
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:a", "``['double', 'float', 'half', 'timecode']``", "Input to the function", "None"
"Operation (*inputs:operation*)", "``token``", "The operation to perform", "SIN"
"", "*allowedTokens*", "SIN,COS,TAN,ARCSIN,ARCCOS,ARCTAN,DEGREES,RADIANS", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Result (*outputs:result*)", "``['double', 'float', 'half', 'timecode']``", "The result of the function", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.Trig"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"hidden", "true"
"uiName", "Trigonometric Operation"
"Categories", "math:operator,math:conversion"
"Generated Class Name", "OgnTrigDatabase"
"Python Module", "omni.graph.nodes"
| 1,893 | reStructuredText | 25.305555 | 116 | 0.570523 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRotateToOrientation.rst | .. _omni_graph_nodes_RotateToOrientation_2:
.. _omni_graph_nodes_RotateToOrientation:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Rotate To Orientation
:keywords: lang-en omnigraph node sceneGraph threadsafe WriteOnly nodes rotate-to-orientation
Rotate To Orientation
=====================
.. <description>
Perform a smooth rotation maneuver, rotating a prim to a desired orientation given a speed and easing factor
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Execute In (*inputs:execIn*)", "``execution``", "The input execution", "None"
"inputs:exponent", "``float``", "The blend exponent, which is the degree of the ease curve (1 = linear, 2 = quadratic, 3 = cubic, etc). ", "2.0"
"inputs:prim", "``target``", "The prim to be rotated", "None"
"inputs:primPath", "``path``", "The source prim to be transformed, used when 'usePath' is true", "None"
"inputs:speed", "``double``", "The peak speed of approach (Units / Second)", "1.0"
"Stop (*inputs:stop*)", "``execution``", "Stops the maneuver", "None"
"Target Orientation (*inputs:target*)", "``vectord[3]``", "The desired orientation as euler angles (XYZ) in local space", "[0.0, 0.0, 0.0]"
"inputs:usePath", "``bool``", "When true, the 'primPath' attribute is used, otherwise it will read the connection at the 'prim' attribute", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Finished (*outputs:finished*)", "``execution``", "The output execution, sent one the maneuver is completed", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RotateToOrientation"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Rotate To Orientation"
"Categories", "sceneGraph"
"Generated Class Name", "OgnRotateToOrientationDatabase"
"Python Module", "omni.graph.nodes"
| 2,496 | reStructuredText | 32.293333 | 151 | 0.601362 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnNormalize.rst | .. _omni_graph_nodes_Normalize_1:
.. _omni_graph_nodes_Normalize:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Normalize
:keywords: lang-en omnigraph node math:operator threadsafe nodes normalize
Normalize
=========
.. <description>
Normalize the input vector. If the input vector has a magnitude of zero, the null vector is returned.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Vector (*inputs:vector*)", "``['double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]']``", "Vector to normalize", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Result (*outputs:result*)", "``['double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]']``", "Normalized vector", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.Normalize"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Normalize"
"Categories", "math:operator"
"Generated Class Name", "OgnNormalizeDatabase"
"Python Module", "omni.graph.nodes"
| 2,007 | reStructuredText | 28.529411 | 303 | 0.534131 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetRelativePath.rst | .. _omni_graph_nodes_GetRelativePath_1:
.. _omni_graph_nodes_GetRelativePath:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Relative Path
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-relative-path
Get Relative Path
=================
.. <description>
Generates a path token relative to anchor from path.(ex. (/World, /World/Cube) -> /Cube)
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:anchor", "``token``", "Path token to compute relative to (ex. /World)", ""
"inputs:path", "``['token', 'token[]']``", "Path token to convert to a relative path (ex. /World/Cube)", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:relativePath", "``['token', 'token[]']``", "Relative path token (ex. /Cube)", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:anchor", "``token``", "Snapshot of previously seen rootPath", "None"
"state:path", "``token``", "Snapshot of previously seen path", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetRelativePath"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Relative Path"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetRelativePathDatabase"
"Python Module", "omni.graph.nodes"
| 2,010 | reStructuredText | 24.455696 | 115 | 0.564677 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrims.rst | .. _omni_graph_nodes_GetPrims_2:
.. _omni_graph_nodes_GetPrims:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prims
:keywords: lang-en omnigraph node bundle nodes get-prims
Get Prims
=========
.. <description>
Filters primitives in the input bundle by path and type.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:bundle", "``bundle``", "The bundle to be read from", "None"
"Inverse (*inputs:inverse*)", "``bool``", "By default all primitives matching the path patterns and types are added to the output bundle; when this option is on, all mismatching primitives will be added instead.", "False"
"Path Pattern (*inputs:pathPattern*)", "``string``", "A list of wildcard patterns used to match primitive path. Supported syntax of wildcard pattern: `*` - match an arbitrary number of any characters `?` - match any single character `^` - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box'] '*' - match any '* ^/Box' - match any, but exclude '/Box' '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", "*"
"inputs:prims", "``target``", "The prim to be extracted from Multiple Primitives in Bundle.", "None"
"", "*allowMultiInputs*", "1", ""
"Type Pattern (*inputs:typePattern*)", "``string``", "A list of wildcard patterns used to match primitive type. Supported syntax of wildcard pattern: `*` - match an arbitrary number of any characters `?` - match any single character `^` - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['Mesh', 'Cone', 'Cube'] '*' - match any '* ^Mesh' - match any, but exclude 'Mesh' '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", "*"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:bundle", "``bundle``", "The output bundle that contains filtered primitives", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrims"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prims"
"Categories", "bundle"
"Generated Class Name", "OgnGetPrimsDatabase"
"Python Module", "omni.graph.nodes"
| 2,895 | reStructuredText | 38.671232 | 516 | 0.600345 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMakeTransformLookAt.rst | .. _omni_graph_nodes_MakeTransformLookAt_1:
.. _omni_graph_nodes_MakeTransformLookAt:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Make Transformation Matrix Look At
:keywords: lang-en omnigraph node math:operator threadsafe nodes make-transform-look-at
Make Transformation Matrix Look At
==================================
.. <description>
Make a transformation matrix from eye, center world-space position and an up vector. Forward vector is negative Z direction computed from eye-center and normalized. Up is positive Y direction. Right is the positive X direction.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:center", "``vectord[3]``", "The desired center position in world-space", "[0, 0, 0]"
"inputs:eye", "``vectord[3]``", "The desired look at position in world-space", "[1, 0, 0]"
"inputs:up", "``vectord[3]``", "The desired up vector", "[0, 1, 0]"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:transform", "``matrixd[4]``", "The resulting transformation matrix", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.MakeTransformLookAt"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Make Transformation Matrix Look At"
"Categories", "math:operator"
"Generated Class Name", "OgnMakeTransformLookAtDatabase"
"Python Module", "omni.graph.nodes"
| 2,032 | reStructuredText | 28.042857 | 227 | 0.594488 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnIsPrimSelected.rst | .. _omni_graph_nodes_IsPrimSelected_1:
.. _omni_graph_nodes_IsPrimSelected:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Is Prim Selected
:keywords: lang-en omnigraph node sceneGraph ReadOnly nodes is-prim-selected
Is Prim Selected
================
.. <description>
Checks if the prim at the given path is currently selected
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The prim to check", "None"
"inputs:primPath", "``token``", "The prim path to check", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:isSelected", "``bool``", "True if the given path is in the current stage selection", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.IsPrimSelected"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Is Prim Selected"
"Categories", "sceneGraph"
"Generated Class Name", "OgnIsPrimSelectedDatabase"
"Python Module", "omni.graph.nodes"
| 1,635 | reStructuredText | 22.710145 | 104 | 0.563303 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnCrossProduct.rst | .. _omni_graph_nodes_CrossProduct_1:
.. _omni_graph_nodes_CrossProduct:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Cross Product
:keywords: lang-en omnigraph node math:operator threadsafe nodes cross-product
Cross Product
=============
.. <description>
Compute the cross product of two (arrays of) vectors of the same size The cross product of two 3d vectors is a vector perpendicular to both inputs If arrays of vectors are provided, the cross-product is computed row-wise between a and b
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"A (*inputs:a*)", "``['vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The first vector in the cross product", "None"
"B (*inputs:b*)", "``['vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The second vector in the cross product", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Product (*outputs:product*)", "``['vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The resulting product", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.CrossProduct"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Cross Product"
"Categories", "math:operator"
"Generated Class Name", "OgnCrossProductDatabase"
"Python Module", "omni.graph.nodes"
| 2,069 | reStructuredText | 29 | 236 | 0.573224 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnWritePrimsV2.rst | .. _omni_graph_nodes_WritePrimsV2_1:
.. _omni_graph_nodes_WritePrimsV2:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Write Prims
:keywords: lang-en omnigraph node sceneGraph,bundle WriteOnly nodes write-prims-v2
Write Prims
===========
.. <description>
Write back bundle(s) containing multiple prims to the stage.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute Name Pattern (*inputs:attrNamesToExport*)", "``string``", "A list of wildcard patterns used to match primitive attributes by name. Supported syntax of wildcard pattern: `*` - match an arbitrary number of any characters `?` - match any single character `^` - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['xFormOp:translate', 'xformOp:scale','radius'] '*' - match any 'xformOp:*' - matches 'xFormOp:translate' and 'xformOp:scale' '* ^radius' - match any, but exclude 'radius' '* ^xformOp*' - match any, but exclude 'xFormOp:translate', 'xformOp:scale'", "*"
"inputs:execIn", "``execution``", "The input execution (for action graphs only)", "None"
"Layer Identifier (*inputs:layerIdentifier*)", "``token``", "Identifier of the layer to export to. If empty, it'll be exported to the current edit target at the time of usd wirte back.' This is only used when ""Persist To USD"" is enabled.", ""
"Prim Path Pattern (*inputs:pathPattern*)", "``string``", "A list of wildcard patterns used to match primitives by path. Supported syntax of wildcard pattern: `*` - match an arbitrary number of any characters `?` - match any single character `^` - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box'] '*' - match any '* ^/Box' - match any, but exclude '/Box' '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", "*"
"Prims (*inputs:prims*)", "``target``", "Target(s) to which the prims in 'primsBundle' will be written to. There is a 1:1 mapping between root prims paths in 'primsBundle' and the Target Prims targets *For advanced usage, if 'primsBundle' contains hierarchy, the unique common ancesor paths will have the 1:1 mapping to Target Prims targets, with the descendant paths remapped. *NOTE* See 'scatterUnderTargets' input for modified exporting behavior *WARNING* this can create new prims on the stage. If attributes or prims are removed from 'primsBundle' in subsequent evaluation, they will be removed from targets as well.", "None"
"", "*allowMultiInputs*", "1", ""
"Prims Bundle (*inputs:primsBundle*)", "``bundle``", "The bundle(s) of multiple prims to be written back. The sourcePrimPath attribute is used to find the destination prim.", "None"
"", "*allowMultiInputs*", "1", ""
"Scatter Under Targets (*inputs:scatterUnderTargets*)", "``bool``", "If true, the target prims become the parent prims that the bundled prims will be exported *UNDER*. If multiple prims targets are provided, the primsBundle will be duplicated *UNDER* each target prims.", "False"
"Prim Type Pattern (*inputs:typePattern*)", "``string``", "A list of wildcard patterns used to match primitives by type. Supported syntax of wildcard pattern: `*` - match an arbitrary number of any characters `?` - match any single character `^` - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['Mesh', 'Cone', 'Cube'] '*' - match any '* ^Mesh' - match any, but exclude 'Mesh' '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", "*"
"Persist To USD (*inputs:usdWriteBack*)", "``bool``", "Whether or not the value should be written back to USD, or kept a Fabric only value", "True"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:execOut", "``execution``", "The output execution port (for action graphs only)", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:attrNamesToExport", "``string``", "State from previous evaluation", "*"
"state:layerIdentifier", "``token``", "State from previous evaluation", ""
"state:pathPattern", "``string``", "State from previous evaluation", "*"
"state:primBundleDirtyId", "``uint64``", "State from previous evaluation", "None"
"state:scatterUnderTargets", "``bool``", "State from previous evaluation", "False"
"state:typePattern", "``string``", "State from previous evaluation", "*"
"state:usdWriteBack", "``bool``", "State from previous evaluation", "True"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.WritePrimsV2"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Write Prims"
"Categories", "sceneGraph,bundle"
"Generated Class Name", "OgnWritePrimsV2Database"
"Python Module", "omni.graph.nodes"
| 5,550 | reStructuredText | 58.688171 | 652 | 0.649369 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnEndsWith.rst | .. _omni_graph_nodes_EndsWith_1:
.. _omni_graph_nodes_EndsWith:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Ends With
:keywords: lang-en omnigraph node function threadsafe nodes ends-with
Ends With
=========
.. <description>
Determines if a string ends with a given string value
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:suffix", "``string``", "The suffix to test", ""
"inputs:value", "``string``", "The string to check", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:isSuffix", "``bool``", "True if 'value' ends with 'suffix'", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.EndsWith"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Ends With"
"Categories", "function"
"Generated Class Name", "OgnEndsWithDatabase"
"Python Module", "omni.graph.nodes"
| 1,539 | reStructuredText | 21.31884 | 95 | 0.545159 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnReadStageSelection.rst | .. _omni_graph_nodes_ReadStageSelection_1:
.. _omni_graph_nodes_ReadStageSelection:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Read Stage Selection
:keywords: lang-en omnigraph node sceneGraph ReadOnly nodes read-stage-selection
Read Stage Selection
====================
.. <description>
Outputs the current stage selection as a list of paths
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:selectedPrims", "``token[]``", "The currently selected path(s)", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ReadStageSelection"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Read Stage Selection"
"Categories", "sceneGraph"
"Generated Class Name", "OgnReadStageSelectionDatabase"
"Python Module", "omni.graph.nodes"
| 1,408 | reStructuredText | 22.881356 | 95 | 0.570312 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnBundleInspector.rst | .. _omni_graph_nodes_BundleInspector_3:
.. _omni_graph_nodes_BundleInspector:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Bundle Inspector
:keywords: lang-en omnigraph node bundle nodes bundle-inspector
Bundle Inspector
================
.. <description>
This node creates independent outputs containing information about the contents of a bundle attribute. It can be used for testing or debugging what is inside a bundle as it flows through the graph. The bundle is inspected recursively, so any bundles inside of the main bundle have their contents added to the output as well. The bundle contents can be printed when the node evaluates, and it passes the input straight through unchanged so you can insert this node between two nodes to inspect the data flowing through the graph.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Bundle To Analyze (*inputs:bundle*)", "``bundle``", "The attribute bundle to be inspected", "None"
"Inspect Depth (*inputs:inspectDepth*)", "``int``", "The depth that the inspector is going to traverse and print. 0 means just attributes on the input bundles. 1 means its immediate children. -1 means infinity.", "1"
"Print Contents (*inputs:print*)", "``bool``", "Setting to true prints the contents of the bundle when the node evaluates", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Array Depths (*outputs:arrayDepths*)", "``int[]``", "List of the array depths of attributes present in the bundle", "None"
"Attribute Count (*outputs:attributeCount*)", "``uint64``", "Number of attributes present in the bundle. Every other output is an array that should have this number of elements in it.", "None"
"Bundle Passthrough (*outputs:bundle*)", "``bundle``", "The attribute bundle passed through as-is from the input bundle", "None"
"Child Count (*outputs:childCount*)", "``uint64``", "Number of child bundles present in the bundle.", "None"
"Attribute Count (*outputs:count*)", "``uint64``", "Number of attributes present in the bundle. Every other output is an array that should have this number of elements in it.", "None"
"", "*hidden*", "true", ""
"Attribute Names (*outputs:names*)", "``token[]``", "List of the names of attributes present in the bundle", "None"
"Attribute Roles (*outputs:roles*)", "``token[]``", "List of the names of the roles of attributes present in the bundle", "None"
"Tuple Counts (*outputs:tupleCounts*)", "``int[]``", "List of the tuple counts of attributes present in the bundle", "None"
"Attribute Base Types (*outputs:types*)", "``token[]``", "List of the types of attributes present in the bundle", "None"
"Attribute Values (*outputs:values*)", "``token[]``", "List of the bundled attribute values, converted to token format", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.BundleInspector"
"Version", "3"
"Extension", "omni.graph.nodes"
"Icon", "ogn/icons/omni.graph.nodes.BundleInspector.svg"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Bundle Inspector"
"Categories", "bundle"
"Generated Class Name", "OgnBundleInspectorDatabase"
"Python Module", "omni.graph.nodes"
| 3,811 | reStructuredText | 46.061728 | 528 | 0.653897 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnExtractPrim.rst | .. _omni_graph_nodes_ExtractPrim_1:
.. _omni_graph_nodes_ExtractPrim:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Extract Prim
:keywords: lang-en omnigraph node bundle nodes extract-prim
Extract Prim
============
.. <description>
Extract a child bundle that contains a primitive with requested path/prim. This node is designed to work with Multiple Primitives in a Bundle. It searches for a child bundle in the input bundle, with 'sourcePrimPath' that matches 'inputs:prim' or 'inputs:primPath'. The found child bundle will be provided to 'outputs_primBundle', or invalid, bundle otherwise.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The prim to be extracted from Multiple Primitives in Bundle.", "None"
"Prim Path (*inputs:primPath*)", "``path``", "The path of the prim to be extracted from Multiple Primitives in Bundle.", ""
"Prims Bundle (*inputs:prims*)", "``bundle``", "The Multiple Primitives in Bundle to extract from.", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:primBundle", "``bundle``", "The extracted Single Primitive in Bundle", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ExtractPrim"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Extract Prim"
"Categories", "bundle"
"Generated Class Name", "OgnExtractPrimDatabase"
"Python Module", "omni.graph.nodes"
| 2,092 | reStructuredText | 28.9 | 360 | 0.607553 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnSetMatrix4Rotation.rst | .. _omni_graph_nodes_SetMatrix4Rotation_1:
.. _omni_graph_nodes_SetMatrix4Rotation:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Set Rotation
:keywords: lang-en omnigraph node math:operator threadsafe nodes set-matrix4-rotation
Set Rotation
============
.. <description>
Sets the rotation of the given matrix4d value which represents a linear transformation. Does not modify the translation (row 3) of the matrix.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:fixedRotationAxis", "``token``", "The axis of the given rotation", "Y"
"", "*allowedTokens*", "X,Y,Z", ""
"inputs:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The matrix to be modified", "None"
"Rotation (*inputs:rotationAngle*)", "``['double', 'double[]']``", "The rotation in degrees that the matrix will apply about the given rotationAxis.", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The updated matrix", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.SetMatrix4Rotation"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Set Rotation"
"Categories", "math:operator"
"Generated Class Name", "OgnSetMatrix4RotationDatabase"
"Python Module", "omni.graph.nodes"
| 1,968 | reStructuredText | 26.732394 | 161 | 0.582317 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGpuInteropCudaEntry.rst | .. _omni_graph_nodes_GpuInteropCudaEntry_1:
.. _omni_graph_nodes_GpuInteropCudaEntry:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: GpuInterop Cuda Entry
:keywords: lang-en omnigraph node threadsafe nodes gpu-interop-cuda-entry
GpuInterop Cuda Entry
=====================
.. <description>
Entry point for Cuda RTX Renderer Postprocessing
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:sourceName", "``string``", "Source name of the AOV", "ldrColor"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"bufferSize (*outputs:bufferSize*)", "``uint``", "Size of the buffer", "None"
"cudaMipmappedArray (*outputs:cudaMipmappedArray*)", "``uint64``", "Pointer to the CUDA Mipmapped Array", "None"
"externalTimeOfSimFrame (*outputs:externalTimeOfSimFrame*)", "``int64``", "The external time on the master node, matching the simulation frame used to render this frame", "None"
"format (*outputs:format*)", "``uint64``", "Format", "None"
"frameId (*outputs:frameId*)", "``int64``", "Frame identifier", "None"
"height (*outputs:height*)", "``uint``", "Height", "None"
"hydraTime (*outputs:hydraTime*)", "``double``", "Hydra time in stage", "None"
"isBuffer (*outputs:isBuffer*)", "``bool``", "True if the entry exposes a buffer as opposed to a texture", "None"
"mipCount (*outputs:mipCount*)", "``uint``", "Mip Count", "None"
"simTime (*outputs:simTime*)", "``double``", "Simulation time", "None"
"stream (*outputs:stream*)", "``uint64``", "Pointer to the CUDA Stream", "None"
"width (*outputs:width*)", "``uint``", "Width", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GpuInteropCudaEntry"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "GpuInterop Cuda Entry"
"Generated Class Name", "OgnGpuInteropCudaEntryDatabase"
"Python Module", "omni.graph.nodes"
| 2,546 | reStructuredText | 31.653846 | 181 | 0.593087 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnNoise.rst | .. _omni_graph_nodes_Noise_1:
.. _omni_graph_nodes_Noise:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Noise
:keywords: lang-en omnigraph node math:operator threadsafe nodes noise
Noise
=====
.. <description>
Sample values from a Perlin noise field.
The noise field for any given seed is static: the same input position will always give the same result. This is useful in many areas, such as texturing and animation, where repeatability is essential. If you want a result that varies then you will need to vary either the position or the seed. For example, connecting the 'frame' output of an OnTick node to position will provide a noise result which varies from frame to frame. Perlin noise is locally smooth, meaning that small changes in the sample position will produce small changes in the resulting noise. Varying the seed value will produce a more chaotic result.
Another characteristic of Perlin noise is that it is zero at the corners of each cell in the field. In practical terms this means that integral positions, such as 5.0 in a one-dimensional field or (3.0, -1.0) in a two-dimensional field, will return a result of 0.0. Thus, if the source of your sample positions provides only integral values then all of your results will be zero. To avoid this try offsetting your position values by a fractional amount, such as 0.5.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:position", "``['float', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'float[]']``", "Position(s) within the noise field to be sampled. For a given seed, the same position will always return the same noise value.", "None"
"inputs:seed", "``uint``", "Seed for generating the noise field.", "0"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:result", "``['float', 'float[]']``", "Value at the selected position(s) in the noise field.", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.Noise"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Noise"
"Categories", "math:operator"
"Generated Class Name", "OgnNoiseDatabase"
"Python Module", "omni.graph.nodes"
| 2,849 | reStructuredText | 39.140845 | 621 | 0.646894 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnModulo.rst | .. _omni_graph_nodes_Modulo_1:
.. _omni_graph_nodes_Modulo:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Modulo
:keywords: lang-en omnigraph node math:operator threadsafe nodes modulo
Modulo
======
.. <description>
Computes the modulo of integer inputs (A % B), which is the remainder of A / B If B is zero, the result is zero. If A and B are both non-negative the result is non-negative, otherwise the sign of the result is undefined.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"A (*inputs:a*)", "``['int', 'int64', 'uchar', 'uint', 'uint64']``", "The dividend of (A % B)", "None"
"B (*inputs:b*)", "``['int', 'int64', 'uchar', 'uint', 'uint64']``", "The divisor of (A % B)", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Result (*outputs:result*)", "``['int', 'int64', 'uchar', 'uint', 'uint64']``", "Modulo (A % B), the remainder of A / B", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.Modulo"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Modulo"
"Categories", "math:operator"
"Generated Class Name", "OgnModuloDatabase"
"Python Module", "omni.graph.nodes"
| 1,840 | reStructuredText | 25.681159 | 222 | 0.547826 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRenderPreprocessEntry.rst | .. _omni_graph_nodes_RenderPreProcessEntry_1:
.. _omni_graph_nodes_RenderPreProcessEntry:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Render Preprocess Entry
:keywords: lang-en omnigraph node nodes render-pre-process-entry
Render Preprocess Entry
=======================
.. <description>
Entry point for RTX Renderer Preprocessing
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"hydraTime (*outputs:hydraTime*)", "``double``", "Hydra time in stage", "None"
"simTime (*outputs:simTime*)", "``double``", "Simulation time", "None"
"stream (*outputs:stream*)", "``uint64``", "Pointer to the CUDA Stream", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RenderPreProcessEntry"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Render Preprocess Entry"
"Generated Class Name", "OgnRenderPreprocessEntryDatabase"
"Python Module", "omni.graph.nodes"
| 1,530 | reStructuredText | 24.516666 | 95 | 0.571242 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGraphTarget.rst | .. _omni_graph_nodes_GraphTarget_1:
.. _omni_graph_nodes_GraphTarget:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Graph Target
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes graph-target
Get Graph Target
================
.. <description>
Access the target prim the graph is being executed on. If the graph is executing itself, this will output the prim path of the graph. Otherwise the graph is being executed via instancing, then this will output the prim path of the target instance.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:targetPath", "``token``", "Deprecated. Do not use.", ""
"", "*hidden*", "true", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:primPath", "``token``", "The target prim path", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GraphTarget"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Graph Target"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGraphTargetDatabase"
"Python Module", "omni.graph.nodes"
| 1,747 | reStructuredText | 24.333333 | 248 | 0.576417 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnReadPrimRelationship.rst | .. _omni_graph_nodes_ReadPrimRelationship_1:
.. _omni_graph_nodes_ReadPrimRelationship:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Read Prim Relationship
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes read-prim-relationship
Read Prim Relationship
======================
.. <description>
Reads the target(s) of a relationship on a given prim
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Relationship Name (*inputs:name*)", "``token``", "The name of the relationship to read", ""
"inputs:prim", "``target``", "The prim with the named relationship to read", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:value", "``target``", "The relationship target(s)", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:correctlySetup", "``bool``", "Whether or not the instance is properly setup", "False"
"state:name", "``token``", "The prefetched relationship name", "None"
"state:prim", "``target``", "The currently prefetched prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ReadPrimRelationship"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "usd"
"uiName", "Read Prim Relationship"
"Categories", "sceneGraph"
"Generated Class Name", "OgnReadPrimRelationshipDatabase"
"Python Module", "omni.graph.nodes"
| 2,073 | reStructuredText | 24.925 | 97 | 0.582248 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRenameAttr.rst | .. _omni_graph_nodes_RenameAttribute_1:
.. _omni_graph_nodes_RenameAttribute:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Rename Attributes In Bundles
:keywords: lang-en omnigraph node bundle nodes rename-attribute
Rename Attributes In Bundles
============================
.. <description>
Changes the names of attributes from an input bundle for the corresponding output bundle. Attributes whose names are not in the 'inputAttrNames' list will be copied from the input bundle to the output bundle without changing the name.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Original Attribute Bundle (*inputs:data*)", "``bundle``", "Collection of attributes to be renamed", "None"
"Attributes To Rename (*inputs:inputAttrNames*)", "``token``", "Comma or space separated text, listing the names of attributes in the input data to be renamed", ""
"New Attribute Names (*inputs:outputAttrNames*)", "``token``", "Comma or space separated text, listing the new names for the attributes listed in inputAttrNames", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Bundle Of Renamed Attributes (*outputs:data*)", "``bundle``", "Final bundle of attributes, with attributes renamed based on inputAttrNames and outputAttrNames", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RenameAttribute"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Rename Attributes In Bundles"
"Categories", "bundle"
"Generated Class Name", "OgnRenameAttrDatabase"
"Python Module", "omni.graph.nodes"
| 2,233 | reStructuredText | 30.914285 | 234 | 0.622481 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetMatrix4Quaternion.rst | .. _omni_graph_nodes_GetMatrix4Quaternion_1:
.. _omni_graph_nodes_GetMatrix4Quaternion:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Rotation Quaternion
:keywords: lang-en omnigraph node math:operator threadsafe nodes get-matrix4-quaternion
Get Rotation Quaternion
=======================
.. <description>
Gets the rotation of the given matrix4d value which represents a linear transformation. Returns a quaternion
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The transformation matrix", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:quaternion", "``['quatd[4]', 'quatd[4][]']``", "quaternion representing the orientation of the matrix transformation", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetMatrix4Quaternion"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Rotation Quaternion"
"Categories", "math:operator"
"Generated Class Name", "OgnGetMatrix4QuaternionDatabase"
"Python Module", "omni.graph.nodes"
| 1,754 | reStructuredText | 24.808823 | 138 | 0.586659 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnHasAttr.rst | .. _omni_graph_nodes_HasAttribute_1:
.. _omni_graph_nodes_HasAttribute:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Has Attribute
:keywords: lang-en omnigraph node bundle threadsafe nodes has-attribute
Has Attribute
=============
.. <description>
Inspect an input bundle for a named attribute, setting output to true if it exists
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute To Find (*inputs:attrName*)", "``token``", "Name of the attribute to look for in the bundle", "points"
"Bundle To Check (*inputs:data*)", "``bundle``", "Collection of attributes that may contain the named attribute", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Is Attribute In Bundle (*outputs:output*)", "``bool``", "True if the named attribute was found in the bundle", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.HasAttribute"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Has Attribute"
"Categories", "bundle"
"Generated Class Name", "OgnHasAttrDatabase"
"Python Module", "omni.graph.nodes"
| 1,760 | reStructuredText | 24.521739 | 124 | 0.577841 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnTimelineLoop.rst | .. _omni_graph_nodes_LoopTimeline_1:
.. _omni_graph_nodes_LoopTimeline:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Set playback looping
:keywords: lang-en omnigraph node time compute-on-request nodes loop-timeline
Set playback looping
====================
.. <description>
Controls looping playback of the main timeline
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Execute In (*inputs:execIn*)", "``execution``", "The input that triggers the execution of this node.", "None"
"Loop (*inputs:loop*)", "``bool``", "Enable or disable playback looping?", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Execute Out (*outputs:execOut*)", "``execution``", "The output that is triggered when this node executed.", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.LoopTimeline"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Set playback looping"
"Categories", "time"
"Generated Class Name", "OgnTimelineLoopDatabase"
"Python Module", "omni.graph.nodes"
| 1,717 | reStructuredText | 23.89855 | 119 | 0.570181 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnPartialSum.rst | .. _omni_graph_nodes_PartialSum_1:
.. _omni_graph_nodes_PartialSum:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Compute Integer Array Partial Sums
:keywords: lang-en omnigraph node math:operator threadsafe nodes partial-sum
Compute Integer Array Partial Sums
==================================
.. <description>
Compute the partial sums of the input integer array named 'array' and put the result in an output integer array named 'partialSum'. A partial sum is the sum of all of the elements up to but not including a certain point in an array, so output element 0 is always 0, element 1 is array[0], element 2 is array[0] + array[1], etc.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:array", "``int[]``", "List of integers whose partial sum is to be computed", "[]"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:partialSum", "``int[]``", "Array whose nth value equals the nth partial sum of the input 'array'", "[]"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.PartialSum"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Compute Integer Array Partial Sums"
"Categories", "math:operator"
"Generated Class Name", "OgnPartialSumDatabase"
"Python Module", "omni.graph.nodes"
| 1,946 | reStructuredText | 27.632353 | 330 | 0.5889 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetLookAtRotation.rst | .. _omni_graph_nodes_GetLookAtRotation_1:
.. _omni_graph_nodes_GetLookAtRotation:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Look At Rotation
:keywords: lang-en omnigraph node math:operator threadsafe nodes get-look-at-rotation
Get Look At Rotation
====================
.. <description>
Computes the rotation angles to align a forward direction vector to a direction vector formed by starting at 'start' and pointing at 'target'. The forward vector is the 'default' orientation of the asset being rotated, usually +X or +Z
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:forward", "``double[3]``", "The direction vector to be aligned with the look vector", "[0.0, 0.0, 1.0]"
"inputs:start", "``pointd[3]``", "The position to look from", "[0.0, 0.0, 0.0]"
"inputs:target", "``pointd[3]``", "The position to look at", "[0.0, 0.0, 0.0]"
"inputs:up", "``double[3]``", "The direction considered to be 'up'. If not specified scene-up will be used.", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:orientation", "``quatd[4]``", "The orientation quaternion equivalent to outputs:rotateXYZ", "None"
"outputs:rotateXYZ", "``double[3]``", "The rotation vector [X, Y, Z]", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetLookAtRotation"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Look At Rotation"
"Categories", "math:operator"
"Generated Class Name", "OgnGetLookAtRotationDatabase"
"Python Module", "omni.graph.nodes"
| 2,221 | reStructuredText | 29.861111 | 237 | 0.591625 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetMatrix4Translation.rst | .. _omni_graph_nodes_GetMatrix4Translation_1:
.. _omni_graph_nodes_GetMatrix4Translation:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Translation
:keywords: lang-en omnigraph node math:operator threadsafe nodes get-matrix4-translation
Get Translation
===============
.. <description>
Gets the translation of the given matrix4d value which represents a linear transformation. Returns a vector3
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The matrix to be modified", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Translation (*outputs:translation*)", "``['vectord[3]', 'vectord[3][]']``", "The translation from the transformation matrix", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetMatrix4Translation"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Translation"
"Categories", "math:operator"
"Generated Class Name", "OgnGetMatrix4TranslationDatabase"
"Python Module", "omni.graph.nodes"
| 1,726 | reStructuredText | 24.397058 | 137 | 0.58343 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnInvertMatrix.rst | .. _omni_graph_nodes_OgnInvertMatrix_1:
.. _omni_graph_nodes_OgnInvertMatrix:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Invert Matrix
:keywords: lang-en omnigraph node math:operator threadsafe nodes ogn-invert-matrix
Invert Matrix
=============
.. <description>
Invert a matrix or an array of matrices. Returns the FLOAT_MAX * identity if the matrix is singular
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:matrix", "``['matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]']``", "The input matrix or matrices to invert", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:invertedMatrix", "``['matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]']``", "the resulting inverted matrix or matrices", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.OgnInvertMatrix"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Invert Matrix"
"Categories", "math:operator"
"Generated Class Name", "OgnInvertMatrixDatabase"
"Python Module", "omni.graph.nodes"
| 1,731 | reStructuredText | 24.470588 | 149 | 0.569035 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnIsEmpty.rst | .. _omni_graph_nodes_IsEmpty_1:
.. _omni_graph_nodes_IsEmpty:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Is Empty
:keywords: lang-en omnigraph node function threadsafe nodes is-empty
Is Empty
========
.. <description>
Checks if the given input is empty. An input is considered empty if there is no data. A string or array of size 0 is considered empty whereas a blank string ' ' is not empty. A float with value 0.0 and int[2] with value [0, 0] are not empty.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Input (*inputs:input*)", "``any``", "The input to check if empty", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Is Empty (*outputs:isEmpty*)", "``bool``", "True if the input is empty, false otherwise", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.IsEmpty"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Is Empty"
"Categories", "function"
"Generated Class Name", "OgnIsEmptyDatabase"
"Python Module", "omni.graph.nodes"
| 1,698 | reStructuredText | 23.985294 | 241 | 0.566549 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnExtractBundle.rst | .. _omni_graph_nodes_ExtractBundle_3:
.. _omni_graph_nodes_ExtractBundle:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Extract Bundle
:keywords: lang-en omnigraph node bundle nodes extract-bundle
Extract Bundle
==============
.. <description>
Exposes readable attributes for a bundle as outputs on this node. When this node computes it will read the latest attribute values from the target bundle into these node attributes
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:bundle", "``bundle``", "The bundle to be read from.", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:passThrough", "``bundle``", "The input bundle passed as-is", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ExtractBundle"
"Version", "3"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Extract Bundle"
"Categories", "bundle"
"Generated Class Name", "OgnExtractBundleDatabase"
"Python Module", "omni.graph.nodes"
| 1,649 | reStructuredText | 23.264706 | 180 | 0.57732 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMakeArray.rst | .. _omni_graph_nodes_MakeArray_1:
.. _omni_graph_nodes_MakeArray:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Make Array
:keywords: lang-en omnigraph node math:array nodes make-array
Make Array
==========
.. <description>
Makes an output array attribute from input values, in the order of the inputs. If 'arraySize' is less than 5, the top 'arraySize' elements will be taken. If 'arraySize' is greater than 5 element e will be repeated to fill the remaining space
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:a", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[3]', 'double[4]', 'float', 'float[2]', 'float[3]', 'float[4]', 'frame[4]', 'half', 'half[2]', 'half[3]', 'half[4]', 'int', 'int64', 'int[2]', 'int[3]', 'int[4]', 'matrixd[3]', 'matrixd[4]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'timecode', 'token', 'transform[4]', 'uchar', 'uint', 'uint64', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Element 1", "None"
"inputs:arraySize", "``int``", "The size of the array to create", "0"
"inputs:b", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[3]', 'double[4]', 'float', 'float[2]', 'float[3]', 'float[4]', 'frame[4]', 'half', 'half[2]', 'half[3]', 'half[4]', 'int', 'int64', 'int[2]', 'int[3]', 'int[4]', 'matrixd[3]', 'matrixd[4]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'timecode', 'token', 'transform[4]', 'uchar', 'uint', 'uint64', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Element 2", "None"
"inputs:c", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[3]', 'double[4]', 'float', 'float[2]', 'float[3]', 'float[4]', 'frame[4]', 'half', 'half[2]', 'half[3]', 'half[4]', 'int', 'int64', 'int[2]', 'int[3]', 'int[4]', 'matrixd[3]', 'matrixd[4]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'timecode', 'token', 'transform[4]', 'uchar', 'uint', 'uint64', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Element 3", "None"
"inputs:d", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[3]', 'double[4]', 'float', 'float[2]', 'float[3]', 'float[4]', 'frame[4]', 'half', 'half[2]', 'half[3]', 'half[4]', 'int', 'int64', 'int[2]', 'int[3]', 'int[4]', 'matrixd[3]', 'matrixd[4]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'timecode', 'token', 'transform[4]', 'uchar', 'uint', 'uint64', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Element 4", "None"
"inputs:e", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[3]', 'double[4]', 'float', 'float[2]', 'float[3]', 'float[4]', 'frame[4]', 'half', 'half[2]', 'half[3]', 'half[4]', 'int', 'int64', 'int[2]', 'int[3]', 'int[4]', 'matrixd[3]', 'matrixd[4]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'timecode', 'token', 'transform[4]', 'uchar', 'uint', 'uint64', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Element 5", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:array", "``['colord[3][]', 'colord[4][]', 'colorf[3][]', 'colorf[4][]', 'colorh[3][]', 'colorh[4][]', 'double[2][]', 'double[3][]', 'double[4][]', 'double[]', 'float[2][]', 'float[3][]', 'float[4][]', 'float[]', 'frame[4][]', 'half[2][]', 'half[3][]', 'half[4][]', 'half[]', 'int64[]', 'int[2][]', 'int[3][]', 'int[4][]', 'int[]', 'matrixd[3][]', 'matrixd[4][]', 'normald[3][]', 'normalf[3][]', 'normalh[3][]', 'pointd[3][]', 'pointf[3][]', 'pointh[3][]', 'quatd[4][]', 'quatf[4][]', 'quath[4][]', 'texcoordd[2][]', 'texcoordd[3][]', 'texcoordf[2][]', 'texcoordf[3][]', 'texcoordh[2][]', 'texcoordh[3][]', 'timecode[]', 'token[]', 'transform[4][]', 'uchar[]', 'uint64[]', 'uint[]', 'vectord[3][]', 'vectorf[3][]', 'vectorh[3][]']``", "The array of copied values of inputs in the given order", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.MakeArray"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "Python"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"hidden", "true"
"uiName", "Make Array"
"Categories", "math:array"
"Generated Class Name", "OgnMakeArrayDatabase"
"Python Module", "omni.graph.nodes"
| 5,751 | reStructuredText | 76.729729 | 812 | 0.541297 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnInsertAttr.rst | .. _omni_graph_nodes_InsertAttribute_1:
.. _omni_graph_nodes_InsertAttribute:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Insert Attribute
:keywords: lang-en omnigraph node bundle nodes insert-attribute
Insert Attribute
================
.. <description>
Copies all attributes from an input bundle to the output bundle, as well as copying an additional 'attrToInsert' attribute from the node itself with a specified name.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute To Insert (*inputs:attrToInsert*)", "``any``", "The the attribute to be copied from the node to the output bundle", "None"
"Original Bundle (*inputs:data*)", "``bundle``", "Initial bundle of attributes", "None"
"Attribute Name (*inputs:outputAttrName*)", "``token``", "The name of the new output attribute in the bundle", "attr0"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Bundle With Inserted Attribute (*outputs:data*)", "``bundle``", "Bundle of input attributes with the new one inserted with the specified name", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.InsertAttribute"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Insert Attribute"
"Categories", "bundle"
"Generated Class Name", "OgnInsertAttrDatabase"
"Python Module", "omni.graph.nodes"
| 2,003 | reStructuredText | 27.628571 | 166 | 0.601098 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetGraphTargetId.rst | .. _omni_graph_nodes_GetGraphTargetId_1:
.. _omni_graph_nodes_GetGraphTargetId:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Graph Target Id
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-graph-target-id
Get Graph Target Id
===================
.. <description>
Access a unique id for the target prim the graph is being executed on.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:targetId", "``uint64``", "The target prim id", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetGraphTargetId"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetGraphTargetIdDatabase"
"Python Module", "omni.graph.nodes"
| 1,359 | reStructuredText | 22.448275 | 95 | 0.562178 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnReadGamepadState.rst | .. _omni_graph_nodes_ReadGamepadState_1:
.. _omni_graph_nodes_ReadGamepadState:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Read Gamepad State
:keywords: lang-en omnigraph node input:gamepad threadsafe nodes read-gamepad-state
Read Gamepad State
==================
.. <description>
Reads the current state of the gamepad
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Deadzone (*inputs:deadzone*)", "``float``", "Threshold from [0, 1] that the value must pass for it to be registered as input", "0.1"
"Element (*inputs:gamepadElement*)", "``token``", "The gamepad element to check the state of", "Left Stick X Axis"
"", "*displayGroup*", "parameters", ""
"", "*allowedTokens*", "Left Stick X Axis,Left Stick Y Axis,Right Stick X Axis,Right Stick Y Axis,Left Trigger,Right Trigger,Face Button Bottom,Face Button Right,Face Button Left,Face Button Top,Left Shoulder,Right Shoulder,Special Left,Special Right,Left Stick Button,Right Stick Button,D-Pad Up,D-Pad Right,D-Pad Down,D-Pad Left", ""
"Gamepad ID (*inputs:gamepadId*)", "``uint``", "Gamepad id number starting from 0", "0"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:isPressed", "``bool``", "True if the gamepad element is currently pressed, false otherwise", "None"
"outputs:value", "``float``", "Value of how much the gamepad element is being pressed. [0, 1] for buttons [-1, 1] for stick and trigger", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ReadGamepadState"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Read Gamepad State"
"Categories", "input:gamepad"
"Generated Class Name", "OgnReadGamepadStateDatabase"
"Python Module", "omni.graph.nodes"
| 2,404 | reStructuredText | 31.945205 | 339 | 0.612729 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnToUint64.rst | .. _omni_graph_nodes_ToUint64_1:
.. _omni_graph_nodes_ToUint64:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: To Uint64
:keywords: lang-en omnigraph node math:conversion threadsafe nodes to-uint64
To Uint64
=========
.. <description>
Converts the given input to a 64 bit unsigned integer of the same shape. Negative integers are converted by adding them to 2**64, decimal numbers are truncated.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"value (*inputs:value*)", "``['bool', 'bool[]', 'double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'int', 'int64', 'int64[]', 'int[]', 'uchar', 'uchar[]', 'uint', 'uint[]']``", "The numeric value to convert to uint64", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Uint64 (*outputs:converted*)", "``['uint64', 'uint64[]']``", "Converted output", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ToUint64"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "To Uint64"
"Categories", "math:conversion"
"Generated Class Name", "OgnToUint64Database"
"Python Module", "omni.graph.nodes"
| 1,791 | reStructuredText | 25.352941 | 238 | 0.557789 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetParentPath.rst | .. _omni_graph_nodes_GetParentPath_1:
.. _omni_graph_nodes_GetParentPath:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Parent Path
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-parent-path
Get Parent Path
===============
.. <description>
Generates a parent path token from another path token. (ex. /World/Cube -> /World)
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:path", "``['token', 'token[]']``", "One or more path tokens to compute a parent path from. (ex. /World/Cube)", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:parentPath", "``['token', 'token[]']``", "Parent path token (ex. /World)", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:path", "``token``", "Snapshot of previously seen path", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetParentPath"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Parent Path"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetParentPathDatabase"
"Python Module", "omni.graph.nodes"
| 1,830 | reStructuredText | 22.77922 | 129 | 0.557377 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMatrixMultiply.rst | .. _omni_graph_nodes_MatrixMultiply_1:
.. _omni_graph_nodes_MatrixMultiply:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Matrix Multiply
:keywords: lang-en omnigraph node math:operator threadsafe nodes matrix-multiply
Matrix Multiply
===============
.. <description>
Computes the matrix product of the inputs. Inputs must be compatible. Also accepts tuples (treated as vectors) as inputs. Tuples in input A will be treated as row vectors. Tuples in input B will be treated as column vectors. Arrays of inputs will be computed element-wise with broadcasting if necessary.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"A (*inputs:a*)", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'frame[4]', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'transform[4]', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "First matrix or row vector to multiply", "None"
"B (*inputs:b*)", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'frame[4]', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'transform[4]', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Second matrix or column vector to multiply", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Product (*outputs:output*)", "``['colord[3]', 'colord[4]', 'colorf[3]', 'colorf[4]', 'colorh[3]', 'colorh[4]', 'double', 'double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'double[]', 'float', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'float[]', 'frame[4]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', 'normald[3]', 'normalf[3]', 'normalh[3]', 'pointd[3]', 'pointf[3]', 'pointh[3]', 'quatd[4]', 'quatf[4]', 'quath[4]', 'texcoordd[2]', 'texcoordd[3]', 'texcoordf[2]', 'texcoordf[3]', 'texcoordh[2]', 'texcoordh[3]', 'transform[4]', 'vectord[3]', 'vectorf[3]', 'vectorh[3]']``", "Product of the two matrices", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.MatrixMultiply"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Matrix Multiply"
"Categories", "math:operator"
"Generated Class Name", "OgnMatrixMultiplyDatabase"
"Python Module", "omni.graph.nodes"
| 3,923 | reStructuredText | 55.869564 | 794 | 0.557227 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMakeTransform.rst | .. _omni_graph_nodes_MakeTransform_1:
.. _omni_graph_nodes_MakeTransform:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Make Transformation Matrix from TRS
:keywords: lang-en omnigraph node math:operator threadsafe nodes make-transform
Make Transformation Matrix from TRS
===================================
.. <description>
Make a transformation matrix that performs a translation, rotation (in euler angles), and scale in that order
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:rotationXYZ", "``vectord[3]``", "The desired orientation in euler angles (XYZ)", "[0, 0, 0]"
"inputs:scale", "``vectord[3]``", "The desired scaling factor about the X, Y, and Z axis respectively", "[1, 1, 1]"
"inputs:translation", "``vectord[3]``", "the desired translation as a vector", "[0, 0, 0]"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:transform", "``matrixd[4]``", "the resulting transformation matrix", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.MakeTransform"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Make Transformation Matrix from TRS"
"Categories", "math:operator"
"Generated Class Name", "OgnMakeTransformDatabase"
"Python Module", "omni.graph.nodes"
| 1,942 | reStructuredText | 26.757142 | 119 | 0.581874 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnWritePrimMaterial.rst | .. _omni_graph_nodes_WritePrimMaterial_1:
.. _omni_graph_nodes_WritePrimMaterial:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Write Prim Material
:keywords: lang-en omnigraph node sceneGraph WriteOnly nodes write-prim-material
Write Prim Material
===================
.. <description>
Given a path to a prim and a path to a material on the current USD stage, assigns the material to the prim. Gives an error if the given prim or material can not be found.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:execIn", "``execution``", "Input execution", "None"
"inputs:material", "``target``", "The material to be assigned to the prim", "None"
"Material Path (*inputs:materialPath*)", "``path``", "The path of the material to be assigned to the prim", ""
"inputs:prim", "``target``", "Prim to be assigned a material.", "None"
"Prim Path (*inputs:primPath*)", "``path``", "Path of the prim to be assigned a material.", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:execOut", "``execution``", "Output execution", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.WritePrimMaterial"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "tests"
"uiName", "Write Prim Material"
"Categories", "sceneGraph"
"Generated Class Name", "OgnWritePrimMaterialDatabase"
"Python Module", "omni.graph.nodes"
| 2,055 | reStructuredText | 27.555555 | 173 | 0.586861 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnAttrType.rst | .. _omni_graph_nodes_AttributeType_1:
.. _omni_graph_nodes_AttributeType:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Extract Attribute Type Information
:keywords: lang-en omnigraph node bundle threadsafe nodes attribute-type
Extract Attribute Type Information
==================================
.. <description>
Queries information about the type of a specified attribute in an input bundle
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute To Query (*inputs:attrName*)", "``token``", "The name of the attribute to be queried", "input"
"Bundle To Examine (*inputs:data*)", "``bundle``", "Bundle of attributes to examine", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute Array Depth (*outputs:arrayDepth*)", "``int``", "Zero for a single value, one for an array, two for an array of arrays. Set to -1 if the named attribute was not in the bundle.", "None"
"Attribute Base Type (*outputs:baseType*)", "``int``", "An integer representing the type of the individual components. Set to -1 if the named attribute was not in the bundle.", "None"
"Attribute Component Count (*outputs:componentCount*)", "``int``", "Number of components in each tuple, e.g. one for float, three for point3f, 16 for matrix4d. Set to -1 if the named attribute was not in the bundle.", "None"
"Full Attribute Type (*outputs:fullType*)", "``int``", "A single int representing the full type information. Set to -1 if the named attribute was not in the bundle.", "None"
"Attribute Role (*outputs:role*)", "``int``", "An integer representing semantic meaning of the type, e.g. point3f vs. normal3f vs. vector3f vs. float3. Set to -1 if the named attribute was not in the bundle.", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.AttributeType"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Extract Attribute Type Information"
"Categories", "bundle"
"Generated Class Name", "OgnAttrTypeDatabase"
"Python Module", "omni.graph.nodes"
| 2,702 | reStructuredText | 36.027397 | 228 | 0.622132 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimRelationship.rst | .. _omni_graph_nodes_GetPrimRelationship_3:
.. _omni_graph_nodes_GetPrimRelationship:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prim Relationship
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes get-prim-relationship
Get Prim Relationship
=====================
.. <description>
DEPRECATED - Use ReadPrimRelationship!
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Relationship Name (*inputs:name*)", "``token``", "Name of the relationship property", ""
"Prim Path (*inputs:path*)", "``token``", "Path of the prim with the relationship property", "None"
"inputs:prim", "``target``", "The prim with the relationship", "None"
"inputs:usePath", "``bool``", "When true, the 'path' attribute is used, otherwise it will read the connection at the 'prim' attribute.", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Paths (*outputs:paths*)", "``token[]``", "The prim paths for the given relationship", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimRelationship"
"Version", "3"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prim Relationship"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimRelationshipDatabase"
"Python Module", "omni.graph.nodes"
| 1,959 | reStructuredText | 26.605633 | 148 | 0.587034 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimsAtPath.rst | .. _omni_graph_nodes_GetPrimsAtPath_1:
.. _omni_graph_nodes_GetPrimsAtPath:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prims At Path
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-prims-at-path
Get Prims At Path
=================
.. <description>
This node computes a prim path from either a single or an array of pth tokens.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:path", "``['token', 'token[]']``", "A token or token array to compute representing a path.", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:prims", "``target``", "The output prim paths", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:path", "``token``", "Snapshot of previously seen path", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimsAtPath"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prims At Path"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimsAtPathDatabase"
"Python Module", "omni.graph.nodes"
| 1,794 | reStructuredText | 22.311688 | 111 | 0.560758 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRpResourceExampleAllocator.rst | .. _omni_graph_nodes_RpResourceExampleAllocator_1:
.. _omni_graph_nodes_RpResourceExampleAllocator:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: RpResource Example Allocator Node
:keywords: lang-en omnigraph node nodes rp-resource-example-allocator
RpResource Example Allocator Node
=================================
.. <description>
Allocate CUDA-interoperable RpResource
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Prim Points (*inputs:points*)", "``float[3][]``", "Points attribute input. Points and a prim path may be supplied directly as an alternative to a bundle input.", "[]"
"Prim path input (*inputs:primPath*)", "``token``", "Prim path input. Points and a prim path may be supplied directly as an alternative to a bundle input.", ""
"Reload (*inputs:reload*)", "``bool``", "Force RpResource reload", "False"
"stream (*inputs:stream*)", "``uint64``", "Pointer to the CUDA Stream", "0"
"Verbose (*inputs:verbose*)", "``bool``", "verbose printing", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Point Counts (*outputs:pointCountCollection*)", "``uint64[]``", "Point count for each prim being deformed", "None"
"Prim Paths (*outputs:primPathCollection*)", "``token[]``", "Path for each prim being deformed", "None"
"Reload (*outputs:reload*)", "``bool``", "Force RpResource reload", "False"
"Resource Pointer Collection (*outputs:resourcePointerCollection*)", "``uint64[]``", "Pointers to RpResources (two resources per prim are allocated -- one for rest positions and one for deformed positions)", "None"
"stream (*outputs:stream*)", "``uint64``", "Pointer to the CUDA Stream", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RpResourceExampleAllocator"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "RpResource Example Allocator Node"
"Generated Class Name", "OgnRpResourceExampleAllocatorDatabase"
"Python Module", "omni.graph.nodes"
| 2,643 | reStructuredText | 34.253333 | 219 | 0.613318 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimLocalToWorldTransform.rst | .. _omni_graph_nodes_GetPrimLocalToWorldTransform_2:
.. _omni_graph_nodes_GetPrimLocalToWorldTransform:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prim Local to World Transform
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes get-prim-local-to-world-transform
Get Prim Local to World Transform
=================================
.. <description>
Given a path to a prim on the current USD stage, return the the transformation matrix. that transforms a vector from the local frame to the global frame
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The prim used as the local coordinate system when 'usePath' is false", "None"
"inputs:primPath", "``token``", "The path of the prim used as the local coordinate system when 'usePath' is true", ""
"inputs:usePath", "``bool``", "When true, the 'primPath' attribute is used as the path to the prim being read, otherwise it will read the connection at the 'prim' attribute", "True"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:localToWorldTransform", "``matrixd[4]``", "the local to world transformation matrix for the prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimLocalToWorldTransform"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prim Local to World Transform"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimLocalToWorldTransformDatabase"
"Python Module", "omni.graph.nodes"
| 2,191 | reStructuredText | 30.314285 | 185 | 0.616157 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnDeformedPointsToHydra.rst | .. _omni_graph_nodes_DeformedPointsToHydra_1:
.. _omni_graph_nodes_DeformedPointsToHydra:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Deformed Points to Hydra
:keywords: lang-en omnigraph node nodes deformed-points-to-hydra
Deformed Points to Hydra
========================
.. <description>
Copy deformed points into rpresource and send to hydra
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Prim Points (*inputs:points*)", "``float[3][]``", "Points attribute input. Points and a prim path may be supplied directly as an alternative to a bundle input.", "[]"
"Prim path input (*inputs:primPath*)", "``token``", "Prim path input. Points and a prim path may be supplied directly as an alternative to a bundle input.", ""
"Send to hydra (*inputs:sendToHydra*)", "``bool``", "send to hydra", "False"
"stream (*inputs:stream*)", "``uint64``", "Pointer to the CUDA Stream", "0"
"Verbose (*inputs:verbose*)", "``bool``", "verbose printing", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Reload (*outputs:reload*)", "``bool``", "Force RpResource reload", "False"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.DeformedPointsToHydra"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Deformed Points to Hydra"
"Generated Class Name", "OgnDeformedPointsToHydraDatabase"
"Python Module", "omni.graph.nodes"
| 2,068 | reStructuredText | 28.140845 | 171 | 0.586074 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnBooleanExpr.rst | .. _omni_graph_nodes_BooleanExpr_1:
.. _omni_graph_nodes_BooleanExpr:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Boolean Expression
:keywords: lang-en omnigraph node math:operator nodes boolean-expr
Boolean Expression
==================
.. <description>
NOTE: DEPRECATED AS OF 1.26.0 IN FAVOUR OF INDIVIDAL BOOLEAN OP NODES Boolean operation on two inputs. The supported operations are:
AND, OR, NAND, NOR, XOR, XNOR
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:a", "``bool``", "Input A", "False"
"inputs:b", "``bool``", "Input B", "False"
"Operator (*inputs:operator*)", "``token``", "The boolean operation to perform (AND, OR, NAND, NOR, XOR, XNOR)", "AND"
"", "*allowedTokens*", "AND,OR,NAND,NOR,XOR,XNOR", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Result (*outputs:result*)", "``bool``", "The result of the boolean expression", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.BooleanExpr"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "Python"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"hidden", "true"
"uiName", "Boolean Expression"
"Categories", "math:operator"
"Generated Class Name", "OgnBooleanExprDatabase"
"Python Module", "omni.graph.nodes"
| 1,889 | reStructuredText | 24.890411 | 132 | 0.568025 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnArrayLength.rst | .. _omni_graph_nodes_ArrayLength_1:
.. _omni_graph_nodes_ArrayLength:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Extract Attribute Array Length
:keywords: lang-en omnigraph node math:array threadsafe nodes array-length
Extract Attribute Array Length
==============================
.. <description>
Outputs the length of a specified array attribute in an input bundle, or 1 if the attribute is not an array attribute
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Attribute Name (*inputs:attrName*)", "``token``", "Name of the attribute whose array length will be queried", "points"
"Attribute Bundle (*inputs:data*)", "``bundle``", "Collection of attributes that may contain the named attribute", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Array Length (*outputs:length*)", "``uint64``", "The length of the array attribute in the input bundle", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ArrayLength"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Extract Attribute Array Length"
"Categories", "math:array"
"Generated Class Name", "OgnArrayLengthDatabase"
"Python Module", "omni.graph.nodes"
| 1,872 | reStructuredText | 26.144927 | 125 | 0.588141 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnATan2.rst | .. _omni_graph_nodes_ATan2_1:
.. _omni_graph_nodes_ATan2:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Atan2
:keywords: lang-en omnigraph node math:operator nodes a-tan2
Atan2
=====
.. <description>
Outputs the arc tangent of a/b in degrees
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:a", "``['double', 'float', 'half', 'timecode']``", "Input A", "None"
"inputs:b", "``['double', 'float', 'half', 'timecode']``", "Input B", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Result (*outputs:result*)", "``['double', 'float', 'half', 'timecode']``", "The result of ATan2(A,B)", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ATan2"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "Python"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Atan2"
"Categories", "math:operator"
"Generated Class Name", "OgnATan2Database"
"Python Module", "omni.graph.nodes"
| 1,574 | reStructuredText | 21.826087 | 114 | 0.531766 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnPlaySound.rst | .. _omni_graph_nodes_PlaySound_2:
.. _omni_graph_nodes_PlaySound:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Play Sound
:keywords: lang-en omnigraph node sound nodes play-sound
Play Sound
==========
.. <description>
Plays a sound
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:execIn", "``execution``", "The input execution", "None"
"inputs:prim", "``target``", "The sound Prim to play", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:execOut", "``execution``", "The output execution", "None"
"outputs:soundId", "``uint64``", "The sound identifier", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.PlaySound"
"Version", "2"
"Extension", "omni.graph.nodes"
"Icon", "ogn/icons/omni.graph.nodes.PlaySound.svg"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "tests"
"uiName", "Play Sound"
"Categories", "sound"
"Generated Class Name", "OgnPlaySoundDatabase"
"Python Module", "omni.graph.nodes"
| 1,619 | reStructuredText | 21.816901 | 95 | 0.549722 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstructArray.rst | .. _omni_graph_nodes_ConstructArray_1:
.. _omni_graph_nodes_ConstructArray:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Make Array
:keywords: lang-en omnigraph node math:array threadsafe nodes construct-array
Make Array
==========
.. <description>
Makes an output array attribute from input values, in the order of the inputs. If 'arraySize' is less than the number of input elements, the top 'arraySize' elements will be used. If 'arraySize' is greater than the number of input elements, the last input element will be repeated to fill the remaining space.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:arraySize", "``int``", "The size of the array to create", "1"
"", "*literalOnly*", "1", ""
"Array Type (*inputs:arrayType*)", "``token``", "The type of the array ('auto' infers the type from the first connected and resolved input)", "auto"
"", "*literalOnly*", "1", ""
"", "*allowedTokens*", "auto,bool[],double[],float[],half[],int[],int64[],token[],uchar[],uint[],uint64[],double[2][],double[3][],double[4][],matrixd[3][],matrixd[4][],float[2][],float[3][],float[4][],half[2][],half[3][],half[4][],int[2][],int[3][],int[4][]", ""
"inputs:input0", "``any``", "Input array element", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:array", "``any``", "The array of copied values of inputs in the given order", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ConstructArray"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Make Array"
"Categories", "math:array"
"Generated Class Name", "OgnConstructArrayDatabase"
"Python Module", "omni.graph.nodes"
| 2,352 | reStructuredText | 31.232876 | 309 | 0.58631 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantUInt64.rst | .. _omni_graph_nodes_ConstantUInt64_1:
.. _omni_graph_nodes_ConstantUInt64:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Constant UInt64
:keywords: lang-en omnigraph node constants nodes constant-u-int64
Constant UInt64
===============
.. <description>
Holds a 64 bit signed integer value
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Value (*inputs:value*)", "``uint64``", "The constant value", "0"
"", "*outputOnly*", "1", ""
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ConstantUInt64"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Constant UInt64"
"Categories", "constants"
"Generated Class Name", "OgnConstantUInt64Database"
"Python Module", "omni.graph.nodes"
| 1,353 | reStructuredText | 21.566666 | 95 | 0.546933 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnWritePrimAttribute.rst | .. _omni_graph_nodes_WritePrimAttribute_2:
.. _omni_graph_nodes_WritePrimAttribute:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Write Prim Attribute
:keywords: lang-en omnigraph node sceneGraph threadsafe WriteOnly nodes write-prim-attribute
Write Prim Attribute
====================
.. <description>
Given a path to a prim on the current USD stage and the name of an attribute on that prim, sets the value of that attribute. Does nothing if the given Prim or attribute can not be found. If the attribute is found but it is not a compatible type, an error will be issued.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:execIn", "``execution``", "Input execution state", "None"
"Attribute Name (*inputs:name*)", "``token``", "The name of the attribute to set on the specified prim", ""
"inputs:prim", "``target``", "The prim to be modified when 'usePath' is false", "None"
"inputs:primPath", "``token``", "The path of the prim to be modified when 'usePath' is true", ""
"Persist To USD (*inputs:usdWriteBack*)", "``bool``", "Whether or not the value should be written back to USD, or kept a Fabric only value", "True"
"inputs:usePath", "``bool``", "When true, the 'primPath' attribute is used as the path to the prim being read, otherwise it will read the connection at the 'prim' attribute", "False"
"inputs:value", "``any``", "The new value to be written", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:execOut", "``execution``", "Output execution", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:correctlySetup", "``bool``", "Wheter or not the instance is properly setup", "False"
"state:destAttrib", "``uint64``", "A TokenC to the destination attrib", "None"
"state:destPath", "``uint64``", "A PathC to the destination prim", "None"
"state:destPathToken", "``uint64``", "The TokenC version of destPath'", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.WritePrimAttribute"
"Version", "2"
"Extension", "omni.graph.nodes"
"Icon", "ogn/icons/omni.graph.nodes.WritePrimAttribute.svg"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Write Prim Attribute"
"Categories", "sceneGraph"
"Generated Class Name", "OgnWritePrimAttributeDatabase"
"Python Module", "omni.graph.nodes"
| 3,030 | reStructuredText | 33.83908 | 273 | 0.616172 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnReadPrims.rst | .. _omni_graph_nodes_ReadPrims_3:
.. _omni_graph_nodes_ReadPrims:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Read Prims (Legacy)
:keywords: lang-en omnigraph node sceneGraph,bundle ReadOnly nodes read-prims
Read Prims (Legacy)
===================
.. <description>
DEPRECATED - use ReadPrimsV2!
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Apply Skel Binding (*inputs:applySkelBinding*)", "``bool``", "If an input USD prim is skinnable and has the SkelBindingAPI schema applied, read skeletal data and apply SkelBinding to deform the prim. The output bundle will have additional child bundles created to hold data for the skeleton and skel animation prims if present. After evaluation, deformed points and normals will be written to the `points` and `normals` attributes, while non-deformed points and normals will be copied to the `points:default` and `normals:default` attributes.", "False"
"Attribute Name Pattern (*inputs:attrNamesToImport*)", "``string``", "A list of wildcard patterns used to match the attribute names that are to be imported Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['points', 'faceVertexCount', 'faceVertexIndices', 'size'] '*' - match any '* ^points' - match any, but exclude 'points' '* ^face*' - match any, but exclude 'faceVertexCount' and 'faceVertexIndices'", "*"
"Compute Bounding Box (*inputs:computeBoundingBox*)", "``bool``", "For each primitive compute local bounding box and store them as 'bboxMinCorner', 'bboxMaxCorner' and 'bboxTransform' attributes.", "False"
"Prim Path Pattern (*inputs:pathPattern*)", "``string``", "A list of wildcard patterns used to match the prim paths that are to be imported Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box'] '*' - match any '* ^/Box' - match any, but exclude '/Box' '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", ""
"inputs:prims", "``target``", "The prims to be read from when 'useFindPrims' is false", "None"
"", "*allowMultiInputs*", "1", ""
"Prim Type Pattern (*inputs:typePattern*)", "``string``", "A list of wildcard patterns used to match the prim types that are to be imported Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['Mesh', 'Cone', 'Cube'] '*' - match any '* ^Mesh' - match any, but exclude 'Mesh' '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", "*"
"Time (*inputs:usdTimecode*)", "``timecode``", "The time at which to evaluate the transform of the USD prim. A value of ""NaN"" indicates that the default USD time stamp should be used", "NaN"
"Use Find Prims (*inputs:useFindPrims*)", "``bool``", "When true, the 'pathPattern' and 'typePattern' attribute is used as the pattern to search for the prims to read otherwise it will read the connection at the 'prim' attribute.", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:primsBundle", "``bundle``", "An output bundle containing multiple prims as children. Each child contains data attributes and two additional token attributes named sourcePrimPath and sourcePrimType which contains the path of the Prim being read", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:applySkelBinding", "``bool``", "State from previous evaluation", "False"
"state:attrNamesToImport", "``string``", "State from previous evaluation", "None"
"state:computeBoundingBox", "``bool``", "State from previous evaluation", "False"
"state:pathPattern", "``string``", "State from previous evaluation", "None"
"state:primPaths", "``uint64[]``", "State from previous evaluation", "None"
"state:typePattern", "``string``", "State from previous evaluation", "None"
"state:usdTimecode", "``timecode``", "State from previous evaluation", "-1"
"state:useFindPrims", "``bool``", "State from previous evaluation", "False"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ReadPrims"
"Version", "3"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"hidden", "true"
"uiName", "Read Prims (Legacy)"
"Categories", "sceneGraph,bundle"
"Generated Class Name", "OgnReadPrimsDatabase"
"Python Module", "omni.graph.nodes"
| 5,473 | reStructuredText | 57.860214 | 613 | 0.653389 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRpResourceExampleHydra.rst | .. _omni_graph_nodes_RpResourceExampleHydra_1:
.. _omni_graph_nodes_RpResourceExampleHydra:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: RpResource to Hydra Example Node
:keywords: lang-en omnigraph node nodes rp-resource-example-hydra
RpResource to Hydra Example Node
================================
.. <description>
Send RpResource to Hydra
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Point Counts (*inputs:pointCountCollection*)", "``uint64[]``", "Point count for each prim being deformed", "[]"
"Prim Paths (*inputs:primPathCollection*)", "``token[]``", "Path for each prim being deformed", "[]"
"Resource Pointer Collection (*inputs:resourcePointerCollection*)", "``uint64[]``", "Pointers to RpResources (two resources per prim are assumed -- one for rest positions and one for deformed positions)", "[]"
"Send to Hydra (*inputs:sendToHydra*)", "``bool``", "Send rpresource pointer to hydra using the specified prim path", "False"
"Verbose (*inputs:verbose*)", "``bool``", "verbose printing", "False"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Reload (*outputs:reload*)", "``bool``", "Force RpResource reload", "False"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RpResourceExampleHydra"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "RpResource to Hydra Example Node"
"__tokens", "{""points"": ""points"", ""transform"": ""transform"", ""rpResource"": ""rpResource"", ""pointCount"": ""pointCount"", ""uintData"": ""uintData""}"
"Generated Class Name", "OgnRpResourceExampleHydraDatabase"
"Python Module", "omni.graph.nodes"
| 2,310 | reStructuredText | 31.097222 | 214 | 0.593506 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnTimelineGet.rst | .. _omni_graph_nodes_GetTimeline_1:
.. _omni_graph_nodes_GetTimeline:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get main timeline
:keywords: lang-en omnigraph node time compute-on-request nodes get-timeline
Get main timeline
=================
.. <description>
Get the main timeline properties
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"End Frame (*outputs:endFrame*)", "``double``", "The end frame of the main timeline's play range.", "None"
"End Time (*outputs:endTime*)", "``double``", "The end time (in seconds) of the main timeline's play range.", "None"
"Current Frame (*outputs:frame*)", "``double``", "The current frame number of the main timeline's playhead.", "None"
"Frames Per Second (*outputs:framesPerSecond*)", "``double``", "The number of frames per second of the main timeline.", "None"
"Is Looping (*outputs:isLooping*)", "``bool``", "Is the main timeline currently looping?", "None"
"Is Playing (*outputs:isPlaying*)", "``bool``", "Is the main timeline currently playing?", "None"
"Start Frame (*outputs:startFrame*)", "``double``", "The start frame of the main timeline's play range.", "None"
"Start Time (*outputs:startTime*)", "``double``", "The start time (in seconds) of the main timeline's play range.", "None"
"Current Time (*outputs:time*)", "``double``", "The current time (in seconds) of the main timeline's playhead.", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetTimeline"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get main timeline"
"Categories", "time"
"Generated Class Name", "OgnTimelineGetDatabase"
"Python Module", "omni.graph.nodes"
| 2,307 | reStructuredText | 33.447761 | 130 | 0.596446 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnFindPrims.rst | .. _omni_graph_nodes_FindPrims_2:
.. _omni_graph_nodes_FindPrims:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Find Prims
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes find-prims
Find Prims
==========
.. <description>
Finds Prims on the stage which match the given criteria
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:ignoreSystemPrims", "``bool``", "Ignore system prims such as omni graph nodes that shouldn't be considered during the import.", "False"
"Prim Name Prefix (*inputs:namePrefix*)", "``token``", "Only prims with a name starting with the given prefix will be returned.", ""
"Prim Path Pattern (*inputs:pathPattern*)", "``token``", "A list of wildcard patterns used to match the prim paths Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box'] '*' - match any '* ^/Box' - match any, but exclude '/Box' '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", ""
"inputs:recursive", "``bool``", "False means only consider children of the root prim, True means all prims in the hierarchy", "False"
"Attribute Names (*inputs:requiredAttributes*)", "``string``", "A space-separated list of attribute names that are required to be present on matched prims", ""
"Relationship Name (*inputs:requiredRelationship*)", "``token``", "The name of a relationship which must have a target specified by requiredRelationshipTarget or requiredTarget", ""
"Relationship Prim Path (*inputs:requiredRelationshipTarget*)", "``path``", "The path that must be a target of the requiredRelationship", ""
"Relationship Prim (*inputs:requiredTarget*)", "``target``", "The target of the requiredRelationship", "None"
"Root Prim (*inputs:rootPrim*)", "``target``", "Only children of the given prim will be considered. If rootPrim is specified, rootPrimPath will be ignored.", "None"
"Root Prim Path (*inputs:rootPrimPath*)", "``token``", "Only children of the given prim will be considered. Empty will search the whole stage.", ""
"Prim Type Pattern (*inputs:type*)", "``token``", "A list of wildcard patterns used to match the prim types that are to be imported Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['Mesh', 'Cone', 'Cube'] '*' - match any '* ^Mesh' - match any, but exclude 'Mesh' '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", "*"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:primPaths", "``token[]``", "A list of Prim paths as tokens which match the given type", "None"
"outputs:prims", "``target``", "A list of Prim paths which match the given type", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:ignoreSystemPrims", "``bool``", "last corresponding input seen", "None"
"state:inputType", "``token``", "last corresponding input seen", "None"
"state:namePrefix", "``token``", "last corresponding input seen", "None"
"state:pathPattern", "``token``", "last corresponding input seen", "None"
"state:recursive", "``bool``", "last corresponding input seen", "None"
"state:requiredAttributes", "``string``", "last corresponding input seen", "None"
"state:requiredRelationship", "``token``", "last corresponding input seen", "None"
"state:requiredRelationshipTarget", "``string``", "last corresponding input seen", "None"
"state:requiredTarget", "``target``", "last corresponding input seen", "None"
"state:rootPrim", "``target``", "last corresponding input seen", "None"
"state:rootPrimPath", "``token``", "last corresponding input seen", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.FindPrims"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Find Prims"
"Categories", "sceneGraph"
"Generated Class Name", "OgnFindPrimsDatabase"
"Python Module", "omni.graph.nodes"
| 4,971 | reStructuredText | 49.734693 | 532 | 0.638906 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnBundleConstructor.rst | .. _omni_graph_nodes_BundleConstructor_1:
.. _omni_graph_nodes_BundleConstructor:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Bundle Constructor
:keywords: lang-en omnigraph node bundle nodes bundle-constructor
Bundle Constructor
==================
.. <description>
This node creates a bundle mirroring all of the dynamic input attributes that have been added to it. If no dynamic attributes exist then the bundle will be empty. See the 'InsertAttribute' node for something that can construct a bundle from existing connected attributes.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Constructed Bundle (*outputs:bundle*)", "``bundle``", "The bundle consisting of copies of all of the dynamic input attributes.", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.BundleConstructor"
"Version", "1"
"Extension", "omni.graph.nodes"
"Icon", "ogn/icons/omni.graph.nodes.BundleConstructor.svg"
"Has State?", "False"
"Implementation Language", "Python"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Bundle Constructor"
"Categories", "bundle"
"Generated Class Name", "OgnBundleConstructorDatabase"
"Python Module", "omni.graph.nodes"
| 1,716 | reStructuredText | 27.616666 | 271 | 0.613636 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimPaths.rst | .. _omni_graph_nodes_GetPrimPaths_1:
.. _omni_graph_nodes_GetPrimPaths:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prim Paths
:keywords: lang-en omnigraph node sceneGraph threadsafe nodes get-prim-paths
Get Prim Paths
==============
.. <description>
Generates a path array from the specified relationship. This is useful when absolute prim paths may change.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prims", "``target``", "Relationship to prims on the stage", "None"
"", "*allowMultiInputs*", "1", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:primPaths", "``token[]``", "The absolute paths of the given prims as a token array", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimPaths"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prim Paths"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimPathsDatabase"
"Python Module", "omni.graph.nodes"
| 1,659 | reStructuredText | 23.057971 | 107 | 0.567812 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnInterpolator.rst | .. _omni_graph_nodes_Interpolator_1:
.. _omni_graph_nodes_Interpolator:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Interpolator
:keywords: lang-en omnigraph node math:operator threadsafe nodes interpolator
Interpolator
============
.. <description>
Time sample interpolator
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Knot Array (*inputs:knots*)", "``float[]``", "Array of knots on the time sample curve", "[]"
"Interpolation Point (*inputs:param*)", "``float``", "Time sample interpolation point", "0.0"
"Value Array (*inputs:values*)", "``float[]``", "Array of time sample values", "[]"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Interpolated Value (*outputs:value*)", "``float``", "Value in the time samples, interpolated at the given parameter location", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.Interpolator"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Interpolator"
"Categories", "math:operator"
"Generated Class Name", "OgnInterpolatorDatabase"
"Python Module", "omni.graph.nodes"
| 1,773 | reStructuredText | 24.342857 | 138 | 0.570784 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnWritePrimRelationship.rst | .. _omni_graph_nodes_WritePrimRelationship_1:
.. _omni_graph_nodes_WritePrimRelationship:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Write Prim Relationship
:keywords: lang-en omnigraph node sceneGraph WriteOnly nodes write-prim-relationship
Write Prim Relationship
=======================
.. <description>
Writes the target(s) to a relationship on a given prim
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:execIn", "``execution``", "The input execution port", "None"
"Relationship Name (*inputs:name*)", "``token``", "The name of the relationship to write", ""
"inputs:prim", "``target``", "The prim to write the relationship to", "None"
"Persist To USD (*inputs:usdWriteBack*)", "``bool``", "Whether or not the value should be written back to USD, or kept a Fabric only value", "True"
"inputs:value", "``target``", "The target(s) to write to the relationship", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"outputs:execOut", "``execution``", "The output execution port", "None"
State
-----
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"state:correctlySetup", "``bool``", "Whether or not the instance is properly setup", "False"
"state:name", "``token``", "The prefetched relationship name", "None"
"state:prim", "``target``", "The currently prefetched prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.WritePrimRelationship"
"Version", "1"
"Extension", "omni.graph.nodes"
"Has State?", "True"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "usd"
"uiName", "Write Prim Relationship"
"Categories", "sceneGraph"
"Generated Class Name", "OgnWritePrimRelationshipDatabase"
"Python Module", "omni.graph.nodes"
| 2,383 | reStructuredText | 27.722891 | 151 | 0.59253 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnReadPrimMaterial.rst | .. _omni_graph_nodes_ReadPrimMaterial_2:
.. _omni_graph_nodes_ReadPrimMaterial:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Read Prim Material
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes read-prim-material
Read Prim Material
==================
.. <description>
Given a path to a prim on the current USD stage, outputs the material of the prim. Gives an error if the given prim can not be found.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The prim with the material to be read. If both this and primPath inputs are set, this input takes priority.", "None"
"Prim Path (*inputs:primPath*)", "``path``", "Path of the prim with the material to be read.", ""
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Material Path (*outputs:material*)", "``path``", "The material of the input prim", "None"
"Material (*outputs:materialPrim*)", "``target``", "The prim containing the material of the input prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.ReadPrimMaterial"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "tests"
"uiName", "Read Prim Material"
"Categories", "sceneGraph"
"Generated Class Name", "OgnReadPrimMaterialDatabase"
"Python Module", "omni.graph.nodes"
| 1,977 | reStructuredText | 27.257142 | 150 | 0.590288 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRemoveAttr.rst | .. _omni_graph_nodes_RemoveAttribute_2:
.. _omni_graph_nodes_RemoveAttribute:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Remove Attributes From Bundles
:keywords: lang-en omnigraph node bundle nodes remove-attribute
Remove Attributes From Bundles
==============================
.. <description>
Copies all attributes from an input bundle to the output bundle, except for any specified to be removed.
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Allow Remove Prim Internal (*inputs:allowRemovePrimInternal*)", "``bool``", "When on, then primitive internal attributes can be removed('sourcePrimPath' etc...)", "False"
"Attributes To Remove (*inputs:attrNamesToRemove*)", "``token``", "A list of wildcard patterns used to match the attribute names that are to be removed from the output bundle Supported syntax of wildcard pattern: '*' - match an arbitrary number of any characters '?' - match any single character '^' - (caret) is used to define a pattern that is to be excluded Example of wildcard patterns, input: ['points', 'faceVertexCount', 'faceVertexIndices', 'size'] '*' - match any '* ^points' - match any, but exclude 'points' '* ^face*' - match any, but exclude 'faceVertexCount' and 'faceVertexIndices'", ""
"Original Bundle (*inputs:data*)", "``bundle``", "Collection of attributes to be partially copied to the output", "None"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Bundle After Removal (*outputs:data*)", "``bundle``", "Final bundle of attributes, with the attributes specified by attrNamesToRemove omitted", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.RemoveAttribute"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Remove Attributes From Bundles"
"Categories", "bundle"
"Generated Class Name", "OgnRemoveAttrDatabase"
"Python Module", "omni.graph.nodes"
| 2,577 | reStructuredText | 35.828571 | 631 | 0.622429 |
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetPrimDirectionVector.rst | .. _omni_graph_nodes_GetPrimDirectionVector_2:
.. _omni_graph_nodes_GetPrimDirectionVector:
.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================
:orphan:
.. meta::
:title: Get Prim Direction Vector
:keywords: lang-en omnigraph node sceneGraph threadsafe ReadOnly nodes get-prim-direction-vector
Get Prim Direction Vector
=========================
.. <description>
Given a prim, find its direction vectors (up vector, forward vector, right vector, etc.)
.. </description>
Installation
------------
To use this node enable :ref:`omni.graph.nodes<ext_omni_graph_nodes>` in the Extension Manager.
Inputs
------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"inputs:prim", "``target``", "The connection to the input prim - this attribute is used when 'usePath' is false", "None"
"inputs:primPath", "``token``", "The path of the input prim - this attribute is used when 'usePath' is true", ""
"inputs:usePath", "``bool``", "When true, it will use the 'primPath' attribute as the path to the prim, otherwise it will read the connection at the 'prim' attribute", "True"
Outputs
-------
.. csv-table::
:header: "Name", "Type", "Descripton", "Default"
:widths: 20, 20, 50, 10
"Backward Vector (*outputs:backwardVector*)", "``double[3]``", "The backward vector of the prim", "None"
"Down Vector (*outputs:downVector*)", "``double[3]``", "The down vector of the prim", "None"
"Forward Vector (*outputs:forwardVector*)", "``double[3]``", "The forward vector of the prim", "None"
"Left Vector (*outputs:leftVector*)", "``double[3]``", "The left vector of the prim", "None"
"Right Vector (*outputs:rightVector*)", "``double[3]``", "The right vector of the prim", "None"
"Up Vector (*outputs:upVector*)", "``double[3]``", "The up vector of the prim", "None"
Metadata
--------
.. csv-table::
:header: "Name", "Value"
:widths: 30,70
"Unique ID", "omni.graph.nodes.GetPrimDirectionVector"
"Version", "2"
"Extension", "omni.graph.nodes"
"Has State?", "False"
"Implementation Language", "C++"
"Default Memory Type", "cpu"
"Generated Code Exclusions", "None"
"uiName", "Get Prim Direction Vector"
"Categories", "sceneGraph"
"Generated Class Name", "OgnGetPrimDirectionVectorDatabase"
"Python Module", "omni.graph.nodes"
| 2,543 | reStructuredText | 32.92 | 178 | 0.604404 |
omniverse-code/kit/exts/omni.graph.nodes/config/extension.toml | [package]
title = "OmniGraph Nodes"
version = "1.48.3"
category = "Graph"
readme = "docs/README.md"
changelog = "docs/CHANGELOG.md"
description = "Contains a library of OmniGraph nodes"
repository = ""
keywords = ["omnigraph", "nodes"]
# Main module for the Python interface
[[python.module]]
name = "omni.graph.nodes"
# Watch the .ogn files for hot reloading (only works for Python files)
[fswatcher.patterns]
include = ["*.ogn", "*.py"]
exclude = ["Ogn*Database.py"]
# Other extensions that need to load before this one
[dependencies]
"omni.usd" = {}
"omni.kit.async_engine" = {}
"omni.kit.commands" = {}
"omni.graph" = {}
"omni.graph.tools" = {}
"omni.kit.stage_templates" = {}
"omni.kit.pipapi" = {}
"omni.graph.ui" = {optional=true}
"omni.hydra.scene_delegate" = {}
[[native.plugin]]
path = "bin/*.plugin"
recursive = false
# numpy is used by tests
[python.pipapi]
requirements = ["numpy"] # SWIPAT filed under: http://nvbugs/3193231
[[test]]
timeout = 1200
stdoutFailPatterns.exclude = [
"*[omni.graph.core.plugin] getTypes called on non-existent path*",
]
pythonTests.unreliable = [
"*test_omnigraph_utility_nodes", # OM-70691
"*test_copy_attr", # OM-65070
"*test_remove_attr", # OM-63107
]
[documentation]
deps = [
["kit-sdk", "_build/docs/kit-sdk/latest"], # WAR to include omni.graph refs until that workflow is moved
]
pages = [
"docs/Overview.md",
"docs/CHANGELOG.md",
]
| 1,420 | TOML | 22.683333 | 108 | 0.673239 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnArraySetIndexDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ArraySetIndex
Sets an element of an array. If the given index is negative it will be an offset from the end of the array.
"""
from typing import Any
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnArraySetIndexDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ArraySetIndex
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.array
inputs.index
inputs.resizeToFit
inputs.value
Outputs:
outputs.array
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:array', 'bool[],colord[3][],colord[4][],colorf[3][],colorf[4][],colorh[3][],colorh[4][],double[2][],double[3][],double[4][],double[],float[2][],float[3][],float[4][],float[],frame[4][],half[2][],half[3][],half[4][],half[],int64[],int[2][],int[3][],int[4][],int[],matrixd[3][],matrixd[4][],normald[3][],normalf[3][],normalh[3][],pointd[3][],pointf[3][],pointh[3][],quatd[4][],quatf[4][],quath[4][],texcoordd[2][],texcoordd[3][],texcoordf[2][],texcoordf[3][],texcoordh[2][],texcoordh[3][],timecode[],token[],transform[4][],uchar[],uint64[],uint[],vectord[3][],vectorf[3][],vectorh[3][]', 1, 'Array', 'The array to be modified', {}, True, None, False, ''),
('inputs:index', 'int', 0, 'Index', 'The index into the array, a negative value indexes from the end of the array', {}, True, 0, False, ''),
('inputs:resizeToFit', 'bool', 0, None, 'When true, and the given positive index is larger than the highest index in the array\nresize the output array to length 1 + index, and fill the new spaces with zeros', {}, True, False, False, ''),
('inputs:value', 'bool,colord[3],colord[4],colorf[3],colorf[4],colorh[3],colorh[4],double,double[2],double[3],double[4],float,float[2],float[3],float[4],frame[4],half,half[2],half[3],half[4],int,int64,int[2],int[3],int[4],matrixd[3],matrixd[4],normald[3],normalf[3],normalh[3],pointd[3],pointf[3],pointh[3],quatd[4],quatf[4],quath[4],texcoordd[2],texcoordd[3],texcoordf[2],texcoordf[3],texcoordh[2],texcoordh[3],timecode,token,transform[4],uchar,uint,uint64,vectord[3],vectorf[3],vectorh[3]', 1, None, 'The value to set at the given index', {}, True, None, False, ''),
('outputs:array', 'bool[],colord[3][],colord[4][],colorf[3][],colorf[4][],colorh[3][],colorh[4][],double[2][],double[3][],double[4][],double[],float[2][],float[3][],float[4][],float[],frame[4][],half[2][],half[3][],half[4][],half[],int64[],int[2][],int[3][],int[4][],int[],matrixd[3][],matrixd[4][],normald[3][],normalf[3][],normalh[3][],pointd[3][],pointf[3][],pointh[3][],quatd[4][],quatf[4][],quath[4][],texcoordd[2][],texcoordd[3][],texcoordf[2][],texcoordf[3][],texcoordh[2][],texcoordh[3][],timecode[],token[],transform[4][],uchar[],uint64[],uint[],vectord[3][],vectorf[3][],vectorh[3][]', 1, 'Array', 'The modified array', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def array(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.array"""
return og.RuntimeAttribute(self._attributes.array.get_attribute_data(), self._context, True)
@array.setter
def array(self, value_to_set: Any):
"""Assign another attribute's value to outputs.array"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.array.value = value_to_set.value
else:
self.array.value = value_to_set
@property
def index(self):
data_view = og.AttributeValueHelper(self._attributes.index)
return data_view.get()
@index.setter
def index(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.index)
data_view = og.AttributeValueHelper(self._attributes.index)
data_view.set(value)
@property
def resizeToFit(self):
data_view = og.AttributeValueHelper(self._attributes.resizeToFit)
return data_view.get()
@resizeToFit.setter
def resizeToFit(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.resizeToFit)
data_view = og.AttributeValueHelper(self._attributes.resizeToFit)
data_view.set(value)
@property
def value(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.value"""
return og.RuntimeAttribute(self._attributes.value.get_attribute_data(), self._context, True)
@value.setter
def value(self, value_to_set: Any):
"""Assign another attribute's value to outputs.value"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.value.value = value_to_set.value
else:
self.value.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def array(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.array"""
return og.RuntimeAttribute(self._attributes.array.get_attribute_data(), self._context, False)
@array.setter
def array(self, value_to_set: Any):
"""Assign another attribute's value to outputs.array"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.array.value = value_to_set.value
else:
self.array.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnArraySetIndexDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnArraySetIndexDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnArraySetIndexDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,089 | Python | 56.898089 | 670 | 0.645506 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnRotateToOrientationDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.RotateToOrientation
Perform a smooth rotation maneuver, rotating a prim to a desired orientation given a speed and easing factor
"""
import numpy
import usdrt
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnRotateToOrientationDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.RotateToOrientation
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.exponent
inputs.prim
inputs.primPath
inputs.speed
inputs.stop
inputs.target
inputs.usePath
Outputs:
outputs.finished
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, 'Execute In', 'The input execution', {}, True, None, False, ''),
('inputs:exponent', 'float', 0, None, 'The blend exponent, which is the degree of the ease curve\n (1 = linear, 2 = quadratic, 3 = cubic, etc). ', {ogn.MetadataKeys.DEFAULT: '2.0'}, True, 2.0, False, ''),
('inputs:prim', 'target', 0, None, 'The prim to be rotated', {}, False, [], False, ''),
('inputs:primPath', 'path', 0, None, "The source prim to be transformed, used when 'usePath' is true", {}, False, None, True, 'Use prim input with a GetPrimsAtPath node instead'),
('inputs:speed', 'double', 0, None, 'The peak speed of approach (Units / Second)', {ogn.MetadataKeys.DEFAULT: '1.0'}, True, 1.0, False, ''),
('inputs:stop', 'execution', 0, 'Stop', 'Stops the maneuver', {}, True, None, False, ''),
('inputs:target', 'vector3d', 0, 'Target Orientation', 'The desired orientation as euler angles (XYZ) in local space', {}, True, [0.0, 0.0, 0.0], False, ''),
('inputs:usePath', 'bool', 0, None, "When true, the 'primPath' attribute is used, otherwise it will read the connection at the 'prim' attribute", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, True, 'Use prim input with a GetPrimsAtPath node instead'),
('outputs:finished', 'execution', 0, 'Finished', 'The output execution, sent one the maneuver is completed', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.inputs.prim = og.AttributeRole.TARGET
role_data.inputs.primPath = og.AttributeRole.PATH
role_data.inputs.stop = og.AttributeRole.EXECUTION
role_data.inputs.target = og.AttributeRole.VECTOR
role_data.outputs.finished = og.AttributeRole.EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def exponent(self):
data_view = og.AttributeValueHelper(self._attributes.exponent)
return data_view.get()
@exponent.setter
def exponent(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.exponent)
data_view = og.AttributeValueHelper(self._attributes.exponent)
data_view.set(value)
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
return data_view.get()
@prim.setter
def prim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prim)
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
@property
def primPath(self):
data_view = og.AttributeValueHelper(self._attributes.primPath)
return data_view.get()
@primPath.setter
def primPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.primPath)
data_view = og.AttributeValueHelper(self._attributes.primPath)
data_view.set(value)
self.primPath_size = data_view.get_array_size()
@property
def speed(self):
data_view = og.AttributeValueHelper(self._attributes.speed)
return data_view.get()
@speed.setter
def speed(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.speed)
data_view = og.AttributeValueHelper(self._attributes.speed)
data_view.set(value)
@property
def stop(self):
data_view = og.AttributeValueHelper(self._attributes.stop)
return data_view.get()
@stop.setter
def stop(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.stop)
data_view = og.AttributeValueHelper(self._attributes.stop)
data_view.set(value)
@property
def target(self):
data_view = og.AttributeValueHelper(self._attributes.target)
return data_view.get()
@target.setter
def target(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.target)
data_view = og.AttributeValueHelper(self._attributes.target)
data_view.set(value)
@property
def usePath(self):
data_view = og.AttributeValueHelper(self._attributes.usePath)
return data_view.get()
@usePath.setter
def usePath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usePath)
data_view = og.AttributeValueHelper(self._attributes.usePath)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def finished(self):
data_view = og.AttributeValueHelper(self._attributes.finished)
return data_view.get()
@finished.setter
def finished(self, value):
data_view = og.AttributeValueHelper(self._attributes.finished)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnRotateToOrientationDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnRotateToOrientationDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnRotateToOrientationDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 10,132 | Python | 44.439462 | 263 | 0.639755 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadPrimsBundleDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ReadPrimsBundle
Reads primitives and outputs multiple primitive in a bundle.
"""
from typing import Any
import numpy
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadPrimsBundleDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ReadPrimsBundle
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.attrNamesToImport
inputs.primPaths
inputs.prims
inputs.usdTimecode
inputs.usePaths
Outputs:
outputs.primsBundle
State:
state.attrNamesToImport
state.primPaths
state.usdTimecode
state.usePaths
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:attrNamesToImport', 'string', 0, 'Attributes To Import', "A list of wildcard patterns used to match the attribute names that are to be imported\n\nSupported syntax of wildcard pattern:\n '*' - match an arbitrary number of any characters\n '?' - match any single character\n '^' - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['points', 'faceVertexCount', 'faceVertexIndices', 'size']\n '*' - match any\n '* ^points' - match any, but exclude 'points'\n '* ^face*' - match any, but exclude 'faceVertexCount' and 'faceVertexIndices'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:primPaths', 'path,token,token[]', 1, 'Prim Paths', "The paths of the prims to be read from when 'usePaths' is true", {}, False, None, False, ''),
('inputs:prims', 'target', 0, None, "The prims to be read from when 'usePaths' is false", {ogn.MetadataKeys.ALLOW_MULTI_INPUTS: '1'}, False, [], False, ''),
('inputs:usdTimecode', 'timecode', 0, 'Time', 'The time at which to evaluate the transform of the USD prim. A value of "NaN" indicates that the default USD time stamp should be used', {ogn.MetadataKeys.DEFAULT: '"NaN"'}, True, float("NaN"), False, ''),
('inputs:usePaths', 'bool', 0, 'Use Paths', "When true, the 'primPaths' attribute is used as the path to the prim being read, otherwise it will read the connection at the 'prim' attribute", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:primsBundle', 'bundle', 0, None, 'An output bundle containing multiple prims as children.\nEach child contains data attributes and two additional token attributes named sourcePrimPath and sourcePrimType\nwhich contain the path and the type of the Prim being read', {}, True, None, False, ''),
('state:attrNamesToImport', 'string', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:primPaths', 'uint64[]', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:usdTimecode', 'timecode', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: '"NaN"'}, True, float("NaN"), False, ''),
('state:usePaths', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.attrNamesToImport = og.AttributeRole.TEXT
role_data.inputs.prims = og.AttributeRole.TARGET
role_data.inputs.usdTimecode = og.AttributeRole.TIMECODE
role_data.outputs.primsBundle = og.AttributeRole.BUNDLE
role_data.state.attrNamesToImport = og.AttributeRole.TEXT
role_data.state.usdTimecode = og.AttributeRole.TIMECODE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.attrNamesToImport)
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
self.attrNamesToImport_size = data_view.get_array_size()
@property
def primPaths(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.primPaths"""
return og.RuntimeAttribute(self._attributes.primPaths.get_attribute_data(), self._context, True)
@primPaths.setter
def primPaths(self, value_to_set: Any):
"""Assign another attribute's value to outputs.primPaths"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.primPaths.value = value_to_set.value
else:
self.primPaths.value = value_to_set
@property
def prims(self):
data_view = og.AttributeValueHelper(self._attributes.prims)
return data_view.get()
@prims.setter
def prims(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prims)
data_view = og.AttributeValueHelper(self._attributes.prims)
data_view.set(value)
self.prims_size = data_view.get_array_size()
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usdTimecode)
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
@property
def usePaths(self):
data_view = og.AttributeValueHelper(self._attributes.usePaths)
return data_view.get()
@usePaths.setter
def usePaths(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usePaths)
data_view = og.AttributeValueHelper(self._attributes.usePaths)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def primsBundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.primsBundle"""
return self.__bundles.primsBundle
@primsBundle.setter
def primsBundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.primsBundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.primsBundle.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.attrNamesToImport_size = None
self.primPaths_size = None
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
self.attrNamesToImport_size = data_view.get_array_size()
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
self.attrNamesToImport_size = data_view.get_array_size()
@property
def primPaths(self):
data_view = og.AttributeValueHelper(self._attributes.primPaths)
self.primPaths_size = data_view.get_array_size()
return data_view.get()
@primPaths.setter
def primPaths(self, value):
data_view = og.AttributeValueHelper(self._attributes.primPaths)
data_view.set(value)
self.primPaths_size = data_view.get_array_size()
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
@property
def usePaths(self):
data_view = og.AttributeValueHelper(self._attributes.usePaths)
return data_view.get()
@usePaths.setter
def usePaths(self, value):
data_view = og.AttributeValueHelper(self._attributes.usePaths)
data_view.set(value)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadPrimsBundleDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadPrimsBundleDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadPrimsBundleDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 12,275 | Python | 49.727273 | 678 | 0.655886 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnSetMatrix4RotationDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.SetMatrix4Rotation
Sets the rotation of the given matrix4d value which represents a linear transformation. Does not modify the translation (row
3) of the matrix.
"""
from typing import Any
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnSetMatrix4RotationDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.SetMatrix4Rotation
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.fixedRotationAxis
inputs.matrix
inputs.rotationAngle
Outputs:
outputs.matrix
Predefined Tokens:
tokens.X
tokens.Y
tokens.Z
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:fixedRotationAxis', 'token', 0, None, 'The axis of the given rotation', {ogn.MetadataKeys.ALLOWED_TOKENS: 'X,Y,Z', ogn.MetadataKeys.ALLOWED_TOKENS_RAW: '["X", "Y", "Z"]', ogn.MetadataKeys.DEFAULT: '"Y"'}, True, "Y", False, ''),
('inputs:matrix', 'matrixd[4],matrixd[4][]', 1, None, 'The matrix to be modified', {}, True, None, False, ''),
('inputs:rotationAngle', 'double,double[]', 1, 'Rotation', 'The rotation in degrees that the matrix will apply about the given rotationAxis.', {}, True, None, False, ''),
('outputs:matrix', 'matrixd[4],matrixd[4][]', 1, None, 'The updated matrix', {}, True, None, False, ''),
])
class tokens:
X = "X"
Y = "Y"
Z = "Z"
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def fixedRotationAxis(self):
data_view = og.AttributeValueHelper(self._attributes.fixedRotationAxis)
return data_view.get()
@fixedRotationAxis.setter
def fixedRotationAxis(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.fixedRotationAxis)
data_view = og.AttributeValueHelper(self._attributes.fixedRotationAxis)
data_view.set(value)
@property
def matrix(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.matrix"""
return og.RuntimeAttribute(self._attributes.matrix.get_attribute_data(), self._context, True)
@matrix.setter
def matrix(self, value_to_set: Any):
"""Assign another attribute's value to outputs.matrix"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.matrix.value = value_to_set.value
else:
self.matrix.value = value_to_set
@property
def rotationAngle(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.rotationAngle"""
return og.RuntimeAttribute(self._attributes.rotationAngle.get_attribute_data(), self._context, True)
@rotationAngle.setter
def rotationAngle(self, value_to_set: Any):
"""Assign another attribute's value to outputs.rotationAngle"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.rotationAngle.value = value_to_set.value
else:
self.rotationAngle.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def matrix(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.matrix"""
return og.RuntimeAttribute(self._attributes.matrix.get_attribute_data(), self._context, False)
@matrix.setter
def matrix(self, value_to_set: Any):
"""Assign another attribute's value to outputs.matrix"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.matrix.value = value_to_set.value
else:
self.matrix.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnSetMatrix4RotationDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnSetMatrix4RotationDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnSetMatrix4RotationDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,338 | Python | 46.655844 | 244 | 0.658354 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnPartialSumDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.PartialSum
Compute the partial sums of the input integer array named 'array' and put the result in an output integer array named 'partialSum'.
A partial sum is the sum of all of the elements up to but not including a certain point in an array, so output element 0
is always 0, element 1 is array[0], element 2 is array[0] + array[1], etc.
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnPartialSumDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.PartialSum
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.array
Outputs:
outputs.partialSum
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:array', 'int[]', 0, None, 'List of integers whose partial sum is to be computed', {ogn.MetadataKeys.DEFAULT: '[]'}, True, [], False, ''),
('outputs:partialSum', 'int[]', 0, None, "Array whose nth value equals the nth partial sum of the input 'array'", {ogn.MetadataKeys.DEFAULT: '[]'}, True, [], False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def array(self):
data_view = og.AttributeValueHelper(self._attributes.array)
return data_view.get()
@array.setter
def array(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.array)
data_view = og.AttributeValueHelper(self._attributes.array)
data_view.set(value)
self.array_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.partialSum_size = 0
self._batchedWriteValues = { }
@property
def partialSum(self):
data_view = og.AttributeValueHelper(self._attributes.partialSum)
return data_view.get(reserved_element_count=self.partialSum_size)
@partialSum.setter
def partialSum(self, value):
data_view = og.AttributeValueHelper(self._attributes.partialSum)
data_view.set(value)
self.partialSum_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnPartialSumDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnPartialSumDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnPartialSumDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 5,613 | Python | 47.817391 | 177 | 0.672902 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadOmniGraphValueDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ReadOmniGraphValue
Imports a data value from the Fabric cache that is located at the given path and attribute name. This is for data that is
not already present in OmniGraph as that data can be accessed through a direct connection to the underlying OmniGraph node.
"""
from typing import Any
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadOmniGraphValueDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ReadOmniGraphValue
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.name
inputs.path
Outputs:
outputs.value
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:name', 'token', 0, None, 'The name of the attribute to be queried', {}, True, "", False, ''),
('inputs:path', 'path', 0, None, 'The path to the Fabric data bucket in which the attribute being queried lives.', {}, True, "", False, ''),
('outputs:value', 'any', 2, None, 'The attribute value', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.path = og.AttributeRole.PATH
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def name(self):
data_view = og.AttributeValueHelper(self._attributes.name)
return data_view.get()
@name.setter
def name(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.name)
data_view = og.AttributeValueHelper(self._attributes.name)
data_view.set(value)
@property
def path(self):
data_view = og.AttributeValueHelper(self._attributes.path)
return data_view.get()
@path.setter
def path(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.path)
data_view = og.AttributeValueHelper(self._attributes.path)
data_view.set(value)
self.path_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def value(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.value"""
return og.RuntimeAttribute(self._attributes.value.get_attribute_data(), self._context, False)
@value.setter
def value(self, value_to_set: Any):
"""Assign another attribute's value to outputs.value"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.value.value = value_to_set.value
else:
self.value.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadOmniGraphValueDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadOmniGraphValueDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadOmniGraphValueDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,380 | Python | 45.919117 | 148 | 0.661912 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnToStringDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ToString
Converts the given input to a string equivalent.
"""
from typing import Any
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnToStringDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ToString
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.value
Outputs:
outputs.converted
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:value', 'any', 2, 'value', 'The value to be converted to a string.\n\nNumeric values are converted using C++\'s std::ostringstream << operator. This can result in the values\nbeing converted to exponential form. E.g: 1.234e+06\nArrays of numeric values are converted to Python list syntax. E.g: [1.5, -0.03]\nA uchar value is converted to a single, unquoted character.\nAn array of uchar values is converted to an unquoted string. Avoid zero values (i.e. null chars) in the\narray as the behavior is undefined and may vary over time.\nA single token is converted to its unquoted string equivalent.\nAn array of tokens is converted to Python list syntax with each token enclosed in double quotes. E.g. ["first", "second"]', {}, True, None, False, ''),
('outputs:converted', 'string', 0, 'String', 'Output string', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.outputs.converted = og.AttributeRole.TEXT
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def value(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.value"""
return og.RuntimeAttribute(self._attributes.value.get_attribute_data(), self._context, True)
@value.setter
def value(self, value_to_set: Any):
"""Assign another attribute's value to outputs.value"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.value.value = value_to_set.value
else:
self.value.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.converted_size = None
self._batchedWriteValues = { }
@property
def converted(self):
data_view = og.AttributeValueHelper(self._attributes.converted)
return data_view.get(reserved_element_count=self.converted_size)
@converted.setter
def converted(self, value):
data_view = og.AttributeValueHelper(self._attributes.converted)
data_view.set(value)
self.converted_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnToStringDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnToStringDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnToStringDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,228 | Python | 50.908333 | 767 | 0.677906 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadPrimDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ReadPrim
DEPRECATED - use ReadPrimAttributes!
"""
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadPrimDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ReadPrim
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.attrNamesToImport
inputs.computeBoundingBox
inputs.prim
inputs.usdTimecode
Outputs:
outputs.primBundle
State:
state.attrNamesToImport
state.computeBoundingBox
state.primPath
state.primTypes
state.usdTimecode
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:attrNamesToImport', 'token', 0, 'Attributes To Import', "A list of wildcard patterns used to match the attribute names that are to be imported\n\nSupported syntax of wildcard pattern:\n '*' - match an arbitrary number of any characters\n '?' - match any single character\n '^' - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['points', 'faceVertexCount', 'faceVertexIndices', 'size']\n '*' - match any\n '* ^points' - match any, but exclude 'points'\n '* ^face*' - match any, but exclude 'faceVertexCount' and 'faceVertexIndices'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:computeBoundingBox', 'bool', 0, 'Compute Bounding Box', "For each primitive compute local bounding box and store them as 'bboxMinCorner', 'bboxMaxCorner' and 'bboxTransform' attributes.", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:prim', 'bundle', 0, None, "The prims to be read from when 'usePathPattern' is false", {}, False, None, False, ''),
('inputs:usdTimecode', 'timecode', 0, 'Time', 'The time at which to evaluate the transform of the USD prim. A value of "NaN" indicates that the default USD time stamp should be used', {ogn.MetadataKeys.DEFAULT: '"NaN"'}, True, float("NaN"), False, ''),
('outputs:primBundle', 'bundle', 0, None, 'A bundle of the target Prim attributes.\nIn addition to the data attributes, there is a token attribute named sourcePrimPath\nwhich contains the path of the Prim being read', {}, True, None, False, ''),
('state:attrNamesToImport', 'uint64', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:computeBoundingBox', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:primPath', 'uint64', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:primTypes', 'uint64', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:usdTimecode', 'timecode', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: '"NaN"'}, True, float("NaN"), False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.prim = og.AttributeRole.BUNDLE
role_data.inputs.usdTimecode = og.AttributeRole.TIMECODE
role_data.outputs.primBundle = og.AttributeRole.BUNDLE
role_data.state.usdTimecode = og.AttributeRole.TIMECODE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.attrNamesToImport)
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
@property
def computeBoundingBox(self):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
return data_view.get()
@computeBoundingBox.setter
def computeBoundingBox(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.computeBoundingBox)
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
data_view.set(value)
@property
def prim(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.prim"""
return self.__bundles.prim
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usdTimecode)
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def primBundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.primBundle"""
return self.__bundles.primBundle
@primBundle.setter
def primBundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.primBundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.primBundle.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
@property
def computeBoundingBox(self):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
return data_view.get()
@computeBoundingBox.setter
def computeBoundingBox(self, value):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
data_view.set(value)
@property
def primPath(self):
data_view = og.AttributeValueHelper(self._attributes.primPath)
return data_view.get()
@primPath.setter
def primPath(self, value):
data_view = og.AttributeValueHelper(self._attributes.primPath)
data_view.set(value)
@property
def primTypes(self):
data_view = og.AttributeValueHelper(self._attributes.primTypes)
return data_view.get()
@primTypes.setter
def primTypes(self, value):
data_view = og.AttributeValueHelper(self._attributes.primTypes)
data_view.set(value)
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadPrimDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadPrimDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadPrimDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 11,149 | Python | 49.681818 | 677 | 0.658983 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnRandomUnitVectorDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.RandomUnitVector
Generates a random vector with uniform distribution on the unit sphere.
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnRandomUnitVectorDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.RandomUnitVector
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.isNoise
inputs.seed
inputs.useSeed
Outputs:
outputs.execOut
outputs.random
State:
state.gen
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, None, 'The input execution port to output a new random value', {}, True, None, False, ''),
('inputs:isNoise', 'bool', 0, 'Is noise function', 'Turn this node into a noise generator function\nFor a given seed, it will then always output the same number(s)', {ogn.MetadataKeys.HIDDEN: 'true', ogn.MetadataKeys.LITERAL_ONLY: '1', ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:seed', 'uint64', 0, 'Seed', 'The seed of the random generator.', {}, False, None, False, ''),
('inputs:useSeed', 'bool', 0, 'Use seed', 'Use the custom seed instead of a random one', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:execOut', 'execution', 0, None, 'The output execution port', {}, True, None, False, ''),
('outputs:random', 'vector3f', 0, 'Random Unit Vector', 'The random unit vector that was generated', {}, True, None, False, ''),
('state:gen', 'matrix3d', 0, None, 'Random number generator internal state (abusing matrix3d because it is large enough)', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.outputs.execOut = og.AttributeRole.EXECUTION
role_data.outputs.random = og.AttributeRole.VECTOR
role_data.state.gen = og.AttributeRole.MATRIX
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def isNoise(self):
data_view = og.AttributeValueHelper(self._attributes.isNoise)
return data_view.get()
@isNoise.setter
def isNoise(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.isNoise)
data_view = og.AttributeValueHelper(self._attributes.isNoise)
data_view.set(value)
@property
def seed(self):
data_view = og.AttributeValueHelper(self._attributes.seed)
return data_view.get()
@seed.setter
def seed(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.seed)
data_view = og.AttributeValueHelper(self._attributes.seed)
data_view.set(value)
@property
def useSeed(self):
data_view = og.AttributeValueHelper(self._attributes.useSeed)
return data_view.get()
@useSeed.setter
def useSeed(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.useSeed)
data_view = og.AttributeValueHelper(self._attributes.useSeed)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def execOut(self):
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
data_view = og.AttributeValueHelper(self._attributes.execOut)
data_view.set(value)
@property
def random(self):
data_view = og.AttributeValueHelper(self._attributes.random)
return data_view.get()
@random.setter
def random(self, value):
data_view = og.AttributeValueHelper(self._attributes.random)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
@property
def gen(self):
data_view = og.AttributeValueHelper(self._attributes.gen)
return data_view.get()
@gen.setter
def gen(self, value):
data_view = og.AttributeValueHelper(self._attributes.gen)
data_view.set(value)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnRandomUnitVectorDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnRandomUnitVectorDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnRandomUnitVectorDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 8,417 | Python | 44.016043 | 304 | 0.646667 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadVariableDatabase.py | """Support for simplified access to data on nodes of type omni.graph.core.ReadVariable
Node that reads a value from a variable
"""
from typing import Any
import usdrt
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadVariableDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.core.ReadVariable
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.graph
inputs.targetPath
inputs.variableName
Outputs:
outputs.value
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:graph', 'target', 0, None, 'Ignored. Do not use', {ogn.MetadataKeys.HIDDEN: 'true'}, False, [], False, ''),
('inputs:targetPath', 'token', 0, None, 'Ignored. Do not use.', {ogn.MetadataKeys.HIDDEN: 'true'}, False, None, False, ''),
('inputs:variableName', 'token', 0, None, 'The name of the graph variable to use.', {ogn.MetadataKeys.HIDDEN: 'true', ogn.MetadataKeys.LITERAL_ONLY: '1'}, True, "", False, ''),
('outputs:value', 'any', 2, None, 'The variable value that we returned.', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.graph = og.AttributeRole.TARGET
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def graph(self):
data_view = og.AttributeValueHelper(self._attributes.graph)
return data_view.get()
@graph.setter
def graph(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.graph)
data_view = og.AttributeValueHelper(self._attributes.graph)
data_view.set(value)
self.graph_size = data_view.get_array_size()
@property
def targetPath(self):
data_view = og.AttributeValueHelper(self._attributes.targetPath)
return data_view.get()
@targetPath.setter
def targetPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.targetPath)
data_view = og.AttributeValueHelper(self._attributes.targetPath)
data_view.set(value)
@property
def variableName(self):
data_view = og.AttributeValueHelper(self._attributes.variableName)
return data_view.get()
@variableName.setter
def variableName(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.variableName)
data_view = og.AttributeValueHelper(self._attributes.variableName)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def value(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.value"""
return og.RuntimeAttribute(self._attributes.value.get_attribute_data(), self._context, False)
@value.setter
def value(self, value_to_set: Any):
"""Assign another attribute's value to outputs.value"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.value.value = value_to_set.value
else:
self.value.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadVariableDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadVariableDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadVariableDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,886 | Python | 44.913333 | 184 | 0.654807 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnBlendVariantsDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.BlendVariants
Add new variant by blending two variants
"""
import carb
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnBlendVariantsDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.BlendVariants
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.blend
inputs.execIn
inputs.prim
inputs.setVariant
inputs.variantNameA
inputs.variantNameB
inputs.variantSetName
Outputs:
outputs.bundle
outputs.execOut
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:blend', 'double', 0, None, 'The blend value in [0.0, 1.0]', {ogn.MetadataKeys.DEFAULT: '0.0'}, True, 0.0, False, ''),
('inputs:execIn', 'execution', 0, None, 'The input execution', {}, True, None, False, ''),
('inputs:prim', 'target', 0, None, 'The prim with the variantSet', {}, True, [], False, ''),
('inputs:setVariant', 'bool', 0, None, 'Sets the variant selection when finished rather than writing to the attribute values', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:variantNameA', 'token', 0, None, 'The first variant name', {}, True, "", False, ''),
('inputs:variantNameB', 'token', 0, None, 'The second variant name', {}, True, "", False, ''),
('inputs:variantSetName', 'token', 0, None, 'The variantSet name', {}, True, "", False, ''),
('outputs:bundle', 'bundle', 0, 'Bundle', 'Output bundle with blended attributes', {}, True, None, False, ''),
('outputs:execOut', 'execution', 0, None, 'The output execution', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.inputs.prim = og.AttributeRole.TARGET
role_data.outputs.bundle = og.AttributeRole.BUNDLE
role_data.outputs.execOut = og.AttributeRole.EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def blend(self):
data_view = og.AttributeValueHelper(self._attributes.blend)
return data_view.get()
@blend.setter
def blend(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.blend)
data_view = og.AttributeValueHelper(self._attributes.blend)
data_view.set(value)
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
return data_view.get()
@prim.setter
def prim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prim)
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
@property
def setVariant(self):
data_view = og.AttributeValueHelper(self._attributes.setVariant)
return data_view.get()
@setVariant.setter
def setVariant(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.setVariant)
data_view = og.AttributeValueHelper(self._attributes.setVariant)
data_view.set(value)
@property
def variantNameA(self):
data_view = og.AttributeValueHelper(self._attributes.variantNameA)
return data_view.get()
@variantNameA.setter
def variantNameA(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.variantNameA)
data_view = og.AttributeValueHelper(self._attributes.variantNameA)
data_view.set(value)
@property
def variantNameB(self):
data_view = og.AttributeValueHelper(self._attributes.variantNameB)
return data_view.get()
@variantNameB.setter
def variantNameB(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.variantNameB)
data_view = og.AttributeValueHelper(self._attributes.variantNameB)
data_view.set(value)
@property
def variantSetName(self):
data_view = og.AttributeValueHelper(self._attributes.variantSetName)
return data_view.get()
@variantSetName.setter
def variantSetName(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.variantSetName)
data_view = og.AttributeValueHelper(self._attributes.variantSetName)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def bundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.bundle"""
return self.__bundles.bundle
@bundle.setter
def bundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.bundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.bundle.bundle = bundle
@property
def execOut(self):
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
data_view = og.AttributeValueHelper(self._attributes.execOut)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnBlendVariantsDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnBlendVariantsDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnBlendVariantsDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,889 | Python | 43.549549 | 196 | 0.640004 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnSourceIndicesDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.SourceIndices
Takes an input array of index values in 'sourceStartsInTarget' encoded as the list of index values at which the output array
value will be incremented, starting at the second entry, and with the last entry into the array being the desired sized
of the output array 'sourceIndices'. For example the input [1,2,3,5,6,6] would generate an output array of size 5 (last
index) consisting of the values [0,0,2,3,3,3]:
- the first two 0s to fill the output array up to index input[1]=2
- the first two 0s to fill the output array up to index input[1]=2
- the 2 to fill the output array up to index input[2]=3
- the three 3s to fill the output array up to index input[3]=6
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnSourceIndicesDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.SourceIndices
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.sourceStartsInTarget
Outputs:
outputs.sourceIndices
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:sourceStartsInTarget', 'int[]', 0, None, 'List of index values encoding the increments for the output array values', {ogn.MetadataKeys.DEFAULT: '[]'}, True, [], False, ''),
('outputs:sourceIndices', 'int[]', 0, None, 'Decoded list of index values as described by the node algorithm', {ogn.MetadataKeys.DEFAULT: '[]'}, True, [], False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def sourceStartsInTarget(self):
data_view = og.AttributeValueHelper(self._attributes.sourceStartsInTarget)
return data_view.get()
@sourceStartsInTarget.setter
def sourceStartsInTarget(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.sourceStartsInTarget)
data_view = og.AttributeValueHelper(self._attributes.sourceStartsInTarget)
data_view.set(value)
self.sourceStartsInTarget_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.sourceIndices_size = 0
self._batchedWriteValues = { }
@property
def sourceIndices(self):
data_view = og.AttributeValueHelper(self._attributes.sourceIndices)
return data_view.get(reserved_element_count=self.sourceIndices_size)
@sourceIndices.setter
def sourceIndices(self, value):
data_view = og.AttributeValueHelper(self._attributes.sourceIndices)
data_view.set(value)
self.sourceIndices_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnSourceIndicesDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnSourceIndicesDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnSourceIndicesDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,168 | Python | 49.565573 | 189 | 0.686122 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnTranslateToTargetDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.TranslateToTarget
This node smoothly translates a prim object to a target prim object given a speed and easing factor. At the end of the maneuver,
the source prim will have the same translation as the target prim
"""
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnTranslateToTargetDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.TranslateToTarget
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.exponent
inputs.sourcePrim
inputs.sourcePrimPath
inputs.speed
inputs.stop
inputs.targetPrim
inputs.targetPrimPath
inputs.useSourcePath
inputs.useTargetPath
Outputs:
outputs.finished
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, 'Execute In', 'The input execution', {}, True, None, False, ''),
('inputs:exponent', 'float', 0, None, 'The blend exponent, which is the degree of the ease curve\n (1 = linear, 2 = quadratic, 3 = cubic, etc). ', {ogn.MetadataKeys.DEFAULT: '2.0'}, True, 2.0, False, ''),
('inputs:sourcePrim', 'target', 0, None, 'The source prim to be transformed', {}, False, [], False, ''),
('inputs:sourcePrimPath', 'path', 0, None, "The source prim to be transformed, used when 'useSourcePath' is true", {}, False, None, False, ''),
('inputs:speed', 'double', 0, None, 'The peak speed of approach (Units / Second)', {ogn.MetadataKeys.DEFAULT: '1.0'}, True, 1.0, False, ''),
('inputs:stop', 'execution', 0, 'Stop', 'Stops the maneuver', {}, True, None, False, ''),
('inputs:targetPrim', 'bundle', 0, None, "The destination prim. The target's translation will be matched by the sourcePrim", {}, False, None, False, ''),
('inputs:targetPrimPath', 'path', 0, None, "The destination prim. The target's translation will be matched by the sourcePrim, used when 'useTargetPath' is true", {}, False, None, False, ''),
('inputs:useSourcePath', 'bool', 0, None, "When true, the 'sourcePrimPath' attribute is used, otherwise it will read the connection at the 'sourcePrim' attribute", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:useTargetPath', 'bool', 0, None, "When true, the 'targetPrimPath' attribute is used, otherwise it will read the connection at the 'targetPrim' attribute", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:finished', 'execution', 0, 'Finished', 'The output execution, sent one the maneuver is completed', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.inputs.sourcePrim = og.AttributeRole.TARGET
role_data.inputs.sourcePrimPath = og.AttributeRole.PATH
role_data.inputs.stop = og.AttributeRole.EXECUTION
role_data.inputs.targetPrim = og.AttributeRole.BUNDLE
role_data.inputs.targetPrimPath = og.AttributeRole.PATH
role_data.outputs.finished = og.AttributeRole.EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def exponent(self):
data_view = og.AttributeValueHelper(self._attributes.exponent)
return data_view.get()
@exponent.setter
def exponent(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.exponent)
data_view = og.AttributeValueHelper(self._attributes.exponent)
data_view.set(value)
@property
def sourcePrim(self):
data_view = og.AttributeValueHelper(self._attributes.sourcePrim)
return data_view.get()
@sourcePrim.setter
def sourcePrim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.sourcePrim)
data_view = og.AttributeValueHelper(self._attributes.sourcePrim)
data_view.set(value)
self.sourcePrim_size = data_view.get_array_size()
@property
def sourcePrimPath(self):
data_view = og.AttributeValueHelper(self._attributes.sourcePrimPath)
return data_view.get()
@sourcePrimPath.setter
def sourcePrimPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.sourcePrimPath)
data_view = og.AttributeValueHelper(self._attributes.sourcePrimPath)
data_view.set(value)
self.sourcePrimPath_size = data_view.get_array_size()
@property
def speed(self):
data_view = og.AttributeValueHelper(self._attributes.speed)
return data_view.get()
@speed.setter
def speed(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.speed)
data_view = og.AttributeValueHelper(self._attributes.speed)
data_view.set(value)
@property
def stop(self):
data_view = og.AttributeValueHelper(self._attributes.stop)
return data_view.get()
@stop.setter
def stop(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.stop)
data_view = og.AttributeValueHelper(self._attributes.stop)
data_view.set(value)
@property
def targetPrim(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.targetPrim"""
return self.__bundles.targetPrim
@property
def targetPrimPath(self):
data_view = og.AttributeValueHelper(self._attributes.targetPrimPath)
return data_view.get()
@targetPrimPath.setter
def targetPrimPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.targetPrimPath)
data_view = og.AttributeValueHelper(self._attributes.targetPrimPath)
data_view.set(value)
self.targetPrimPath_size = data_view.get_array_size()
@property
def useSourcePath(self):
data_view = og.AttributeValueHelper(self._attributes.useSourcePath)
return data_view.get()
@useSourcePath.setter
def useSourcePath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.useSourcePath)
data_view = og.AttributeValueHelper(self._attributes.useSourcePath)
data_view.set(value)
@property
def useTargetPath(self):
data_view = og.AttributeValueHelper(self._attributes.useTargetPath)
return data_view.get()
@useTargetPath.setter
def useTargetPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.useTargetPath)
data_view = og.AttributeValueHelper(self._attributes.useTargetPath)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def finished(self):
data_view = og.AttributeValueHelper(self._attributes.finished)
return data_view.get()
@finished.setter
def finished(self, value):
data_view = og.AttributeValueHelper(self._attributes.finished)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnTranslateToTargetDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnTranslateToTargetDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnTranslateToTargetDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 11,759 | Python | 46.419355 | 233 | 0.648184 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnFModDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.FMod
Computes the floating point remainder of A / B. If B is zero, the result is zero. The returned value has the same sign as
A
"""
from typing import Any
import sys
import traceback
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnFModDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.FMod
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.a
inputs.b
Outputs:
outputs.result
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:a', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'A', 'The dividend of (A / B)', {}, True, None, False, ''),
('inputs:b', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'B', 'The divisor of (A / B)', {}, True, None, False, ''),
('outputs:result', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'Result', 'The floating point remainder of A / B', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def a(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.a"""
return og.RuntimeAttribute(self._attributes.a.get_attribute_data(), self._context, True)
@a.setter
def a(self, value_to_set: Any):
"""Assign another attribute's value to outputs.a"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.a.value = value_to_set.value
else:
self.a.value = value_to_set
@property
def b(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.b"""
return og.RuntimeAttribute(self._attributes.b.get_attribute_data(), self._context, True)
@b.setter
def b(self, value_to_set: Any):
"""Assign another attribute's value to outputs.b"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.b.value = value_to_set.value
else:
self.b.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def result(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.result"""
return og.RuntimeAttribute(self._attributes.result.get_attribute_data(), self._context, False)
@result.setter
def result(self, value_to_set: Any):
"""Assign another attribute's value to outputs.result"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.result.value = value_to_set.value
else:
self.result.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnFModDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnFModDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnFModDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
class abi:
"""Class defining the ABI interface for the node type"""
@staticmethod
def get_node_type():
get_node_type_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'get_node_type', None)
if callable(get_node_type_function):
return get_node_type_function()
return 'omni.graph.nodes.FMod'
@staticmethod
def compute(context, node):
def database_valid():
if db.inputs.a.type.base_type == og.BaseDataType.UNKNOWN:
db.log_warning('Required extended attribute inputs:a is not resolved, compute skipped')
return False
if db.inputs.b.type.base_type == og.BaseDataType.UNKNOWN:
db.log_warning('Required extended attribute inputs:b is not resolved, compute skipped')
return False
if db.outputs.result.type.base_type == og.BaseDataType.UNKNOWN:
db.log_warning('Required extended attribute outputs:result is not resolved, compute skipped')
return False
return True
try:
per_node_data = OgnFModDatabase.PER_NODE_DATA[node.node_id()]
db = per_node_data.get('_db')
if db is None:
db = OgnFModDatabase(node)
per_node_data['_db'] = db
if not database_valid():
per_node_data['_db'] = None
return False
except:
db = OgnFModDatabase(node)
try:
compute_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'compute', None)
if callable(compute_function) and compute_function.__code__.co_argcount > 1:
return compute_function(context, node)
db.inputs._prefetch()
db.inputs._setting_locked = True
with og.in_compute():
return OgnFModDatabase.NODE_TYPE_CLASS.compute(db)
except Exception as error:
stack_trace = "".join(traceback.format_tb(sys.exc_info()[2].tb_next))
db.log_error(f'Assertion raised in compute - {error}\n{stack_trace}', add_context=False)
finally:
db.inputs._setting_locked = False
db.outputs._commit()
return False
@staticmethod
def initialize(context, node):
OgnFModDatabase._initialize_per_node_data(node)
initialize_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'initialize', None)
if callable(initialize_function):
initialize_function(context, node)
per_node_data = OgnFModDatabase.PER_NODE_DATA[node.node_id()]
def on_connection_or_disconnection(*args):
per_node_data['_db'] = None
node.register_on_connected_callback(on_connection_or_disconnection)
node.register_on_disconnected_callback(on_connection_or_disconnection)
@staticmethod
def release(node):
release_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'release', None)
if callable(release_function):
release_function(node)
OgnFModDatabase._release_per_node_data(node)
@staticmethod
def release_instance(node, target):
OgnFModDatabase._release_per_node_instance_data(node, target)
@staticmethod
def update_node_version(context, node, old_version, new_version):
update_node_version_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'update_node_version', None)
if callable(update_node_version_function):
return update_node_version_function(context, node, old_version, new_version)
return False
@staticmethod
def initialize_type(node_type):
initialize_type_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'initialize_type', None)
needs_initializing = True
if callable(initialize_type_function):
needs_initializing = initialize_type_function(node_type)
if needs_initializing:
node_type.set_metadata(ogn.MetadataKeys.EXTENSION, "omni.graph.nodes")
node_type.set_metadata(ogn.MetadataKeys.UI_NAME, "Float Remainder")
node_type.set_metadata(ogn.MetadataKeys.CATEGORIES, "math:operator")
node_type.set_metadata(ogn.MetadataKeys.DESCRIPTION, "Computes the floating point remainder of A / B. If B is zero, the result is zero. The returned value has the same sign as A")
node_type.set_metadata(ogn.MetadataKeys.LANGUAGE, "Python")
OgnFModDatabase.INTERFACE.add_to_node_type(node_type)
@staticmethod
def on_connection_type_resolve(node):
on_connection_type_resolve_function = getattr(OgnFModDatabase.NODE_TYPE_CLASS, 'on_connection_type_resolve', None)
if callable(on_connection_type_resolve_function):
on_connection_type_resolve_function(node)
NODE_TYPE_CLASS = None
@staticmethod
def register(node_type_class):
OgnFModDatabase.NODE_TYPE_CLASS = node_type_class
og.register_node_type(OgnFModDatabase.abi, 1)
@staticmethod
def deregister():
og.deregister_node_type("omni.graph.nodes.FMod")
| 13,963 | Python | 55.534413 | 923 | 0.630595 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnCreateTubeTopologyDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.CreateTubeTopology
Creates the face vertex counts and indices describing a tube topology with the given number of rows and columns.
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnCreateTubeTopologyDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.CreateTubeTopology
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.cols
inputs.rows
Outputs:
outputs.faceVertexCounts
outputs.faceVertexIndices
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:cols', 'int[]', 0, 'Column Array', 'Array of columns in the topology to be generated', {}, True, [], False, ''),
('inputs:rows', 'int[]', 0, 'Row Array', 'Array of rows in the topology to be generated', {}, True, [], False, ''),
('outputs:faceVertexCounts', 'int[]', 0, 'Face Vertex Counts', 'Array of vertex counts for each face in the tube topology', {}, True, None, False, ''),
('outputs:faceVertexIndices', 'int[]', 0, 'Face Vertex Indices', 'Array of vertex indices for each face in the tube topology', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def cols(self):
data_view = og.AttributeValueHelper(self._attributes.cols)
return data_view.get()
@cols.setter
def cols(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.cols)
data_view = og.AttributeValueHelper(self._attributes.cols)
data_view.set(value)
self.cols_size = data_view.get_array_size()
@property
def rows(self):
data_view = og.AttributeValueHelper(self._attributes.rows)
return data_view.get()
@rows.setter
def rows(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.rows)
data_view = og.AttributeValueHelper(self._attributes.rows)
data_view.set(value)
self.rows_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.faceVertexCounts_size = None
self.faceVertexIndices_size = None
self._batchedWriteValues = { }
@property
def faceVertexCounts(self):
data_view = og.AttributeValueHelper(self._attributes.faceVertexCounts)
return data_view.get(reserved_element_count=self.faceVertexCounts_size)
@faceVertexCounts.setter
def faceVertexCounts(self, value):
data_view = og.AttributeValueHelper(self._attributes.faceVertexCounts)
data_view.set(value)
self.faceVertexCounts_size = data_view.get_array_size()
@property
def faceVertexIndices(self):
data_view = og.AttributeValueHelper(self._attributes.faceVertexIndices)
return data_view.get(reserved_element_count=self.faceVertexIndices_size)
@faceVertexIndices.setter
def faceVertexIndices(self, value):
data_view = og.AttributeValueHelper(self._attributes.faceVertexIndices)
data_view.set(value)
self.faceVertexIndices_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnCreateTubeTopologyDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnCreateTubeTopologyDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnCreateTubeTopologyDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,796 | Python | 46.866197 | 162 | 0.665097 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetPrimsDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.GetPrims
Filters primitives in the input bundle by path and type.
"""
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnGetPrimsDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetPrims
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.bundle
inputs.inverse
inputs.pathPattern
inputs.prims
inputs.typePattern
Outputs:
outputs.bundle
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:bundle', 'bundle', 0, None, 'The bundle to be read from', {}, True, None, False, ''),
('inputs:inverse', 'bool', 0, 'Inverse', 'By default all primitives matching the path patterns and types are added to the output bundle;\nwhen this option is on, all mismatching primitives will be added instead.', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:pathPattern', 'string', 0, 'Path Pattern', "A list of wildcard patterns used to match primitive path.\n\nSupported syntax of wildcard pattern:\n `*` - match an arbitrary number of any characters\n `?` - match any single character\n `^` - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box']\n '*' - match any\n '* ^/Box' - match any, but exclude '/Box'\n '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:prims', 'target', 0, None, 'The prim to be extracted from Multiple Primitives in Bundle.', {ogn.MetadataKeys.ALLOW_MULTI_INPUTS: '1'}, False, [], False, ''),
('inputs:typePattern', 'string', 0, 'Type Pattern', "A list of wildcard patterns used to match primitive type.\n\nSupported syntax of wildcard pattern:\n `*` - match an arbitrary number of any characters\n `?` - match any single character\n `^` - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['Mesh', 'Cone', 'Cube']\n '*' - match any\n '* ^Mesh' - match any, but exclude 'Mesh'\n '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('outputs:bundle', 'bundle', 0, None, 'The output bundle that contains filtered primitives', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.bundle = og.AttributeRole.BUNDLE
role_data.inputs.pathPattern = og.AttributeRole.TEXT
role_data.inputs.prims = og.AttributeRole.TARGET
role_data.inputs.typePattern = og.AttributeRole.TEXT
role_data.outputs.bundle = og.AttributeRole.BUNDLE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def bundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.bundle"""
return self.__bundles.bundle
@property
def inverse(self):
data_view = og.AttributeValueHelper(self._attributes.inverse)
return data_view.get()
@inverse.setter
def inverse(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.inverse)
data_view = og.AttributeValueHelper(self._attributes.inverse)
data_view.set(value)
@property
def pathPattern(self):
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
return data_view.get()
@pathPattern.setter
def pathPattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.pathPattern)
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
data_view.set(value)
self.pathPattern_size = data_view.get_array_size()
@property
def prims(self):
data_view = og.AttributeValueHelper(self._attributes.prims)
return data_view.get()
@prims.setter
def prims(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prims)
data_view = og.AttributeValueHelper(self._attributes.prims)
data_view.set(value)
self.prims_size = data_view.get_array_size()
@property
def typePattern(self):
data_view = og.AttributeValueHelper(self._attributes.typePattern)
return data_view.get()
@typePattern.setter
def typePattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.typePattern)
data_view = og.AttributeValueHelper(self._attributes.typePattern)
data_view.set(value)
self.typePattern_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def bundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.bundle"""
return self.__bundles.bundle
@bundle.setter
def bundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.bundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.bundle.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnGetPrimsDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnGetPrimsDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnGetPrimsDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,413 | Python | 51.88764 | 583 | 0.653033 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnCurveTubePositionsDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.CurveTubePositions
Generate tube positions from a curve description
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnCurveTubePositionsDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.CurveTubePositions
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.cols
inputs.curvePoints
inputs.curveVertexCounts
inputs.curveVertexStarts
inputs.out
inputs.tubePointStarts
inputs.up
inputs.width
Outputs:
outputs.points
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:cols', 'int[]', 0, 'Columns', 'Columns of the tubes', {}, True, [], False, ''),
('inputs:curvePoints', 'float3[]', 0, 'Curve Points', 'Points on the curve to be framed', {}, True, [], False, ''),
('inputs:curveVertexCounts', 'int[]', 0, 'Curve Vertex Counts', 'Vertex counts for the curve points', {}, True, [], False, ''),
('inputs:curveVertexStarts', 'int[]', 0, 'Curve Vertex Starts', 'Vertex starting points', {}, True, [], False, ''),
('inputs:out', 'float3[]', 0, 'Out Vectors', 'Out vector directions on the tube', {}, True, [], False, ''),
('inputs:tubePointStarts', 'int[]', 0, 'Tube Point Starts', 'Tube starting point index values', {}, True, [], False, ''),
('inputs:up', 'float3[]', 0, 'Up Vectors', 'Up vectors on the tube', {}, True, [], False, ''),
('inputs:width', 'float[]', 0, 'Tube Widths', 'Width of tube positions', {}, True, [], False, ''),
('outputs:points', 'float3[]', 0, 'Points', 'Points on the tube', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def cols(self):
data_view = og.AttributeValueHelper(self._attributes.cols)
return data_view.get()
@cols.setter
def cols(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.cols)
data_view = og.AttributeValueHelper(self._attributes.cols)
data_view.set(value)
self.cols_size = data_view.get_array_size()
@property
def curvePoints(self):
data_view = og.AttributeValueHelper(self._attributes.curvePoints)
return data_view.get()
@curvePoints.setter
def curvePoints(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.curvePoints)
data_view = og.AttributeValueHelper(self._attributes.curvePoints)
data_view.set(value)
self.curvePoints_size = data_view.get_array_size()
@property
def curveVertexCounts(self):
data_view = og.AttributeValueHelper(self._attributes.curveVertexCounts)
return data_view.get()
@curveVertexCounts.setter
def curveVertexCounts(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.curveVertexCounts)
data_view = og.AttributeValueHelper(self._attributes.curveVertexCounts)
data_view.set(value)
self.curveVertexCounts_size = data_view.get_array_size()
@property
def curveVertexStarts(self):
data_view = og.AttributeValueHelper(self._attributes.curveVertexStarts)
return data_view.get()
@curveVertexStarts.setter
def curveVertexStarts(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.curveVertexStarts)
data_view = og.AttributeValueHelper(self._attributes.curveVertexStarts)
data_view.set(value)
self.curveVertexStarts_size = data_view.get_array_size()
@property
def out(self):
data_view = og.AttributeValueHelper(self._attributes.out)
return data_view.get()
@out.setter
def out(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.out)
data_view = og.AttributeValueHelper(self._attributes.out)
data_view.set(value)
self.out_size = data_view.get_array_size()
@property
def tubePointStarts(self):
data_view = og.AttributeValueHelper(self._attributes.tubePointStarts)
return data_view.get()
@tubePointStarts.setter
def tubePointStarts(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.tubePointStarts)
data_view = og.AttributeValueHelper(self._attributes.tubePointStarts)
data_view.set(value)
self.tubePointStarts_size = data_view.get_array_size()
@property
def up(self):
data_view = og.AttributeValueHelper(self._attributes.up)
return data_view.get()
@up.setter
def up(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.up)
data_view = og.AttributeValueHelper(self._attributes.up)
data_view.set(value)
self.up_size = data_view.get_array_size()
@property
def width(self):
data_view = og.AttributeValueHelper(self._attributes.width)
return data_view.get()
@width.setter
def width(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.width)
data_view = og.AttributeValueHelper(self._attributes.width)
data_view.set(value)
self.width_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.points_size = None
self._batchedWriteValues = { }
@property
def points(self):
data_view = og.AttributeValueHelper(self._attributes.points)
return data_view.get(reserved_element_count=self.points_size)
@points.setter
def points(self, value):
data_view = og.AttributeValueHelper(self._attributes.points)
data_view.set(value)
self.points_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnCurveTubePositionsDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnCurveTubePositionsDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnCurveTubePositionsDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,775 | Python | 43.844036 | 135 | 0.633555 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnExtractPrimDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ExtractPrim
Extract a child bundle that contains a primitive with requested path/prim. This node is designed to work with Multiple Primitives
in a Bundle. It searches for a child bundle in the input bundle, with 'sourcePrimPath' that matches 'inputs:prim' or 'inputs:primPath'.
The found child bundle will be provided to 'outputs_primBundle', or invalid, bundle otherwise.
"""
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnExtractPrimDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ExtractPrim
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.prim
inputs.primPath
inputs.prims
Outputs:
outputs.primBundle
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:prim', 'target', 0, None, 'The prim to be extracted from Multiple Primitives in Bundle.', {}, True, [], False, ''),
('inputs:primPath', 'path', 0, 'Prim Path', 'The path of the prim to be extracted from Multiple Primitives in Bundle.', {}, True, "", True, 'Use prim input instead'),
('inputs:prims', 'bundle', 0, 'Prims Bundle', 'The Multiple Primitives in Bundle to extract from.', {}, True, None, False, ''),
('outputs:primBundle', 'bundle', 0, None, 'The extracted Single Primitive in Bundle', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.prim = og.AttributeRole.TARGET
role_data.inputs.primPath = og.AttributeRole.PATH
role_data.inputs.prims = og.AttributeRole.BUNDLE
role_data.outputs.primBundle = og.AttributeRole.BUNDLE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
return data_view.get()
@prim.setter
def prim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prim)
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
@property
def primPath(self):
data_view = og.AttributeValueHelper(self._attributes.primPath)
return data_view.get()
@primPath.setter
def primPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.primPath)
data_view = og.AttributeValueHelper(self._attributes.primPath)
data_view.set(value)
self.primPath_size = data_view.get_array_size()
@property
def prims(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.prims"""
return self.__bundles.prims
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def primBundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.primBundle"""
return self.__bundles.primBundle
@primBundle.setter
def primBundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.primBundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.primBundle.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnExtractPrimDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnExtractPrimDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnExtractPrimDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,389 | Python | 48.266666 | 174 | 0.665855 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnBooleanExprDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.BooleanExpr
NOTE: DEPRECATED AS OF 1.26.0 IN FAVOUR OF INDIVIDAL BOOLEAN OP NODES Boolean operation on two inputs. The supported operations
are:
AND, OR, NAND, NOR, XOR, XNOR
"""
import sys
import traceback
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnBooleanExprDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.BooleanExpr
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.a
inputs.b
inputs.operator
Outputs:
outputs.result
Predefined Tokens:
tokens.AND
tokens.OR
tokens.NAND
tokens.NOR
tokens.XOR
tokens.XNOR
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:a', 'bool', 0, None, 'Input A', {}, True, False, False, ''),
('inputs:b', 'bool', 0, None, 'Input B', {}, True, False, False, ''),
('inputs:operator', 'token', 0, 'Operator', 'The boolean operation to perform (AND, OR, NAND, NOR, XOR, XNOR)', {ogn.MetadataKeys.ALLOWED_TOKENS: 'AND,OR,NAND,NOR,XOR,XNOR', ogn.MetadataKeys.ALLOWED_TOKENS_RAW: '{"AND": "AND", "OR": "OR", "NAND": "NAND", "NOR": "NOR", "XOR": "XOR", "XNOR": "XNOR"}', ogn.MetadataKeys.DEFAULT: '"AND"'}, True, "AND", False, ''),
('outputs:result', 'bool', 0, 'Result', 'The result of the boolean expression', {}, True, None, False, ''),
])
class tokens:
AND = "AND"
OR = "OR"
NAND = "NAND"
NOR = "NOR"
XOR = "XOR"
XNOR = "XNOR"
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = {"a", "b", "operator", "_setting_locked", "_batchedReadAttributes", "_batchedReadValues"}
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = [self._attributes.a, self._attributes.b, self._attributes.operator]
self._batchedReadValues = [False, False, "AND"]
@property
def a(self):
return self._batchedReadValues[0]
@a.setter
def a(self, value):
self._batchedReadValues[0] = value
@property
def b(self):
return self._batchedReadValues[1]
@b.setter
def b(self, value):
self._batchedReadValues[1] = value
@property
def operator(self):
return self._batchedReadValues[2]
@operator.setter
def operator(self, value):
self._batchedReadValues[2] = value
def __getattr__(self, item: str):
if item in self.LOCAL_PROPERTY_NAMES:
return object.__getattribute__(self, item)
else:
return super().__getattr__(item)
def __setattr__(self, item: str, new_value):
if item in self.LOCAL_PROPERTY_NAMES:
object.__setattr__(self, item, new_value)
else:
super().__setattr__(item, new_value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = {"result", "_batchedWriteValues"}
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def result(self):
value = self._batchedWriteValues.get(self._attributes.result)
if value:
return value
else:
data_view = og.AttributeValueHelper(self._attributes.result)
return data_view.get()
@result.setter
def result(self, value):
self._batchedWriteValues[self._attributes.result] = value
def __getattr__(self, item: str):
if item in self.LOCAL_PROPERTY_NAMES:
return object.__getattribute__(self, item)
else:
return super().__getattr__(item)
def __setattr__(self, item: str, new_value):
if item in self.LOCAL_PROPERTY_NAMES:
object.__setattr__(self, item, new_value)
else:
super().__setattr__(item, new_value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnBooleanExprDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnBooleanExprDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnBooleanExprDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
class abi:
"""Class defining the ABI interface for the node type"""
@staticmethod
def get_node_type():
get_node_type_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'get_node_type', None)
if callable(get_node_type_function):
return get_node_type_function()
return 'omni.graph.nodes.BooleanExpr'
@staticmethod
def compute(context, node):
def database_valid():
return True
try:
per_node_data = OgnBooleanExprDatabase.PER_NODE_DATA[node.node_id()]
db = per_node_data.get('_db')
if db is None:
db = OgnBooleanExprDatabase(node)
per_node_data['_db'] = db
if not database_valid():
per_node_data['_db'] = None
return False
except:
db = OgnBooleanExprDatabase(node)
try:
compute_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'compute', None)
if callable(compute_function) and compute_function.__code__.co_argcount > 1:
return compute_function(context, node)
db.inputs._prefetch()
db.inputs._setting_locked = True
with og.in_compute():
return OgnBooleanExprDatabase.NODE_TYPE_CLASS.compute(db)
except Exception as error:
stack_trace = "".join(traceback.format_tb(sys.exc_info()[2].tb_next))
db.log_error(f'Assertion raised in compute - {error}\n{stack_trace}', add_context=False)
finally:
db.inputs._setting_locked = False
db.outputs._commit()
return False
@staticmethod
def initialize(context, node):
OgnBooleanExprDatabase._initialize_per_node_data(node)
initialize_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'initialize', None)
if callable(initialize_function):
initialize_function(context, node)
per_node_data = OgnBooleanExprDatabase.PER_NODE_DATA[node.node_id()]
def on_connection_or_disconnection(*args):
per_node_data['_db'] = None
node.register_on_connected_callback(on_connection_or_disconnection)
node.register_on_disconnected_callback(on_connection_or_disconnection)
@staticmethod
def release(node):
release_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'release', None)
if callable(release_function):
release_function(node)
OgnBooleanExprDatabase._release_per_node_data(node)
@staticmethod
def release_instance(node, target):
OgnBooleanExprDatabase._release_per_node_instance_data(node, target)
@staticmethod
def update_node_version(context, node, old_version, new_version):
update_node_version_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'update_node_version', None)
if callable(update_node_version_function):
return update_node_version_function(context, node, old_version, new_version)
return False
@staticmethod
def initialize_type(node_type):
initialize_type_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'initialize_type', None)
needs_initializing = True
if callable(initialize_type_function):
needs_initializing = initialize_type_function(node_type)
if needs_initializing:
node_type.set_metadata(ogn.MetadataKeys.EXTENSION, "omni.graph.nodes")
node_type.set_metadata(ogn.MetadataKeys.HIDDEN, "true")
node_type.set_metadata(ogn.MetadataKeys.UI_NAME, "Boolean Expression")
node_type.set_metadata(ogn.MetadataKeys.CATEGORIES, "math:operator")
node_type.set_metadata(ogn.MetadataKeys.DESCRIPTION, "NOTE: DEPRECATED AS OF 1.26.0 IN FAVOUR OF INDIVIDAL BOOLEAN OP NODES Boolean operation on two inputs. The supported operations are:\n AND, OR, NAND, NOR, XOR, XNOR")
node_type.set_metadata(ogn.MetadataKeys.LANGUAGE, "Python")
OgnBooleanExprDatabase.INTERFACE.add_to_node_type(node_type)
@staticmethod
def on_connection_type_resolve(node):
on_connection_type_resolve_function = getattr(OgnBooleanExprDatabase.NODE_TYPE_CLASS, 'on_connection_type_resolve', None)
if callable(on_connection_type_resolve_function):
on_connection_type_resolve_function(node)
NODE_TYPE_CLASS = None
@staticmethod
def register(node_type_class):
OgnBooleanExprDatabase.NODE_TYPE_CLASS = node_type_class
og.register_node_type(OgnBooleanExprDatabase.abi, 1)
@staticmethod
def deregister():
og.deregister_node_type("omni.graph.nodes.BooleanExpr")
| 12,296 | Python | 43.075269 | 369 | 0.62069 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnWritePrimsDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.WritePrims
DEPRECATED - use WritePrimsV2!
"""
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnWritePrimsDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.WritePrims
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.attrNamesToExport
inputs.execIn
inputs.pathPattern
inputs.primsBundle
inputs.typePattern
inputs.usdWriteBack
Outputs:
outputs.execOut
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:attrNamesToExport', 'string', 0, 'Attribute Name Pattern', "A list of wildcard patterns used to match primitive attributes by name.\n\nSupported syntax of wildcard pattern:\n `*` - match an arbitrary number of any characters\n `?` - match any single character\n `^` - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['xFormOp:translate', 'xformOp:scale','radius']\n '*' - match any\n 'xformOp:*' - matches 'xFormOp:translate' and 'xformOp:scale'\n '* ^radius' - match any, but exclude 'radius'\n '* ^xformOp*' - match any, but exclude 'xFormOp:translate', 'xformOp:scale'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:execIn', 'execution', 0, None, 'The input execution (for action graphs only)', {}, True, None, False, ''),
('inputs:pathPattern', 'string', 0, 'Prim Path Pattern', "A list of wildcard patterns used to match primitives by path.\n\nSupported syntax of wildcard pattern:\n `*` - match an arbitrary number of any characters\n `?` - match any single character\n `^` - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box']\n '*' - match any\n '* ^/Box' - match any, but exclude '/Box'\n '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:primsBundle', 'bundle', 0, 'Prims Bundle', 'The bundle(s) of multiple prims to be written back.\nThe sourcePrimPath attribute is used to find the destination prim.', {ogn.MetadataKeys.ALLOW_MULTI_INPUTS: '1'}, True, None, False, ''),
('inputs:typePattern', 'string', 0, 'Prim Type Pattern', "A list of wildcard patterns used to match primitives by type.\n\nSupported syntax of wildcard pattern:\n `*` - match an arbitrary number of any characters\n `?` - match any single character\n `^` - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['Mesh', 'Cone', 'Cube']\n '*' - match any\n '* ^Mesh' - match any, but exclude 'Mesh'\n '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:usdWriteBack', 'bool', 0, 'Persist To USD', 'Whether or not the value should be written back to USD, or kept a Fabric only value', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:execOut', 'execution', 0, None, 'The output execution port (for action graphs only)', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.attrNamesToExport = og.AttributeRole.TEXT
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.inputs.pathPattern = og.AttributeRole.TEXT
role_data.inputs.primsBundle = og.AttributeRole.BUNDLE
role_data.inputs.typePattern = og.AttributeRole.TEXT
role_data.outputs.execOut = og.AttributeRole.EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def attrNamesToExport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToExport)
return data_view.get()
@attrNamesToExport.setter
def attrNamesToExport(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.attrNamesToExport)
data_view = og.AttributeValueHelper(self._attributes.attrNamesToExport)
data_view.set(value)
self.attrNamesToExport_size = data_view.get_array_size()
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def pathPattern(self):
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
return data_view.get()
@pathPattern.setter
def pathPattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.pathPattern)
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
data_view.set(value)
self.pathPattern_size = data_view.get_array_size()
@property
def primsBundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.primsBundle"""
return self.__bundles.primsBundle
@property
def typePattern(self):
data_view = og.AttributeValueHelper(self._attributes.typePattern)
return data_view.get()
@typePattern.setter
def typePattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.typePattern)
data_view = og.AttributeValueHelper(self._attributes.typePattern)
data_view.set(value)
self.typePattern_size = data_view.get_array_size()
@property
def usdWriteBack(self):
data_view = og.AttributeValueHelper(self._attributes.usdWriteBack)
return data_view.get()
@usdWriteBack.setter
def usdWriteBack(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usdWriteBack)
data_view = og.AttributeValueHelper(self._attributes.usdWriteBack)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def execOut(self):
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
data_view = og.AttributeValueHelper(self._attributes.execOut)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnWritePrimsDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnWritePrimsDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnWritePrimsDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 10,478 | Python | 54.444444 | 720 | 0.657091 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnSelectIfDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.SelectIf
Selects an output from the given inputs based on a boolean condition. If the condition is an array, and the inputs are arrays
of equal length, and values will be selected from ifTrue, ifFalse depending on the bool at the same index. If one input is
an array and the other is a scaler of the same base type, the scaler will be extended to the length of the other input.
"""
from typing import Any
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnSelectIfDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.SelectIf
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.condition
inputs.ifFalse
inputs.ifTrue
Outputs:
outputs.result
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:condition', 'bool,bool[]', 1, None, 'The selection variable', {}, True, None, False, ''),
('inputs:ifFalse', 'any', 2, 'If False', 'Value if condition is False', {}, True, None, False, ''),
('inputs:ifTrue', 'any', 2, 'If True', 'Value if condition is True', {}, True, None, False, ''),
('outputs:result', 'any', 2, 'Result', 'The selected value from ifTrue and ifFalse', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def condition(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.condition"""
return og.RuntimeAttribute(self._attributes.condition.get_attribute_data(), self._context, True)
@condition.setter
def condition(self, value_to_set: Any):
"""Assign another attribute's value to outputs.condition"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.condition.value = value_to_set.value
else:
self.condition.value = value_to_set
@property
def ifFalse(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.ifFalse"""
return og.RuntimeAttribute(self._attributes.ifFalse.get_attribute_data(), self._context, True)
@ifFalse.setter
def ifFalse(self, value_to_set: Any):
"""Assign another attribute's value to outputs.ifFalse"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.ifFalse.value = value_to_set.value
else:
self.ifFalse.value = value_to_set
@property
def ifTrue(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.ifTrue"""
return og.RuntimeAttribute(self._attributes.ifTrue.get_attribute_data(), self._context, True)
@ifTrue.setter
def ifTrue(self, value_to_set: Any):
"""Assign another attribute's value to outputs.ifTrue"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.ifTrue.value = value_to_set.value
else:
self.ifTrue.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def result(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.result"""
return og.RuntimeAttribute(self._attributes.result.get_attribute_data(), self._context, False)
@result.setter
def result(self, value_to_set: Any):
"""Assign another attribute's value to outputs.result"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.result.value = value_to_set.value
else:
self.result.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnSelectIfDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnSelectIfDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnSelectIfDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,214 | Python | 48.081632 | 125 | 0.657749 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnEaseDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.Ease
Easing function which iterpolates between a start and end value. Vectors are eased component-wise. The easing functions can
be applied to decimal types. Linear: Interpolates between start and finish at a fixed rate. EaseIn: Starts slowly and ends
fast according to an exponential, the slope is determined by the 'exponent' input. EaseOut: Same as EaseIn, but starts fast
and ends slow EaseInOut: Combines EaseIn and EaseOut SinIn: Starts slowly and ends fast according to a sinusoidal curve SinOut:
Same as SinIn, but starts fast and ends slow SinInOut: Combines SinIn and SinOut
"""
from typing import Any
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnEaseDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.Ease
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.alpha
inputs.blendExponent
inputs.easeFunc
inputs.end
inputs.start
Outputs:
outputs.result
Predefined Tokens:
tokens.EaseIn
tokens.EaseOut
tokens.EaseInOut
tokens.Linear
tokens.SinIn
tokens.SinOut
tokens.SinInOut
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:alpha', 'float,float[]', 1, None, 'The normalized time (0 - 1.0). Values outside this range will be clamped', {}, True, None, False, ''),
('inputs:blendExponent', 'int', 0, None, 'The blend exponent, which is the degree of the ease curve\n (1 = linear, 2 = quadratic, 3 = cubic, etc). \nThis only applies to the Ease* functions', {ogn.MetadataKeys.DEFAULT: '2'}, True, 2, False, ''),
('inputs:easeFunc', 'token', 0, 'Operation', 'The easing function to apply (EaseIn, EaseOut, EaseInOut, Linear, SinIn, SinOut, SinInOut)', {ogn.MetadataKeys.ALLOWED_TOKENS: 'EaseIn,EaseOut,EaseInOut,Linear,SinIn,SinOut,SinInOut', ogn.MetadataKeys.ALLOWED_TOKENS_RAW: '["EaseIn", "EaseOut", "EaseInOut", "Linear", "SinIn", "SinOut", "SinInOut"]', ogn.MetadataKeys.DEFAULT: '"EaseInOut"'}, True, "EaseInOut", False, ''),
('inputs:end', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The end value', {}, True, None, False, ''),
('inputs:start', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The start value', {}, True, None, False, ''),
('outputs:result', 'colord[3],colord[3][],colord[4],colord[4][],colorf[3],colorf[3][],colorf[4],colorf[4][],colorh[3],colorh[3][],colorh[4],colorh[4][],double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[],float,float[2],float[2][],float[3],float[3][],float[4],float[4][],float[],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],normald[3],normald[3][],normalf[3],normalf[3][],normalh[3],normalh[3][],pointd[3],pointd[3][],pointf[3],pointf[3][],pointh[3],pointh[3][],quatd[4],quatd[4][],quatf[4],quatf[4][],quath[4],quath[4][],texcoordd[2],texcoordd[2][],texcoordd[3],texcoordd[3][],texcoordf[2],texcoordf[2][],texcoordf[3],texcoordf[3][],texcoordh[2],texcoordh[2][],texcoordh[3],texcoordh[3][],timecode,timecode[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'Result', 'The eased result of the function applied to value', {}, True, None, False, ''),
])
class tokens:
EaseIn = "EaseIn"
EaseOut = "EaseOut"
EaseInOut = "EaseInOut"
Linear = "Linear"
SinIn = "SinIn"
SinOut = "SinOut"
SinInOut = "SinInOut"
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def alpha(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.alpha"""
return og.RuntimeAttribute(self._attributes.alpha.get_attribute_data(), self._context, True)
@alpha.setter
def alpha(self, value_to_set: Any):
"""Assign another attribute's value to outputs.alpha"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.alpha.value = value_to_set.value
else:
self.alpha.value = value_to_set
@property
def blendExponent(self):
data_view = og.AttributeValueHelper(self._attributes.blendExponent)
return data_view.get()
@blendExponent.setter
def blendExponent(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.blendExponent)
data_view = og.AttributeValueHelper(self._attributes.blendExponent)
data_view.set(value)
@property
def easeFunc(self):
data_view = og.AttributeValueHelper(self._attributes.easeFunc)
return data_view.get()
@easeFunc.setter
def easeFunc(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.easeFunc)
data_view = og.AttributeValueHelper(self._attributes.easeFunc)
data_view.set(value)
@property
def end(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.end"""
return og.RuntimeAttribute(self._attributes.end.get_attribute_data(), self._context, True)
@end.setter
def end(self, value_to_set: Any):
"""Assign another attribute's value to outputs.end"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.end.value = value_to_set.value
else:
self.end.value = value_to_set
@property
def start(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.start"""
return og.RuntimeAttribute(self._attributes.start.get_attribute_data(), self._context, True)
@start.setter
def start(self, value_to_set: Any):
"""Assign another attribute's value to outputs.start"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.start.value = value_to_set.value
else:
self.start.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def result(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute outputs.result"""
return og.RuntimeAttribute(self._attributes.result.get_attribute_data(), self._context, False)
@result.setter
def result(self, value_to_set: Any):
"""Assign another attribute's value to outputs.result"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.result.value = value_to_set.value
else:
self.result.value = value_to_set
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnEaseDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnEaseDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnEaseDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 11,770 | Python | 59.675257 | 935 | 0.650382 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConcatenateFloat3ArraysDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ConcatenateFloat3Arrays
Flatten the array of float3 arrays in 'inputArrays' by concatenating all of the array contents into a single float3 array
in 'outputArray'. The sizes of each of the input arrays is preserved in the output 'arraySizes'.
"""
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
import numpy
from typing import Any
class OgnConcatenateFloat3ArraysDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConcatenateFloat3Arrays
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.inputArrays
Outputs:
outputs.arraySizes
outputs.outputArray
"""
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:inputArrays', 'any', 2, None, 'Array of arrays of float3 values to be flattened', {}, True, None, False, ''),
('outputs:arraySizes', 'int[]', 0, None, 'List of sizes of each of the float3 input arrays', {}, True, None, False, ''),
('outputs:outputArray', 'float3[]', 0, None, 'Flattened array of float3 values', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def inputArrays(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.inputArrays"""
return og.RuntimeAttribute(self._attributes.inputArrays.get_attribute_data(), self._context, True)
@inputArrays.setter
def inputArrays(self, value_to_set: Any):
"""Assign another attribute's value to outputs.inputArrays"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.inputArrays.value = value_to_set.value
else:
self.inputArrays.value = value_to_set
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.arraySizes_size = None
self.outputArray_size = None
self._batchedWriteValues = { }
@property
def arraySizes(self):
data_view = og.AttributeValueHelper(self._attributes.arraySizes)
return data_view.get(reserved_element_count=self.arraySizes_size)
@arraySizes.setter
def arraySizes(self, value):
data_view = og.AttributeValueHelper(self._attributes.arraySizes)
data_view.set(value)
self.arraySizes_size = data_view.get_array_size()
@property
def outputArray(self):
data_view = og.AttributeValueHelper(self._attributes.outputArray)
return data_view.get(reserved_element_count=self.outputArray_size)
@outputArray.setter
def outputArray(self, value):
data_view = og.AttributeValueHelper(self._attributes.outputArray)
data_view.set(value)
self.outputArray_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnConcatenateFloat3ArraysDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnConcatenateFloat3ArraysDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnConcatenateFloat3ArraysDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 6,159 | Python | 52.565217 | 128 | 0.67722 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetPrimRelationshipDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.GetPrimRelationship
DEPRECATED - Use ReadPrimRelationship!
"""
import numpy
import usdrt
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnGetPrimRelationshipDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetPrimRelationship
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.name
inputs.path
inputs.prim
inputs.usePath
Outputs:
outputs.paths
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:name', 'token', 0, 'Relationship Name', 'Name of the relationship property', {}, True, "", False, ''),
('inputs:path', 'token', 0, 'Prim Path', 'Path of the prim with the relationship property', {}, False, None, True, 'Use prim input with a GetPrimsAtPath node instead'),
('inputs:prim', 'target', 0, None, 'The prim with the relationship', {}, False, [], False, ''),
('inputs:usePath', 'bool', 0, None, "When true, the 'path' attribute is used, otherwise it will read the connection at the 'prim' attribute.", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, True, 'Use prim input with a GetPrimsAtPath node instead'),
('outputs:paths', 'token[]', 0, 'Paths', 'The prim paths for the given relationship', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.prim = og.AttributeRole.TARGET
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def name(self):
data_view = og.AttributeValueHelper(self._attributes.name)
return data_view.get()
@name.setter
def name(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.name)
data_view = og.AttributeValueHelper(self._attributes.name)
data_view.set(value)
@property
def path(self):
data_view = og.AttributeValueHelper(self._attributes.path)
return data_view.get()
@path.setter
def path(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.path)
data_view = og.AttributeValueHelper(self._attributes.path)
data_view.set(value)
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
return data_view.get()
@prim.setter
def prim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prim)
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
@property
def usePath(self):
data_view = og.AttributeValueHelper(self._attributes.usePath)
return data_view.get()
@usePath.setter
def usePath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usePath)
data_view = og.AttributeValueHelper(self._attributes.usePath)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.paths_size = None
self._batchedWriteValues = { }
@property
def paths(self):
data_view = og.AttributeValueHelper(self._attributes.paths)
return data_view.get(reserved_element_count=self.paths_size)
@paths.setter
def paths(self, value):
data_view = og.AttributeValueHelper(self._attributes.paths)
data_view.set(value)
self.paths_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnGetPrimRelationshipDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnGetPrimRelationshipDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnGetPrimRelationshipDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,365 | Python | 44.190184 | 260 | 0.650373 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadTimeDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ReadTime
Holds the values related to the current global time and the timeline
"""
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadTimeDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ReadTime
Class Members:
node: Node being evaluated
Attribute Value Properties:
Outputs:
outputs.absoluteSimTime
outputs.deltaSeconds
outputs.frame
outputs.isPlaying
outputs.time
outputs.timeSinceStart
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('outputs:absoluteSimTime', 'double', 0, 'Absolute Simulation Time (Seconds)', 'The accumulated total of elapsed times between rendered frames', {}, True, None, False, ''),
('outputs:deltaSeconds', 'double', 0, 'Delta (Seconds)', 'The number of seconds elapsed since the last OmniGraph update', {}, True, None, False, ''),
('outputs:frame', 'double', 0, 'Animation Time (Frames)', 'The global animation time in frames, equivalent to (time * fps), during playback', {}, True, None, False, ''),
('outputs:isPlaying', 'bool', 0, 'Is Playing', 'True during global animation timeline playback', {}, True, None, False, ''),
('outputs:time', 'double', 0, 'Animation Time (Seconds)', 'The global animation time in seconds during playback', {}, True, None, False, ''),
('outputs:timeSinceStart', 'double', 0, 'Time Since Start (Seconds)', 'Elapsed time since the App started', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def absoluteSimTime(self):
data_view = og.AttributeValueHelper(self._attributes.absoluteSimTime)
return data_view.get()
@absoluteSimTime.setter
def absoluteSimTime(self, value):
data_view = og.AttributeValueHelper(self._attributes.absoluteSimTime)
data_view.set(value)
@property
def deltaSeconds(self):
data_view = og.AttributeValueHelper(self._attributes.deltaSeconds)
return data_view.get()
@deltaSeconds.setter
def deltaSeconds(self, value):
data_view = og.AttributeValueHelper(self._attributes.deltaSeconds)
data_view.set(value)
@property
def frame(self):
data_view = og.AttributeValueHelper(self._attributes.frame)
return data_view.get()
@frame.setter
def frame(self, value):
data_view = og.AttributeValueHelper(self._attributes.frame)
data_view.set(value)
@property
def isPlaying(self):
data_view = og.AttributeValueHelper(self._attributes.isPlaying)
return data_view.get()
@isPlaying.setter
def isPlaying(self, value):
data_view = og.AttributeValueHelper(self._attributes.isPlaying)
data_view.set(value)
@property
def time(self):
data_view = og.AttributeValueHelper(self._attributes.time)
return data_view.get()
@time.setter
def time(self, value):
data_view = og.AttributeValueHelper(self._attributes.time)
data_view.set(value)
@property
def timeSinceStart(self):
data_view = og.AttributeValueHelper(self._attributes.timeSinceStart)
return data_view.get()
@timeSinceStart.setter
def timeSinceStart(self, value):
data_view = og.AttributeValueHelper(self._attributes.timeSinceStart)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadTimeDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadTimeDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadTimeDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,115 | Python | 45.207792 | 180 | 0.65889 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnRpResourceExampleAllocatorDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.RpResourceExampleAllocator
Allocate CUDA-interoperable RpResource
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnRpResourceExampleAllocatorDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.RpResourceExampleAllocator
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.points
inputs.primPath
inputs.reload
inputs.stream
inputs.verbose
Outputs:
outputs.pointCountCollection
outputs.primPathCollection
outputs.reload
outputs.resourcePointerCollection
outputs.stream
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:points', 'float3[]', 0, 'Prim Points', 'Points attribute input. Points and a prim path may be supplied directly as an alternative to a bundle input.', {}, True, [], False, ''),
('inputs:primPath', 'token', 0, 'Prim path input', 'Prim path input. Points and a prim path may be supplied directly as an alternative to a bundle input.', {}, True, "", False, ''),
('inputs:reload', 'bool', 0, 'Reload', 'Force RpResource reload', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:stream', 'uint64', 0, 'stream', 'Pointer to the CUDA Stream', {}, True, 0, False, ''),
('inputs:verbose', 'bool', 0, 'Verbose', 'verbose printing', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:pointCountCollection', 'uint64[]', 0, 'Point Counts', 'Point count for each prim being deformed', {}, True, None, False, ''),
('outputs:primPathCollection', 'token[]', 0, 'Prim Paths', 'Path for each prim being deformed', {}, True, None, False, ''),
('outputs:reload', 'bool', 0, 'Reload', 'Force RpResource reload', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('outputs:resourcePointerCollection', 'uint64[]', 0, 'Resource Pointer Collection', 'Pointers to RpResources \n(two resources per prim are allocated -- one for rest positions and one for deformed positions)', {}, True, None, False, ''),
('outputs:stream', 'uint64', 0, 'stream', 'Pointer to the CUDA Stream', {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def points(self):
data_view = og.AttributeValueHelper(self._attributes.points)
return data_view.get()
@points.setter
def points(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.points)
data_view = og.AttributeValueHelper(self._attributes.points)
data_view.set(value)
self.points_size = data_view.get_array_size()
@property
def primPath(self):
data_view = og.AttributeValueHelper(self._attributes.primPath)
return data_view.get()
@primPath.setter
def primPath(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.primPath)
data_view = og.AttributeValueHelper(self._attributes.primPath)
data_view.set(value)
@property
def reload(self):
data_view = og.AttributeValueHelper(self._attributes.reload)
return data_view.get()
@reload.setter
def reload(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.reload)
data_view = og.AttributeValueHelper(self._attributes.reload)
data_view.set(value)
@property
def stream(self):
data_view = og.AttributeValueHelper(self._attributes.stream)
return data_view.get()
@stream.setter
def stream(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.stream)
data_view = og.AttributeValueHelper(self._attributes.stream)
data_view.set(value)
@property
def verbose(self):
data_view = og.AttributeValueHelper(self._attributes.verbose)
return data_view.get()
@verbose.setter
def verbose(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.verbose)
data_view = og.AttributeValueHelper(self._attributes.verbose)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.pointCountCollection_size = None
self.primPathCollection_size = None
self.resourcePointerCollection_size = None
self._batchedWriteValues = { }
@property
def pointCountCollection(self):
data_view = og.AttributeValueHelper(self._attributes.pointCountCollection)
return data_view.get(reserved_element_count=self.pointCountCollection_size)
@pointCountCollection.setter
def pointCountCollection(self, value):
data_view = og.AttributeValueHelper(self._attributes.pointCountCollection)
data_view.set(value)
self.pointCountCollection_size = data_view.get_array_size()
@property
def primPathCollection(self):
data_view = og.AttributeValueHelper(self._attributes.primPathCollection)
return data_view.get(reserved_element_count=self.primPathCollection_size)
@primPathCollection.setter
def primPathCollection(self, value):
data_view = og.AttributeValueHelper(self._attributes.primPathCollection)
data_view.set(value)
self.primPathCollection_size = data_view.get_array_size()
@property
def reload(self):
data_view = og.AttributeValueHelper(self._attributes.reload)
return data_view.get()
@reload.setter
def reload(self, value):
data_view = og.AttributeValueHelper(self._attributes.reload)
data_view.set(value)
@property
def resourcePointerCollection(self):
data_view = og.AttributeValueHelper(self._attributes.resourcePointerCollection)
return data_view.get(reserved_element_count=self.resourcePointerCollection_size)
@resourcePointerCollection.setter
def resourcePointerCollection(self, value):
data_view = og.AttributeValueHelper(self._attributes.resourcePointerCollection)
data_view.set(value)
self.resourcePointerCollection_size = data_view.get_array_size()
@property
def stream(self):
data_view = og.AttributeValueHelper(self._attributes.stream)
return data_view.get()
@stream.setter
def stream(self, value):
data_view = og.AttributeValueHelper(self._attributes.stream)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnRpResourceExampleAllocatorDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnRpResourceExampleAllocatorDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnRpResourceExampleAllocatorDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 10,416 | Python | 46.135746 | 244 | 0.65313 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnInsertAttrDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.InsertAttribute
Copies all attributes from an input bundle to the output bundle, as well as copying an additional 'attrToInsert' attribute
from the node itself with a specified name.
"""
from typing import Any
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnInsertAttrDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.InsertAttribute
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.attrToInsert
inputs.data
inputs.outputAttrName
Outputs:
outputs.data
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:attrToInsert', 'any', 2, 'Attribute To Insert', 'The the attribute to be copied from the node to the output bundle', {}, True, None, False, ''),
('inputs:data', 'bundle', 0, 'Original Bundle', 'Initial bundle of attributes', {}, True, None, False, ''),
('inputs:outputAttrName', 'token', 0, 'Attribute Name', 'The name of the new output attribute in the bundle', {ogn.MetadataKeys.DEFAULT: '"attr0"'}, True, "attr0", False, ''),
('outputs:data', 'bundle', 0, 'Bundle With Inserted Attribute', 'Bundle of input attributes with the new one inserted with the specified name', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.data = og.AttributeRole.BUNDLE
role_data.outputs.data = og.AttributeRole.BUNDLE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def attrToInsert(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.attrToInsert"""
return og.RuntimeAttribute(self._attributes.attrToInsert.get_attribute_data(), self._context, True)
@attrToInsert.setter
def attrToInsert(self, value_to_set: Any):
"""Assign another attribute's value to outputs.attrToInsert"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.attrToInsert.value = value_to_set.value
else:
self.attrToInsert.value = value_to_set
@property
def data(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute inputs.data"""
return self.__bundles.data
@property
def outputAttrName(self):
data_view = og.AttributeValueHelper(self._attributes.outputAttrName)
return data_view.get()
@outputAttrName.setter
def outputAttrName(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.outputAttrName)
data_view = og.AttributeValueHelper(self._attributes.outputAttrName)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def data(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.data"""
return self.__bundles.data
@data.setter
def data(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.data with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.data.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnInsertAttrDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnInsertAttrDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnInsertAttrDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,265 | Python | 48.767123 | 183 | 0.667447 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnSetGatheredAttributeDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.SetGatheredAttribute
Writes a value into the given Gathered attribute. If the number elements of the value is less than the gathered attribute,
the value will be broadcast to all prims. If the given value has more elements than the gathered attribute, an error will
be produced. PROTOTYPE DO NOT USE, Requires GatherPrototype
"""
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
import numpy
from typing import Any
class OgnSetGatheredAttributeDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.SetGatheredAttribute
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.gatherId
inputs.mask
inputs.name
inputs.value
Outputs:
outputs.execOut
"""
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, None, 'Input execution state', {}, True, None, False, ''),
('inputs:gatherId', 'uint64', 0, None, 'The GatherId of the gathered prims', {}, True, 0, False, ''),
('inputs:mask', 'bool[]', 0, None, 'Only writes values to the indexes which are true.', {}, False, None, False, ''),
('inputs:name', 'token', 0, None, 'The name of the attribute to set in the given Gather', {}, True, '', False, ''),
('inputs:value', 'any', 2, None, 'The new value to be written to the gathered attributes', {}, True, None, False, ''),
('outputs:execOut', 'execution', 0, None, 'Output execution', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.Database.ROLE_EXECUTION
role_data.outputs.execOut = og.Database.ROLE_EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = {"execIn", "gatherId", "name", "_setting_locked", "_batchedReadAttributes", "_batchedReadValues"}
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = [self._attributes.execIn, self._attributes.gatherId, self._attributes.name]
self._batchedReadValues = [None, 0, ""]
@property
def mask(self):
data_view = og.AttributeValueHelper(self._attributes.mask)
return data_view.get()
@mask.setter
def mask(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.mask)
data_view = og.AttributeValueHelper(self._attributes.mask)
data_view.set(value)
self.mask_size = data_view.get_array_size()
@property
def value(self) -> og.RuntimeAttribute:
"""Get the runtime wrapper class for the attribute inputs.value"""
return og.RuntimeAttribute(self._attributes.value.get_attribute_data(), self._context, True)
@value.setter
def value(self, value_to_set: Any):
"""Assign another attribute's value to outputs.value"""
if isinstance(value_to_set, og.RuntimeAttribute):
self.value.value = value_to_set.value
else:
self.value.value = value_to_set
@property
def execIn(self):
return self._batchedReadValues[0]
@execIn.setter
def execIn(self, value):
self._batchedReadValues[0] = value
@property
def gatherId(self):
return self._batchedReadValues[1]
@gatherId.setter
def gatherId(self, value):
self._batchedReadValues[1] = value
@property
def name(self):
return self._batchedReadValues[2]
@name.setter
def name(self, value):
self._batchedReadValues[2] = value
def __getattr__(self, item: str):
if item in self.LOCAL_PROPERTY_NAMES:
return object.__getattribute__(self, item)
else:
return super().__getattr__(item)
def __setattr__(self, item: str, new_value):
if item in self.LOCAL_PROPERTY_NAMES:
object.__setattr__(self, item, new_value)
else:
super().__setattr__(item, new_value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = {"execOut", "_batchedWriteValues"}
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def execOut(self):
value = self._batchedWriteValues.get(self._attributes.execOut)
if value:
return value
else:
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
self._batchedWriteValues[self._attributes.execOut] = value
def __getattr__(self, item: str):
if item in self.LOCAL_PROPERTY_NAMES:
return object.__getattribute__(self, item)
else:
return super().__getattr__(item)
def __setattr__(self, item: str, new_value):
if item in self.LOCAL_PROPERTY_NAMES:
object.__setattr__(self, item, new_value)
else:
super().__setattr__(item, new_value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnSetGatheredAttributeDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnSetGatheredAttributeDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnSetGatheredAttributeDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 8,511 | Python | 46.553072 | 128 | 0.636118 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnReadPrimsV2Database.py | """Support for simplified access to data on nodes of type omni.graph.nodes.ReadPrimsV2
Reads primitives and outputs multiple primitive in a bundle.
"""
import usdrt
import carb
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnReadPrimsV2Database(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.ReadPrimsV2
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs._debugStamp
inputs.applySkelBinding
inputs.attrNamesToImport
inputs.computeBoundingBox
inputs.enableBundleChangeTracking
inputs.enableChangeTracking
inputs.pathPattern
inputs.prims
inputs.typePattern
inputs.usdTimecode
Outputs:
outputs.primsBundle
State:
state.applySkelBinding
state.attrNamesToImport
state.computeBoundingBox
state.enableBundleChangeTracking
state.enableChangeTracking
state.pathPattern
state.typePattern
state.usdTimecode
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:_debugStamp', 'int', 0, None, 'For internal testing only, and subject to change. Please do not depend on this attribute!\nWhen not zero, this _debugStamp attribute will be copied to root and child bundles that change\nWhen a full update is performed, the negative _debugStamp is written.\nWhen only derived attributes (like bounding boxes and world matrices) are updated, _debugStamp + 1000000 is written', {ogn.MetadataKeys.LITERAL_ONLY: '1', ogn.MetadataKeys.HIDDEN: 'true', ogn.MetadataKeys.DEFAULT: '0'}, True, 0, False, ''),
('inputs:applySkelBinding', 'bool', 0, 'Apply Skel Binding', 'If an input USD prim is skinnable and has the SkelBindingAPI schema applied, read skeletal data and apply SkelBinding to deform the prim.\nThe output bundle will have additional child bundles created to hold data for the skeleton and skel animation prims if present. After\nevaluation, deformed points and normals will be written to the `points` and `normals` attributes, while non-deformed points and normals\nwill be copied to the `points:default` and `normals:default` attributes.', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:attrNamesToImport', 'string', 0, 'Attribute Name Pattern', "A list of wildcard patterns used to match the attribute names that are to be imported\n\nSupported syntax of wildcard pattern:\n '*' - match an arbitrary number of any characters\n '?' - match any single character\n '^' - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['points', 'faceVertexCount', 'faceVertexIndices', 'size']\n '*' - match any\n '* ^points' - match any, but exclude 'points'\n '* ^face*' - match any, but exclude 'faceVertexCount' and 'faceVertexIndices'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:computeBoundingBox', 'bool', 0, 'Compute Bounding Box', "For each primitive compute local bounding box and store them as 'bboxMinCorner', 'bboxMaxCorner' and 'bboxTransform' attributes.", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:enableBundleChangeTracking', 'bool', 0, 'Bundle change tracking', 'Enable change tracking for output bundle, its children and attributes.\nThe change tracking system for bundles has some overhead, but enables\nusers to inspect the changes that occurred in a bundle.\nThrough inspecting the type of changes user can mitigate excessive computations.', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('inputs:enableChangeTracking', 'bool', 0, 'USD change tracking', 'Should the output bundles only be updated when the associated USD prims change?\nThis uses a USD notice handler, and has a small overhead,\nso if you know that the imported USD prims will change frequently,\nyou might want to disable this.', {ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
('inputs:pathPattern', 'string', 0, 'Prim Path Pattern', "A list of wildcard patterns used to match the prim paths that are to be imported\n\nSupported syntax of wildcard pattern:\n '*' - match an arbitrary number of any characters\n '?' - match any single character\n '^' - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['/Cube0', '/Cube1', '/Box']\n '*' - match any\n '* ^/Box' - match any, but exclude '/Box'\n '* ^/Cube*' - match any, but exclude '/Cube0' and '/Cube1'", {ogn.MetadataKeys.DEFAULT: '""'}, True, "", False, ''),
('inputs:prims', 'target', 0, 'Prims', 'The root prim(s) that pattern matching uses to search from.\nIf \'pathPattern\' input is empty, the directly connected prims will be read.\nOtherwise, all the subtree (including root) will be tested against pattern matcher inputs,\nand the matched prims will be read into the output bundle.\nIf no prims are connected, and \'pathPattern\' is none empty, absolute root "/" will be searched as root prim.', {ogn.MetadataKeys.ALLOW_MULTI_INPUTS: '1'}, True, [], False, ''),
('inputs:typePattern', 'string', 0, 'Prim Type Pattern', "A list of wildcard patterns used to match the prim types that are to be imported\n\nSupported syntax of wildcard pattern:\n '*' - match an arbitrary number of any characters\n '?' - match any single character\n '^' - (caret) is used to define a pattern that is to be excluded\n\nExample of wildcard patterns, input: ['Mesh', 'Cone', 'Cube']\n '*' - match any\n '* ^Mesh' - match any, but exclude 'Mesh'\n '* ^Cone ^Cube' - match any, but exclude 'Cone' and 'Cube'", {ogn.MetadataKeys.DEFAULT: '"*"'}, True, "*", False, ''),
('inputs:usdTimecode', 'timecode', 0, 'Time', 'The time at which to evaluate the transform of the USD prim. A value of "NaN" indicates that the default USD time stamp should be used', {ogn.MetadataKeys.DEFAULT: '"NaN"'}, True, float("NaN"), False, ''),
('outputs:primsBundle', 'bundle', 0, None, 'An output bundle containing multiple prims as children.\nEach child contains data attributes and two additional token attributes named sourcePrimPath and sourcePrimType\nwhich contains the path of the Prim being read', {}, True, None, False, ''),
('state:applySkelBinding', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:attrNamesToImport', 'string', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:computeBoundingBox', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:enableBundleChangeTracking', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:enableChangeTracking', 'bool', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:pathPattern', 'string', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:typePattern', 'string', 0, None, 'State from previous evaluation', {}, True, None, False, ''),
('state:usdTimecode', 'timecode', 0, None, 'State from previous evaluation', {ogn.MetadataKeys.DEFAULT: '-1'}, True, -1, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.attrNamesToImport = og.AttributeRole.TEXT
role_data.inputs.pathPattern = og.AttributeRole.TEXT
role_data.inputs.prims = og.AttributeRole.TARGET
role_data.inputs.typePattern = og.AttributeRole.TEXT
role_data.inputs.usdTimecode = og.AttributeRole.TIMECODE
role_data.outputs.primsBundle = og.AttributeRole.BUNDLE
role_data.state.attrNamesToImport = og.AttributeRole.TEXT
role_data.state.pathPattern = og.AttributeRole.TEXT
role_data.state.typePattern = og.AttributeRole.TEXT
role_data.state.usdTimecode = og.AttributeRole.TIMECODE
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def _debugStamp(self):
data_view = og.AttributeValueHelper(self._attributes._debugStamp)
return data_view.get()
@_debugStamp.setter
def _debugStamp(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes._debugStamp)
data_view = og.AttributeValueHelper(self._attributes._debugStamp)
data_view.set(value)
@property
def applySkelBinding(self):
data_view = og.AttributeValueHelper(self._attributes.applySkelBinding)
return data_view.get()
@applySkelBinding.setter
def applySkelBinding(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.applySkelBinding)
data_view = og.AttributeValueHelper(self._attributes.applySkelBinding)
data_view.set(value)
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.attrNamesToImport)
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
self.attrNamesToImport_size = data_view.get_array_size()
@property
def computeBoundingBox(self):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
return data_view.get()
@computeBoundingBox.setter
def computeBoundingBox(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.computeBoundingBox)
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
data_view.set(value)
@property
def enableBundleChangeTracking(self):
data_view = og.AttributeValueHelper(self._attributes.enableBundleChangeTracking)
return data_view.get()
@enableBundleChangeTracking.setter
def enableBundleChangeTracking(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.enableBundleChangeTracking)
data_view = og.AttributeValueHelper(self._attributes.enableBundleChangeTracking)
data_view.set(value)
@property
def enableChangeTracking(self):
data_view = og.AttributeValueHelper(self._attributes.enableChangeTracking)
return data_view.get()
@enableChangeTracking.setter
def enableChangeTracking(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.enableChangeTracking)
data_view = og.AttributeValueHelper(self._attributes.enableChangeTracking)
data_view.set(value)
@property
def pathPattern(self):
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
return data_view.get()
@pathPattern.setter
def pathPattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.pathPattern)
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
data_view.set(value)
self.pathPattern_size = data_view.get_array_size()
@property
def prims(self):
data_view = og.AttributeValueHelper(self._attributes.prims)
return data_view.get()
@prims.setter
def prims(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prims)
data_view = og.AttributeValueHelper(self._attributes.prims)
data_view.set(value)
self.prims_size = data_view.get_array_size()
@property
def typePattern(self):
data_view = og.AttributeValueHelper(self._attributes.typePattern)
return data_view.get()
@typePattern.setter
def typePattern(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.typePattern)
data_view = og.AttributeValueHelper(self._attributes.typePattern)
data_view.set(value)
self.typePattern_size = data_view.get_array_size()
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usdTimecode)
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.__bundles = og.BundleContainer(context, node, attributes, [], read_only=False, gpu_ptr_kinds={})
self._batchedWriteValues = { }
@property
def primsBundle(self) -> og.BundleContents:
"""Get the bundle wrapper class for the attribute outputs.primsBundle"""
return self.__bundles.primsBundle
@primsBundle.setter
def primsBundle(self, bundle: og.BundleContents):
"""Overwrite the bundle attribute outputs.primsBundle with a new bundle"""
if not isinstance(bundle, og.BundleContents):
carb.log_error("Only bundle attributes can be assigned to another bundle attribute")
self.__bundles.primsBundle.bundle = bundle
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.attrNamesToImport_size = None
self.pathPattern_size = None
self.typePattern_size = None
@property
def applySkelBinding(self):
data_view = og.AttributeValueHelper(self._attributes.applySkelBinding)
return data_view.get()
@applySkelBinding.setter
def applySkelBinding(self, value):
data_view = og.AttributeValueHelper(self._attributes.applySkelBinding)
data_view.set(value)
@property
def attrNamesToImport(self):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
self.attrNamesToImport_size = data_view.get_array_size()
return data_view.get()
@attrNamesToImport.setter
def attrNamesToImport(self, value):
data_view = og.AttributeValueHelper(self._attributes.attrNamesToImport)
data_view.set(value)
self.attrNamesToImport_size = data_view.get_array_size()
@property
def computeBoundingBox(self):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
return data_view.get()
@computeBoundingBox.setter
def computeBoundingBox(self, value):
data_view = og.AttributeValueHelper(self._attributes.computeBoundingBox)
data_view.set(value)
@property
def enableBundleChangeTracking(self):
data_view = og.AttributeValueHelper(self._attributes.enableBundleChangeTracking)
return data_view.get()
@enableBundleChangeTracking.setter
def enableBundleChangeTracking(self, value):
data_view = og.AttributeValueHelper(self._attributes.enableBundleChangeTracking)
data_view.set(value)
@property
def enableChangeTracking(self):
data_view = og.AttributeValueHelper(self._attributes.enableChangeTracking)
return data_view.get()
@enableChangeTracking.setter
def enableChangeTracking(self, value):
data_view = og.AttributeValueHelper(self._attributes.enableChangeTracking)
data_view.set(value)
@property
def pathPattern(self):
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
self.pathPattern_size = data_view.get_array_size()
return data_view.get()
@pathPattern.setter
def pathPattern(self, value):
data_view = og.AttributeValueHelper(self._attributes.pathPattern)
data_view.set(value)
self.pathPattern_size = data_view.get_array_size()
@property
def typePattern(self):
data_view = og.AttributeValueHelper(self._attributes.typePattern)
self.typePattern_size = data_view.get_array_size()
return data_view.get()
@typePattern.setter
def typePattern(self, value):
data_view = og.AttributeValueHelper(self._attributes.typePattern)
data_view.set(value)
self.typePattern_size = data_view.get_array_size()
@property
def usdTimecode(self):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
return data_view.get()
@usdTimecode.setter
def usdTimecode(self, value):
data_view = og.AttributeValueHelper(self._attributes.usdTimecode)
data_view.set(value)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnReadPrimsV2Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnReadPrimsV2Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnReadPrimsV2Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 20,941 | Python | 56.218579 | 680 | 0.667065 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetLookAtRotationDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.GetLookAtRotation
Computes the rotation angles to align a forward direction vector to a direction vector formed by starting at 'start' and
pointing at 'target'. The forward vector is the 'default' orientation of the asset being rotated, usually +X or +Z
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnGetLookAtRotationDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetLookAtRotation
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.forward
inputs.start
inputs.target
inputs.up
Outputs:
outputs.orientation
outputs.rotateXYZ
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:forward', 'double3', 0, None, 'The direction vector to be aligned with the look vector', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 1.0]'}, True, [0.0, 0.0, 1.0], False, ''),
('inputs:start', 'point3d', 0, None, 'The position to look from', {}, True, [0.0, 0.0, 0.0], False, ''),
('inputs:target', 'point3d', 0, None, 'The position to look at', {}, True, [0.0, 0.0, 0.0], False, ''),
('inputs:up', 'double3', 0, None, "The direction considered to be 'up'. If not specified scene-up will be used.", {}, False, None, False, ''),
('outputs:orientation', 'quatd', 0, None, 'The orientation quaternion equivalent to outputs:rotateXYZ', {}, True, None, False, ''),
('outputs:rotateXYZ', 'double3', 0, None, 'The rotation vector [X, Y, Z]', {}, True, None, False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.start = og.AttributeRole.POSITION
role_data.inputs.target = og.AttributeRole.POSITION
role_data.outputs.orientation = og.AttributeRole.QUATERNION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def forward(self):
data_view = og.AttributeValueHelper(self._attributes.forward)
return data_view.get()
@forward.setter
def forward(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.forward)
data_view = og.AttributeValueHelper(self._attributes.forward)
data_view.set(value)
@property
def start(self):
data_view = og.AttributeValueHelper(self._attributes.start)
return data_view.get()
@start.setter
def start(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.start)
data_view = og.AttributeValueHelper(self._attributes.start)
data_view.set(value)
@property
def target(self):
data_view = og.AttributeValueHelper(self._attributes.target)
return data_view.get()
@target.setter
def target(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.target)
data_view = og.AttributeValueHelper(self._attributes.target)
data_view.set(value)
@property
def up(self):
data_view = og.AttributeValueHelper(self._attributes.up)
return data_view.get()
@up.setter
def up(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.up)
data_view = og.AttributeValueHelper(self._attributes.up)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def orientation(self):
data_view = og.AttributeValueHelper(self._attributes.orientation)
return data_view.get()
@orientation.setter
def orientation(self, value):
data_view = og.AttributeValueHelper(self._attributes.orientation)
data_view.set(value)
@property
def rotateXYZ(self):
data_view = og.AttributeValueHelper(self._attributes.rotateXYZ)
return data_view.get()
@rotateXYZ.setter
def rotateXYZ(self, value):
data_view = og.AttributeValueHelper(self._attributes.rotateXYZ)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnGetLookAtRotationDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnGetLookAtRotationDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnGetLookAtRotationDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,919 | Python | 44.517241 | 187 | 0.648819 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnTimelineGetDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.GetTimeline
Get the main timeline properties
"""
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnTimelineGetDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetTimeline
Class Members:
node: Node being evaluated
Attribute Value Properties:
Outputs:
outputs.endFrame
outputs.endTime
outputs.frame
outputs.framesPerSecond
outputs.isLooping
outputs.isPlaying
outputs.startFrame
outputs.startTime
outputs.time
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('outputs:endFrame', 'double', 0, 'End Frame', "The end frame of the main timeline's play range.", {}, True, None, False, ''),
('outputs:endTime', 'double', 0, 'End Time', "The end time (in seconds) of the main timeline's play range.", {}, True, None, False, ''),
('outputs:frame', 'double', 0, 'Current Frame', "The current frame number of the main timeline's playhead.", {}, True, None, False, ''),
('outputs:framesPerSecond', 'double', 0, 'Frames Per Second', 'The number of frames per second of the main timeline.', {}, True, None, False, ''),
('outputs:isLooping', 'bool', 0, 'Is Looping', 'Is the main timeline currently looping?', {}, True, None, False, ''),
('outputs:isPlaying', 'bool', 0, 'Is Playing', 'Is the main timeline currently playing?', {}, True, None, False, ''),
('outputs:startFrame', 'double', 0, 'Start Frame', "The start frame of the main timeline's play range.", {}, True, None, False, ''),
('outputs:startTime', 'double', 0, 'Start Time', "The start time (in seconds) of the main timeline's play range.", {}, True, None, False, ''),
('outputs:time', 'double', 0, 'Current Time', "The current time (in seconds) of the main timeline's playhead.", {}, True, None, False, ''),
])
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def endFrame(self):
data_view = og.AttributeValueHelper(self._attributes.endFrame)
return data_view.get()
@endFrame.setter
def endFrame(self, value):
data_view = og.AttributeValueHelper(self._attributes.endFrame)
data_view.set(value)
@property
def endTime(self):
data_view = og.AttributeValueHelper(self._attributes.endTime)
return data_view.get()
@endTime.setter
def endTime(self, value):
data_view = og.AttributeValueHelper(self._attributes.endTime)
data_view.set(value)
@property
def frame(self):
data_view = og.AttributeValueHelper(self._attributes.frame)
return data_view.get()
@frame.setter
def frame(self, value):
data_view = og.AttributeValueHelper(self._attributes.frame)
data_view.set(value)
@property
def framesPerSecond(self):
data_view = og.AttributeValueHelper(self._attributes.framesPerSecond)
return data_view.get()
@framesPerSecond.setter
def framesPerSecond(self, value):
data_view = og.AttributeValueHelper(self._attributes.framesPerSecond)
data_view.set(value)
@property
def isLooping(self):
data_view = og.AttributeValueHelper(self._attributes.isLooping)
return data_view.get()
@isLooping.setter
def isLooping(self, value):
data_view = og.AttributeValueHelper(self._attributes.isLooping)
data_view.set(value)
@property
def isPlaying(self):
data_view = og.AttributeValueHelper(self._attributes.isPlaying)
return data_view.get()
@isPlaying.setter
def isPlaying(self, value):
data_view = og.AttributeValueHelper(self._attributes.isPlaying)
data_view.set(value)
@property
def startFrame(self):
data_view = og.AttributeValueHelper(self._attributes.startFrame)
return data_view.get()
@startFrame.setter
def startFrame(self, value):
data_view = og.AttributeValueHelper(self._attributes.startFrame)
data_view.set(value)
@property
def startTime(self):
data_view = og.AttributeValueHelper(self._attributes.startTime)
return data_view.get()
@startTime.setter
def startTime(self, value):
data_view = og.AttributeValueHelper(self._attributes.startTime)
data_view.set(value)
@property
def time(self):
data_view = og.AttributeValueHelper(self._attributes.time)
return data_view.get()
@time.setter
def time(self, value):
data_view = og.AttributeValueHelper(self._attributes.time)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnTimelineGetDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnTimelineGetDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnTimelineGetDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 8,448 | Python | 43.468421 | 154 | 0.642874 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnWritePrimRelationshipDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.WritePrimRelationship
Writes the target(s) to a relationship on a given prim
"""
import usdrt
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnWritePrimRelationshipDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.WritePrimRelationship
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.name
inputs.prim
inputs.usdWriteBack
inputs.value
Outputs:
outputs.execOut
State:
state.correctlySetup
state.name
state.prim
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, None, 'The input execution port', {}, True, None, False, ''),
('inputs:name', 'token', 0, 'Relationship Name', 'The name of the relationship to write', {}, True, "", False, ''),
('inputs:prim', 'target', 0, None, 'The prim to write the relationship to', {}, True, [], False, ''),
('inputs:usdWriteBack', 'bool', 0, 'Persist To USD', 'Whether or not the value should be written back to USD, or kept a Fabric only value', {ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
('inputs:value', 'target', 0, None, 'The target(s) to write to the relationship', {}, True, [], False, ''),
('outputs:execOut', 'execution', 0, None, 'The output execution port', {}, True, None, False, ''),
('state:correctlySetup', 'bool', 0, None, 'Whether or not the instance is properly setup', {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
('state:name', 'token', 0, None, 'The prefetched relationship name', {}, True, None, False, ''),
('state:prim', 'target', 0, None, 'The currently prefetched prim', {}, True, [], False, ''),
])
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.inputs.prim = og.AttributeRole.TARGET
role_data.inputs.value = og.AttributeRole.TARGET
role_data.outputs.execOut = og.AttributeRole.EXECUTION
role_data.state.prim = og.AttributeRole.TARGET
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def name(self):
data_view = og.AttributeValueHelper(self._attributes.name)
return data_view.get()
@name.setter
def name(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.name)
data_view = og.AttributeValueHelper(self._attributes.name)
data_view.set(value)
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
return data_view.get()
@prim.setter
def prim(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.prim)
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
@property
def usdWriteBack(self):
data_view = og.AttributeValueHelper(self._attributes.usdWriteBack)
return data_view.get()
@usdWriteBack.setter
def usdWriteBack(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.usdWriteBack)
data_view = og.AttributeValueHelper(self._attributes.usdWriteBack)
data_view.set(value)
@property
def value(self):
data_view = og.AttributeValueHelper(self._attributes.value)
return data_view.get()
@value.setter
def value(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.value)
data_view = og.AttributeValueHelper(self._attributes.value)
data_view.set(value)
self.value_size = data_view.get_array_size()
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def execOut(self):
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
data_view = og.AttributeValueHelper(self._attributes.execOut)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.prim_size = None
@property
def correctlySetup(self):
data_view = og.AttributeValueHelper(self._attributes.correctlySetup)
return data_view.get()
@correctlySetup.setter
def correctlySetup(self, value):
data_view = og.AttributeValueHelper(self._attributes.correctlySetup)
data_view.set(value)
@property
def name(self):
data_view = og.AttributeValueHelper(self._attributes.name)
return data_view.get()
@name.setter
def name(self, value):
data_view = og.AttributeValueHelper(self._attributes.name)
data_view.set(value)
@property
def prim(self):
data_view = og.AttributeValueHelper(self._attributes.prim)
self.prim_size = data_view.get_array_size()
return data_view.get()
@prim.setter
def prim(self, value):
data_view = og.AttributeValueHelper(self._attributes.prim)
data_view.set(value)
self.prim_size = data_view.get_array_size()
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnWritePrimRelationshipDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnWritePrimRelationshipDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnWritePrimRelationshipDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,600 | Python | 42.840182 | 207 | 0.635937 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetLocationAtDistanceOnCurveDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.GetLocationAtDistanceOnCurve
DEPRECATED: Use GetLocationAtDistanceOnCurve2
"""
import numpy
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnGetLocationAtDistanceOnCurveDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetLocationAtDistanceOnCurve
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.curve
inputs.distance
inputs.forwardAxis
inputs.upAxis
Outputs:
outputs.location
outputs.orientation
outputs.rotateXYZ
Predefined Tokens:
tokens.x
tokens.y
tokens.z
tokens.X
tokens.Y
tokens.Z
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:curve', 'point3d[]', 0, 'Curve', 'The curve to be examined', {}, True, [], False, ''),
('inputs:distance', 'double[]', 0, 'Distances', 'The distances along the curve, wrapped to the range 0-1.0', {}, True, [], False, ''),
('inputs:forwardAxis', 'token', 0, 'Forward', 'The direction vector from which the returned rotation is relative, one of X, Y, Z', {ogn.MetadataKeys.DEFAULT: '"X"'}, True, "X", False, ''),
('inputs:upAxis', 'token', 0, 'Up', 'The world Up vector, the curve should be in a plane perpendicular with this - one of X, Y, Z', {ogn.MetadataKeys.DEFAULT: '"Y"'}, True, "Y", False, ''),
('outputs:location', 'point3d[]', 0, 'Locations on curve at the given distances in world space', 'Locations', {}, True, None, False, ''),
('outputs:orientation', 'quatf[]', 0, 'World space orientations of the curve at the given distances, may not be smooth for some curves', 'Orientations', {}, True, None, False, ''),
('outputs:rotateXYZ', 'vector3d[]', 0, 'World space rotations of the curve at the given distances, may not be smooth for some curves', 'Rotations', {}, True, None, False, ''),
])
class tokens:
x = "x"
y = "y"
z = "z"
X = "X"
Y = "Y"
Z = "Z"
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.curve = og.AttributeRole.POSITION
role_data.outputs.location = og.AttributeRole.POSITION
role_data.outputs.orientation = og.AttributeRole.QUATERNION
role_data.outputs.rotateXYZ = og.AttributeRole.VECTOR
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def curve(self):
data_view = og.AttributeValueHelper(self._attributes.curve)
return data_view.get()
@curve.setter
def curve(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.curve)
data_view = og.AttributeValueHelper(self._attributes.curve)
data_view.set(value)
self.curve_size = data_view.get_array_size()
@property
def distance(self):
data_view = og.AttributeValueHelper(self._attributes.distance)
return data_view.get()
@distance.setter
def distance(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.distance)
data_view = og.AttributeValueHelper(self._attributes.distance)
data_view.set(value)
self.distance_size = data_view.get_array_size()
@property
def forwardAxis(self):
data_view = og.AttributeValueHelper(self._attributes.forwardAxis)
return data_view.get()
@forwardAxis.setter
def forwardAxis(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.forwardAxis)
data_view = og.AttributeValueHelper(self._attributes.forwardAxis)
data_view.set(value)
@property
def upAxis(self):
data_view = og.AttributeValueHelper(self._attributes.upAxis)
return data_view.get()
@upAxis.setter
def upAxis(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.upAxis)
data_view = og.AttributeValueHelper(self._attributes.upAxis)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self.location_size = None
self.orientation_size = None
self.rotateXYZ_size = None
self._batchedWriteValues = { }
@property
def location(self):
data_view = og.AttributeValueHelper(self._attributes.location)
return data_view.get(reserved_element_count=self.location_size)
@location.setter
def location(self, value):
data_view = og.AttributeValueHelper(self._attributes.location)
data_view.set(value)
self.location_size = data_view.get_array_size()
@property
def orientation(self):
data_view = og.AttributeValueHelper(self._attributes.orientation)
return data_view.get(reserved_element_count=self.orientation_size)
@orientation.setter
def orientation(self, value):
data_view = og.AttributeValueHelper(self._attributes.orientation)
data_view.set(value)
self.orientation_size = data_view.get_array_size()
@property
def rotateXYZ(self):
data_view = og.AttributeValueHelper(self._attributes.rotateXYZ)
return data_view.get(reserved_element_count=self.rotateXYZ_size)
@rotateXYZ.setter
def rotateXYZ(self, value):
data_view = og.AttributeValueHelper(self._attributes.rotateXYZ)
data_view.set(value)
self.rotateXYZ_size = data_view.get_array_size()
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnGetLocationAtDistanceOnCurveDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnGetLocationAtDistanceOnCurveDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnGetLocationAtDistanceOnCurveDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 9,416 | Python | 43.842857 | 197 | 0.644966 |
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnTimelineSetDatabase.py | """Support for simplified access to data on nodes of type omni.graph.nodes.SetTimeline
Set properties of the main timeline
"""
import omni.graph.core as og
import omni.graph.core._omni_graph_core as _og
import omni.graph.tools.ogn as ogn
class OgnTimelineSetDatabase(og.Database):
"""Helper class providing simplified access to data on nodes of type omni.graph.nodes.SetTimeline
Class Members:
node: Node being evaluated
Attribute Value Properties:
Inputs:
inputs.execIn
inputs.propName
inputs.propValue
Outputs:
outputs.clamped
outputs.execOut
Predefined Tokens:
tokens.Frame
tokens.Time
tokens.StartFrame
tokens.StartTime
tokens.EndFrame
tokens.EndTime
tokens.FramesPerSecond
"""
# Imprint the generator and target ABI versions in the file for JIT generation
GENERATOR_VERSION = (1, 41, 3)
TARGET_VERSION = (2, 139, 12)
# This is an internal object that provides per-class storage of a per-node data dictionary
PER_NODE_DATA = {}
# This is an internal object that describes unchanging attributes in a generic way
# The values in this list are in no particular order, as a per-attribute tuple
# Name, Type, ExtendedTypeIndex, UiName, Description, Metadata,
# Is_Required, DefaultValue, Is_Deprecated, DeprecationMsg
# You should not need to access any of this data directly, use the defined database interfaces
INTERFACE = og.Database._get_interface([
('inputs:execIn', 'execution', 0, 'Execute In', 'The input that triggers the execution of this node.', {}, True, None, False, ''),
('inputs:propName', 'token', 0, 'Property Name', 'The name of the property to set.', {'displayGroup': 'parameters', ogn.MetadataKeys.LITERAL_ONLY: '1', ogn.MetadataKeys.ALLOWED_TOKENS: 'Frame,Time,StartFrame,StartTime,EndFrame,EndTime,FramesPerSecond', ogn.MetadataKeys.ALLOWED_TOKENS_RAW: '["Frame", "Time", "StartFrame", "StartTime", "EndFrame", "EndTime", "FramesPerSecond"]', ogn.MetadataKeys.DEFAULT: '"Frame"'}, True, "Frame", False, ''),
('inputs:propValue', 'double', 0, 'Property Value', 'The value of the property to set.', {}, True, 0.0, False, ''),
('outputs:clamped', 'bool', 0, 'Clamp to range', 'Was the input frame or time clamped to the playback range?', {}, True, None, False, ''),
('outputs:execOut', 'execution', 0, 'Execute Out', 'The output that is triggered when this node executed.', {}, True, None, False, ''),
])
class tokens:
Frame = "Frame"
Time = "Time"
StartFrame = "StartFrame"
StartTime = "StartTime"
EndFrame = "EndFrame"
EndTime = "EndTime"
FramesPerSecond = "FramesPerSecond"
@classmethod
def _populate_role_data(cls):
"""Populate a role structure with the non-default roles on this node type"""
role_data = super()._populate_role_data()
role_data.inputs.execIn = og.AttributeRole.EXECUTION
role_data.outputs.execOut = og.AttributeRole.EXECUTION
return role_data
class ValuesForInputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to input attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedReadAttributes = []
self._batchedReadValues = []
@property
def execIn(self):
data_view = og.AttributeValueHelper(self._attributes.execIn)
return data_view.get()
@execIn.setter
def execIn(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.execIn)
data_view = og.AttributeValueHelper(self._attributes.execIn)
data_view.set(value)
@property
def propName(self):
data_view = og.AttributeValueHelper(self._attributes.propName)
return data_view.get()
@propName.setter
def propName(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.propName)
data_view = og.AttributeValueHelper(self._attributes.propName)
data_view.set(value)
@property
def propValue(self):
data_view = og.AttributeValueHelper(self._attributes.propValue)
return data_view.get()
@propValue.setter
def propValue(self, value):
if self._setting_locked:
raise og.ReadOnlyError(self._attributes.propValue)
data_view = og.AttributeValueHelper(self._attributes.propValue)
data_view.set(value)
def _prefetch(self):
readAttributes = self._batchedReadAttributes
newValues = _og._prefetch_input_attributes_data(readAttributes)
if len(readAttributes) == len(newValues):
self._batchedReadValues = newValues
class ValuesForOutputs(og.DynamicAttributeAccess):
LOCAL_PROPERTY_NAMES = { }
"""Helper class that creates natural hierarchical access to output attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
self._batchedWriteValues = { }
@property
def clamped(self):
data_view = og.AttributeValueHelper(self._attributes.clamped)
return data_view.get()
@clamped.setter
def clamped(self, value):
data_view = og.AttributeValueHelper(self._attributes.clamped)
data_view.set(value)
@property
def execOut(self):
data_view = og.AttributeValueHelper(self._attributes.execOut)
return data_view.get()
@execOut.setter
def execOut(self, value):
data_view = og.AttributeValueHelper(self._attributes.execOut)
data_view.set(value)
def _commit(self):
_og._commit_output_attributes_data(self._batchedWriteValues)
self._batchedWriteValues = { }
class ValuesForState(og.DynamicAttributeAccess):
"""Helper class that creates natural hierarchical access to state attributes"""
def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
"""Initialize simplified access for the attribute data"""
context = node.get_graph().get_default_graph_context()
super().__init__(context, node, attributes, dynamic_attributes)
def __init__(self, node):
super().__init__(node)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_INPUT)
self.inputs = OgnTimelineSetDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
self.outputs = OgnTimelineSetDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
self.state = OgnTimelineSetDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
| 7,808 | Python | 43.622857 | 452 | 0.651511 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.