file_path
stringlengths
21
224
content
stringlengths
0
80.8M
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnTimelineStop.rst
.. _omni_graph_nodes_StopTimeline_1: .. _omni_graph_nodes_StopTimeline: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Stop playback :keywords: lang-en omnigraph node time compute-on-request nodes stop-timeline Stop playback ============= .. <description> Stops playback of the main timeline at the current 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 "Execute In (*inputs:execIn*)", "``execution``", "The input that triggers the execution of this node.", "None" 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.StopTimeline" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Stop playback" "Categories", "time" "Generated Class Name", "OgnTimelineStopDatabase" "Python Module", "omni.graph.nodes"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnOr.rst
.. _omni_graph_nodes_BooleanOr_2: .. _omni_graph_nodes_BooleanOr: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Boolean OR :keywords: lang-en omnigraph node math:condition threadsafe nodes boolean-or Boolean OR ========== .. <description> Boolean OR on two or more inputs. If the inputs are arrays, OR operations will be performed pair-wise. The input sizes must match. If only one input is an array, the other input will be broadcast to the size of the array. Returns an array of booleans if either input is an array, otherwise returning a boolean. .. </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', 'bool[]']``", "Input A: bool or bool array.", "None" "inputs:b", "``['bool', 'bool[]']``", "Input B: bool or bool array.", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*outputs:result*)", "``['bool', 'bool[]']``", "The result of the boolean OR - an array of booleans if either input is an array, otherwise a boolean.", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.BooleanOr" "Version", "2" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Boolean OR" "Categories", "math:condition" "Generated Class Name", "OgnOrDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnInterpolateTo.rst
.. _omni_graph_nodes_InterpolateTo_2: .. _omni_graph_nodes_InterpolateTo: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Interpolate To :keywords: lang-en omnigraph node math:operator threadsafe nodes interpolate-to Interpolate To ============== .. <description> Function which iterpolates one step from a current value to a target value with a given speed. Vectors are interpolated component-wise. Interpolation can be applied to decimal types. The interpolation provides an eased approach to the target, adjust speed and exponent to tweak the curve. The formula is: result = current + (target - current) * (1 - clamp(0, speed * deltaSeconds, 1))^exp. For quaternions, the node performs a spherical linear interpolation (SLERP) with alpha = (1 - clamp(0, speed * deltaSeconds, 1))^exp .. </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:current", "``['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][]']``", "The current value", "None" "inputs:deltaSeconds", "``double``", "The step time for the interpolation (Seconds)", "0.0" "inputs:exponent", "``float``", "The blend exponent, which is the degree of the ease curve (1 = linear, 2 = quadratic, 3 = cubic, etc). ", "2.0" "inputs:speed", "``double``", "The peak speed of approach (Units / Second)", "1.0" "inputs:target", "``['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][]']``", "The target value", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The interpolated result", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.InterpolateTo" "Version", "2" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Interpolate To" "Categories", "math:operator" "Generated Class Name", "OgnInterpolateToDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnEase.rst
.. _omni_graph_nodes_Ease_2: .. _omni_graph_nodes_Ease: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Easing Function :keywords: lang-en omnigraph node math:operator threadsafe nodes ease Easing Function =============== .. <description> 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 .. </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:alpha", "``['float', 'float[]']``", "The normalized time (0 - 1.0). Values outside this range will be clamped", "None" "inputs:blendExponent", "``int``", "The blend exponent, which is the degree of the ease curve (1 = linear, 2 = quadratic, 3 = cubic, etc). This only applies to the Ease* functions", "2" "Operation (*inputs:easeFunc*)", "``token``", "The easing function to apply (EaseIn, EaseOut, EaseInOut, Linear, SinIn, SinOut, SinInOut)", "EaseInOut" "", "*allowedTokens*", "EaseIn,EaseOut,EaseInOut,Linear,SinIn,SinOut,SinInOut", "" "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][]']``", "The end value", "None" "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][]']``", "The start value", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*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][]']``", "The eased result of the function applied to value", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Ease" "Version", "2" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Easing Function" "Categories", "math:operator" "Generated Class Name", "OgnEaseDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantQuatd.rst
.. _omni_graph_nodes_ConstantQuatd_1: .. _omni_graph_nodes_ConstantQuatd: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Quatd :keywords: lang-en omnigraph node constants nodes constant-quatd Constant Quatd ============== .. <description> Holds a double-precision quaternion constant: A real coefficient and three imaginary coefficients .. </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*)", "``quatd[4]``", "The constant value", "[0.0, 0.0, 0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantQuatd" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantQuatdDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnPauseSound.rst
.. _omni_graph_nodes_PauseSound_1: .. _omni_graph_nodes_PauseSound: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Pause Sound :keywords: lang-en omnigraph node sound nodes pause-sound Pause Sound =========== .. <description> Pause-unpause playing 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:soundId", "``uint64``", "The sound identifier", "0" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "outputs:execOut", "``execution``", "The output execution", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.PauseSound" "Version", "1" "Extension", "omni.graph.nodes" "Icon", "ogn/icons/omni.graph.nodes.PauseSound.svg" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Pause Sound" "Categories", "sound" "Generated Class Name", "OgnPauseSoundDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnClamp.rst
.. _omni_graph_nodes_Clamp_1: .. _omni_graph_nodes_Clamp: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Clamp :keywords: lang-en omnigraph node math:operator threadsafe nodes clamp Clamp ===== .. <description> Clamp a number or array of numbers to a specified range. If an array of numbers is provided as the input and lower/upper are scalers Then each input numeric will be clamped to the range [lower, upper] If all inputs are arrays, clamping will be done element-wise. lower & upper are broadcast against input Error will be reported if lower > upper. .. </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*)", "``['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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The input numerics to clamp", "None" "Lower (*inputs:lower*)", "``['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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "Lower bound of the clamp", "None" "Upper (*inputs:upper*)", "``['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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "Upper bound of the clamp", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Output (*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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The resulting clamped output", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Clamp" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Clamp" "Categories", "math:operator" "Generated Class Name", "OgnClampDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantHalf3.rst
.. _omni_graph_nodes_ConstantHalf3_1: .. _omni_graph_nodes_ConstantHalf3: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Half3 :keywords: lang-en omnigraph node constants nodes constant-half3 Constant Half3 ============== .. <description> Holds a 3-component half-precision constant. .. </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*)", "``half[3]``", "The constant value", "[0.0, 0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantHalf3" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantHalf3Database" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantInt64.rst
.. _omni_graph_nodes_ConstantInt64_1: .. _omni_graph_nodes_ConstantInt64: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Int64 :keywords: lang-en omnigraph node constants nodes constant-int64 Constant Int64 ============== .. <description> Holds a 64 bit signed integer constant 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*)", "``int64``", "The constant value", "0" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantInt64" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantInt64Database" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnArrayFill.rst
.. _omni_graph_nodes_ArrayFill_1: .. _omni_graph_nodes_ArrayFill: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Array Fill :keywords: lang-en omnigraph node math:array threadsafe nodes array-fill Array Fill ========== .. <description> Creates a copy of the input array, filled with the given 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: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][]']``", "The array to be modified", "None" "inputs:fillValue", "``['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]']``", "The value to be repeated in the new array", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "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][]']``", "The modified array", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ArrayFill" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Array Fill" "Categories", "math:array" "Generated Class Name", "OgnArrayFillDatabase" "Python Module", "omni.graph.nodes"
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"
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"
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"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnAtan.rst
.. _omni_graph_nodes_Atan_1: .. _omni_graph_nodes_Atan: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Arctangent :keywords: lang-en omnigraph node math:operator threadsafe nodes atan Arctangent ========== .. <description> Trigonometric operation arctangent of one input 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:value", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'timecode']``", "Angle value in degrees whose inverse tan is to be found", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*outputs:value*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'timecode']``", "The atan value of the input angle in degrees", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Atan" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Arctangent" "Categories", "math:operator" "Generated Class Name", "OgnAtanDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantPoint3f.rst
.. _omni_graph_nodes_ConstantPoint3f_1: .. _omni_graph_nodes_ConstantPoint3f: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Point3F :keywords: lang-en omnigraph node constants nodes constant-point3f Constant Point3F ================ .. <description> Holds a 3-component float constant. .. </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*)", "``pointf[3]``", "The constant value", "[0.0, 0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantPoint3f" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantPoint3fDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnTan.rst
.. _omni_graph_nodes_Tan_1: .. _omni_graph_nodes_Tan: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Tan :keywords: lang-en omnigraph node math:operator threadsafe nodes tan Tan === .. <description> Trigonometric operation tangent of one input 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:value", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'timecode']``", "Angle in degrees whose tangent value is to be found", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*outputs:value*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'timecode']``", "The tangent value of the input angle in degrees", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Tan" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Tan" "Categories", "math:operator" "Generated Class Name", "OgnTanDatabase" "Python Module", "omni.graph.nodes"
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"
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"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantTexCoord2h.rst
.. _omni_graph_nodes_ConstantTexCoord2h_1: .. _omni_graph_nodes_ConstantTexCoord2h: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Tex Coord2H :keywords: lang-en omnigraph node constants nodes constant-tex-coord2h Constant Tex Coord2H ==================== .. <description> Holds a 2D uv texture coordinate. .. </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*)", "``texcoordh[2]``", "The constant value", "[0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantTexCoord2h" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantTexCoord2hDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnArrayIndex.rst
.. _omni_graph_nodes_ArrayIndex_1: .. _omni_graph_nodes_ArrayIndex: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Array Index :keywords: lang-en omnigraph node math:array threadsafe nodes array-index Array Index =========== .. <description> Copies an element of an input array into an output .. </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 "Array (*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][]']``", "The array to be indexed", "None" "Index (*inputs:index*)", "``int``", "The index into the array, a negative value indexes from the end of the array", "0" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "outputs: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]']``", "The value from the array", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ArrayIndex" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Array Index" "Categories", "math:array" "Generated Class Name", "OgnArrayIndexDatabase" "Python Module", "omni.graph.nodes"
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"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantHalf.rst
.. _omni_graph_nodes_ConstantHalf_1: .. _omni_graph_nodes_ConstantHalf: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Half :keywords: lang-en omnigraph node constants nodes constant-half Constant Half ============= .. <description> Holds a 16-bit floating point 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*)", "``half``", "The constant value", "0.0" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantHalf" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantHalfDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantTexCoord3f.rst
.. _omni_graph_nodes_ConstantTexCoord3f_1: .. _omni_graph_nodes_ConstantTexCoord3f: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Tex Coord3F :keywords: lang-en omnigraph node constants nodes constant-tex-coord3f Constant Tex Coord3F ==================== .. <description> Holds a 3D uvw texture coordinate. .. </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*)", "``texcoordf[3]``", "The constant value", "[0.0, 0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantTexCoord3f" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantTexCoord3fDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnNthRoot.rst
.. _omni_graph_nodes_NthRoot_1: .. _omni_graph_nodes_NthRoot: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Nth Root :keywords: lang-en omnigraph node math:operator threadsafe nodes nth-root Nth Root ======== .. <description> Computes the nth root of value. The result is the same type as the input value if the numerator is a decimal type. Otherwise the result is a double. If the input is a vector or matrix, then the node will calculate the square root of each element , and output a vector or matrix of the same size. Note that there are combinations of inputs that can result in a loss of precision due to different value ranges. Taking roots of a negative number will give a result of NaN except for cube root. .. </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 "Nth Root (*inputs:nthRoot*)", "``int``", "Take the nth root", "2" "Value (*inputs:value*)", "``['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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The input value", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "Result of square root", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.NthRoot" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Nth Root" "Categories", "math:operator" "Generated Class Name", "OgnNthRootDatabase" "Python Module", "omni.graph.nodes"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnGetVariantSelection.rst
.. _omni_graph_nodes_GetVariantSelection_2: .. _omni_graph_nodes_GetVariantSelection: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Get Variant Selection :keywords: lang-en omnigraph node graph:action,sceneGraph,variants ReadOnly nodes get-variant-selection Get Variant Selection ===================== .. <description> Get the variant selection on a 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:prim", "``target``", "The prim with the variantSet", "None" "inputs:variantSetName", "``token``", "The variantSet name", "" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "outputs:variantName", "``token``", "The variant name", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.GetVariantSelection" "Version", "2" "Extension", "omni.graph.nodes" "Icon", "ogn/icons/omni.graph.nodes.GetVariantSelection.svg" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Get Variant Selection" "Categories", "graph:action,sceneGraph,variants" "Generated Class Name", "OgnGetVariantSelectionDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnDotProduct.rst
.. _omni_graph_nodes_DotProduct_1: .. _omni_graph_nodes_DotProduct: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Dot Product :keywords: lang-en omnigraph node math:operator threadsafe nodes dot-product Dot Product =========== .. <description> Compute the dot product of two (arrays of) vectors. If two arrays of vectors are provided, then the dot product will be taken element-wise. Inputs must be the same shape .. </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[3][]', 'colord[4]', 'colord[4][]', 'colorf[3]', 'colorf[3][]', 'colorf[4]', 'colorf[4][]', 'colorh[3]', 'colorh[3][]', 'colorh[4]', 'colorh[4][]', 'double[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'double[]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'float[]', '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[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The first vector in the dot product", "None" "B (*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[2]', 'double[2][]', 'double[3]', 'double[3][]', 'double[4]', 'double[4][]', 'double[]', 'float[2]', 'float[2][]', 'float[3]', 'float[3][]', 'float[4]', 'float[4][]', 'float[]', '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[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The second vector in the dot product", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Product (*outputs:product*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'timecode']``", "The resulting product", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.DotProduct" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Dot Product" "Categories", "math:operator" "Generated Class Name", "OgnDotProductDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRenderPostprocessEntry.rst
.. _omni_graph_nodes_RenderPostProcessEntry_1: .. _omni_graph_nodes_RenderPostProcessEntry: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Render Postprocess Entry :keywords: lang-en omnigraph node internal nodes render-post-process-entry Render Postprocess Entry ======================== .. <description> Entry point for 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 "cudaMipmappedArray (*outputs:cudaMipmappedArray*)", "``uint64``", "Pointer to the CUDA Mipmapped Array", "None" "format (*outputs:format*)", "``uint64``", "Format", "None" "height (*outputs:height*)", "``uint``", "Height", "None" "hydraTime (*outputs:hydraTime*)", "``double``", "Hydra time in stage", "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.RenderPostProcessEntry" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Render Postprocess Entry" "hidden", "true" "Categories", "internal" "Generated Class Name", "OgnRenderPostprocessEntryDatabase" "Python Module", "omni.graph.nodes"
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"
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"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMagnitude.rst
.. _omni_graph_nodes_Magnitude_1: .. _omni_graph_nodes_Magnitude: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Magnitude :keywords: lang-en omnigraph node math:operator threadsafe nodes magnitude Magnitude ========= .. <description> Compute the magnitude of a vector, array of vectors, or a scalar If a scalar is passed in, the absolute value will be returned If an array of vectors are passed in, the output will be an array of corresponding magnitudes .. </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:input", "``['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[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', '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[]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The vector(s) or scalar to take the magnitude of", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "outputs:magnitude", "``['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[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', '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[]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The resulting magnitude(s)", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Magnitude" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "tags", "absolute" "uiName", "Magnitude" "Categories", "math:operator" "Generated Class Name", "OgnMagnitudeDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnSetMatrix4Quaternion.rst
.. _omni_graph_nodes_SetMatrix4Quaternion_1: .. _omni_graph_nodes_SetMatrix4Quaternion: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Set Rotation Quaternion :keywords: lang-en omnigraph node math:operator threadsafe nodes set-matrix4-quaternion Set Rotation Quaternion ======================= .. <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:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The matrix to be modified", "None" "Quaternion (*inputs:quaternion*)", "``['quatd[4]', 'quatd[4][]']``", "The quaternion 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.SetMatrix4Quaternion" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Set Rotation Quaternion" "Categories", "math:operator" "Generated Class Name", "OgnSetMatrix4QuaternionDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantFloat2.rst
.. _omni_graph_nodes_ConstantFloat2_1: .. _omni_graph_nodes_ConstantFloat2: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Float2 :keywords: lang-en omnigraph node constants nodes constant-float2 Constant Float2 =============== .. <description> Holds a 2-component float constant. .. </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*)", "``float[2]``", "The constant value", "[0.0, 0.0]" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantFloat2" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantFloat2Database" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnCurveTubePositions.rst
.. _omni_graph_nodes_CurveTubePositions_1: .. _omni_graph_nodes_CurveTubePositions: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Curve Tube Positions :keywords: lang-en omnigraph node geometry:generator threadsafe nodes curve-tube-positions Curve Tube Positions ==================== .. <description> Generate tube positions from a curve description .. </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 "Columns (*inputs:cols*)", "``int[]``", "Columns of the tubes", "[]" "Curve Points (*inputs:curvePoints*)", "``float[3][]``", "Points on the curve to be framed", "[]" "Curve Vertex Counts (*inputs:curveVertexCounts*)", "``int[]``", "Vertex counts for the curve points", "[]" "Curve Vertex Starts (*inputs:curveVertexStarts*)", "``int[]``", "Vertex starting points", "[]" "Out Vectors (*inputs:out*)", "``float[3][]``", "Out vector directions on the tube", "[]" "Tube Point Starts (*inputs:tubePointStarts*)", "``int[]``", "Tube starting point index values", "[]" "Up Vectors (*inputs:up*)", "``float[3][]``", "Up vectors on the tube", "[]" "Tube Widths (*inputs:width*)", "``float[]``", "Width of tube positions", "[]" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Points (*outputs:points*)", "``float[3][]``", "Points on the tube", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.CurveTubePositions" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Curve Tube Positions" "Categories", "geometry:generator" "Generated Class Name", "OgnCurveTubePositionsDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnMakeVector4.rst
.. _omni_graph_nodes_MakeVector4_1: .. _omni_graph_nodes_MakeVector4: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Make 4-Vector :keywords: lang-en omnigraph node math:conversion threadsafe nodes make-vector4 Make 4-Vector ============= .. <description> Merge 4 input values into a single output vector. If the inputs are arrays, the output will be an array of vectors. .. </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 "W (*inputs:w*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'int', 'int[]']``", "The fourth component of the vector", "None" "X (*inputs:x*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'int', 'int[]']``", "The first component of the vector", "None" "Y (*inputs:y*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'int', 'int[]']``", "The second component of the vector", "None" "Z (*inputs:z*)", "``['double', 'double[]', 'float', 'float[]', 'half', 'half[]', 'int', 'int[]']``", "The third component of the vector", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Vector (*outputs:tuple*)", "``['double[4]', 'double[4][]', 'float[4]', 'float[4][]', 'half[4]', 'half[4][]', 'int[4]', 'int[4][]']``", "Output 4-vector", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.MakeVector4" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "tags", "compose,combine,join" "uiName", "Make 4-Vector" "Categories", "math:conversion" "Generated Class Name", "OgnMakeVector4Database" "Python Module", "omni.graph.nodes"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnSubtract.rst
.. _omni_graph_nodes_Subtract_2: .. _omni_graph_nodes_Subtract: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Subtract :keywords: lang-en omnigraph node math:operator threadsafe nodes subtract Subtract ======== .. <description> Subtracts from the first input the following inputs. The inputs can be of any numeric 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 "A (*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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The number B is subtracted from", "None" "B (*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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "The number to subtract from A", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Difference (*outputs:difference*)", "``['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[]', 'frame[4]', 'frame[4][]', 'half', 'half[2]', 'half[2][]', 'half[3]', 'half[3][]', 'half[4]', 'half[4][]', 'half[]', 'int', 'int64', 'int64[]', 'int[2]', 'int[2][]', 'int[3]', 'int[3][]', 'int[4]', 'int[4][]', 'int[]', 'matrixd[3]', 'matrixd[3][]', 'matrixd[4]', 'matrixd[4][]', '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[]', 'transform[4]', 'transform[4][]', 'uchar', 'uchar[]', 'uint', 'uint64', 'uint64[]', 'uint[]', 'vectord[3]', 'vectord[3][]', 'vectorf[3]', 'vectorf[3][]', 'vectorh[3]', 'vectorh[3][]']``", "Result of A-B", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.Subtract" "Version", "2" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Subtract" "Categories", "math:operator" "Generated Class Name", "OgnSubtractDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnNor.rst
.. _omni_graph_nodes_BooleanNor_2: .. _omni_graph_nodes_BooleanNor: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Boolean NOR :keywords: lang-en omnigraph node math:condition threadsafe nodes boolean-nor Boolean NOR =========== .. <description> Boolean NOR on two or more inputs. If the inputs are arrays, NOR operations will be performed pair-wise. The input sizes must match. If only one input is an array, the other input will be broadcast to the size of the array. Returns an array of booleans if either input is an array, otherwise returning a boolean. .. </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', 'bool[]']``", "Input A: bool or bool array.", "None" "inputs:b", "``['bool', 'bool[]']``", "Input B: bool or bool array.", "None" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "Result (*outputs:result*)", "``['bool', 'bool[]']``", "The result of the boolean NOR - an array of booleans if either input is an array, otherwise a boolean.", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.BooleanNor" "Version", "2" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Boolean NOR" "Categories", "math:condition" "Generated Class Name", "OgnNorDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnConstantDouble.rst
.. _omni_graph_nodes_ConstantDouble_1: .. _omni_graph_nodes_ConstantDouble: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Constant Double :keywords: lang-en omnigraph node constants nodes constant-double Constant Double =============== .. <description> Holds a 64 bit floating point 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*)", "``double``", "The constant value", "0.0" "", "*outputOnly*", "1", "" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.ConstantDouble" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "Categories", "constants" "Generated Class Name", "OgnConstantDoubleDatabase" "Python Module", "omni.graph.nodes"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnRandomGaussian.rst
.. _omni_graph_nodes_RandomGaussian_1: .. _omni_graph_nodes_RandomGaussian: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Random Gaussian :keywords: lang-en omnigraph node math:operator threadsafe nodes random-gaussian Random Gaussian =============== .. <description> Generates a random numeric value using a Gaussian (aka normal) distribution. The shape can be controlled with two inputs: mean and standard deviation. These inputs can be numbers, vectors, tuples or arrays of these. If one input has a higher dimension than the other, then the input with lower dimension will be repeated to match the dimension of the other input (broadcasting). .. </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 to output a new random value", "None" "Is noise function (*inputs:isNoise*)", "``bool``", "Turn this node into a noise generator function For a given seed, it will then always output the same number(s)", "False" "", "*hidden*", "true", "" "", "*literalOnly*", "1", "" "Mean (*inputs:mean*)", "``['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][]']``", "The mean of the normal distribution. Can be a number, vector, tuple, or array of these. The default value is double 0.", "None" "Seed (*inputs:seed*)", "``uint64``", "The seed of the random generator.", "None" "Standard Deviation (*inputs:stdev*)", "``['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][]']``", "The standard deviation of the normal distribution. Can be a number, vector, tuple, or array of these. The default value is double 1.", "None" "Use log-normal (*inputs:useLog*)", "``bool``", "Use a log-normal distribution instead", "False" "Use seed (*inputs:useSeed*)", "``bool``", "Use the custom seed instead of a random one", "False" Outputs ------- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "outputs:execOut", "``execution``", "The output execution port", "None" "Random Gaussian (*outputs:random*)", "``['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][]']``", "The random Gaussian value that was generated", "None" State ----- .. csv-table:: :header: "Name", "Type", "Descripton", "Default" :widths: 20, 20, 50, 10 "state:gen", "``matrixd[3]``", "Random number generator internal state (abusing matrix3d because it is large enough)", "None" Metadata -------- .. csv-table:: :header: "Name", "Value" :widths: 30,70 "Unique ID", "omni.graph.nodes.RandomGaussian" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "True" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Random Gaussian" "Categories", "math:operator" "Generated Class Name", "OgnRandomGaussianDatabase" "Python Module", "omni.graph.nodes"
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"
omniverse-code/kit/exts/omni.graph.nodes/ogn/docs/OgnSetMatrix4Translation.rst
.. _omni_graph_nodes_SetMatrix4Translation_1: .. _omni_graph_nodes_SetMatrix4Translation: .. ================================================================================ .. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT. .. ================================================================================ :orphan: .. meta:: :title: Set Translation :keywords: lang-en omnigraph node math:operator threadsafe nodes set-matrix4-translation Set Translation =============== .. <description> Sets the translation of the given matrix4d value which represents a linear transformation. Does not modify the orientation (row 0-2) 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:matrix", "``['matrixd[4]', 'matrixd[4][]']``", "The matrix to be modified", "None" "Translation (*inputs:translation*)", "``['vectord[3]', 'vectord[3][]']``", "The translation that the matrix will apply", "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.SetMatrix4Translation" "Version", "1" "Extension", "omni.graph.nodes" "Has State?", "False" "Implementation Language", "C++" "Default Memory Type", "cpu" "Generated Code Exclusions", "None" "uiName", "Set Translation" "Categories", "math:operator" "Generated Class Name", "OgnSetMatrix4TranslationDatabase" "Python Module", "omni.graph.nodes"
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"
omniverse-code/kit/exts/omni.graph.nodes/PACKAGE-LICENSES/omni.graph.nodes-LICENSE.md
Copyright (c) 2020, NVIDIA CORPORATION. All rights reserved. NVIDIA CORPORATION and its licensors retain all intellectual property and proprietary rights in and to this software, related documentation and any modifications thereto. Any use, reproduction, disclosure or distribution of this software and related documentation without an express license agreement from NVIDIA CORPORATION is strictly prohibited.
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", ]
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/__init__.py
"""There is no public API to this module.""" __all__ = [] from ._impl.extension import _PublicExtension # noqa: F401
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantHalf4Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantHalf4 Holds a 4-component half constant. """ 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 OgnConstantHalf4Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantHalf4 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'half4', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0.0, 0.0, 0.0, 0.0], 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 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) 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 = { } 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 = OgnConstantHalf4Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantHalf4Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantHalf4Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnAndDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.BooleanAnd Boolean AND on two or more inputs. If the inputs are arrays, AND operations will be performed pair-wise. The input sizes must match. If only one input is an array, the other input will be broadcast to the size of the array. Returns an array of booleans if either input is an array, otherwise returning a boolean. """ 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 OgnAndDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.BooleanAnd 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', 'bool,bool[]', 1, None, 'Input A: bool or bool array.', {}, True, None, False, ''), ('inputs:b', 'bool,bool[]', 1, None, 'Input B: bool or bool array.', {}, True, None, False, ''), ('outputs:result', 'bool,bool[]', 1, 'Result', 'The result of the boolean AND - an array of booleans if either input is an array, otherwise a boolean.', {}, 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 = OgnAndDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnAndDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnAndDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnEndsWithDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.EndsWith Determines if a string ends with a given string value """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnEndsWithDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.EndsWith Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.suffix inputs.value Outputs: outputs.isSuffix """ # 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:suffix', 'string', 0, None, 'The suffix to test', {}, True, "", False, ''), ('inputs:value', 'string', 0, None, 'The string to check', {}, True, "", False, ''), ('outputs:isSuffix', 'bool', 0, None, "True if 'value' ends with 'suffix'", {}, 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.suffix = og.AttributeRole.TEXT role_data.inputs.value = 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 suffix(self): data_view = og.AttributeValueHelper(self._attributes.suffix) return data_view.get() @suffix.setter def suffix(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.suffix) data_view = og.AttributeValueHelper(self._attributes.suffix) data_view.set(value) self.suffix_size = data_view.get_array_size() @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 isSuffix(self): data_view = og.AttributeValueHelper(self._attributes.isSuffix) return data_view.get() @isSuffix.setter def isSuffix(self, value): data_view = og.AttributeValueHelper(self._attributes.isSuffix) 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 = OgnEndsWithDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnEndsWithDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnEndsWithDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnInvertMatrixDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.OgnInvertMatrix Invert a matrix or an array of matrices. Returns the FLOAT_MAX * identity if the matrix is singular """ 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 OgnInvertMatrixDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.OgnInvertMatrix Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.matrix Outputs: outputs.invertedMatrix """ # 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:matrix', 'matrixd[3],matrixd[3][],matrixd[4],matrixd[4][]', 1, None, 'The input matrix or matrices to invert', {}, True, None, False, ''), ('outputs:invertedMatrix', 'matrixd[3],matrixd[3][],matrixd[4],matrixd[4][]', 1, None, 'the resulting inverted matrix or matrices', {}, 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 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 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 invertedMatrix(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.invertedMatrix""" return og.RuntimeAttribute(self._attributes.invertedMatrix.get_attribute_data(), self._context, False) @invertedMatrix.setter def invertedMatrix(self, value_to_set: Any): """Assign another attribute's value to outputs.invertedMatrix""" if isinstance(value_to_set, og.RuntimeAttribute): self.invertedMatrix.value = value_to_set.value else: self.invertedMatrix.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 = OgnInvertMatrixDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnInvertMatrixDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnInvertMatrixDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnNthRootDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.NthRoot Computes the nth root of value. The result is the same type as the input value if the numerator is a decimal type. Otherwise the result is a double. If the input is a vector or matrix, then the node will calculate the square root of each element , and output a vector or matrix of the same size. Note that there are combinations of inputs that can result in a loss of precision due to different value ranges. Taking roots of a negative number will give a result of NaN except for cube root. """ 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 OgnNthRootDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.NthRoot Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.nthRoot inputs.value 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:nthRoot', 'int', 0, 'Nth Root', 'Take the nth root', {ogn.MetadataKeys.DEFAULT: '2'}, True, 2, False, ''), ('inputs:value', '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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'Value', 'The input 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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'Result', 'Result of square root', {}, 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 nthRoot(self): data_view = og.AttributeValueHelper(self._attributes.nthRoot) return data_view.get() @nthRoot.setter def nthRoot(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.nthRoot) data_view = og.AttributeValueHelper(self._attributes.nthRoot) 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 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 = OgnNthRootDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnNthRootDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnNthRootDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetMatrix4QuaternionDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.GetMatrix4Quaternion Gets the rotation of the given matrix4d value which represents a linear transformation. Returns a quaternion """ 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 OgnGetMatrix4QuaternionDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetMatrix4Quaternion Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.matrix Outputs: outputs.quaternion """ # 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:matrix', 'matrixd[4],matrixd[4][]', 1, None, 'The transformation matrix', {}, True, None, False, ''), ('outputs:quaternion', 'quatd[4],quatd[4][]', 1, None, 'quaternion representing the orientation of the matrix transformation', {}, 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 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 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 quaternion(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.quaternion""" return og.RuntimeAttribute(self._attributes.quaternion.get_attribute_data(), self._context, False) @quaternion.setter def quaternion(self, value_to_set: Any): """Assign another attribute's value to outputs.quaternion""" if isinstance(value_to_set, og.RuntimeAttribute): self.quaternion.value = value_to_set.value else: self.quaternion.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 = OgnGetMatrix4QuaternionDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnGetMatrix4QuaternionDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnGetMatrix4QuaternionDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnToDoubleDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ToDouble Converts the given input to 64 bit double. The node will attempt to convert array and tuple inputs to doubles of the same shape """ 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 OgnToDoubleDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ToDouble 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', 'bool,bool[],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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'value', 'The numeric value to convert to double', {}, True, None, False, ''), ('outputs:converted', 'double,double[2],double[2][],double[3],double[3][],double[4],double[4][],double[]', 1, 'Double', 'Output double-based value', {}, 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 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 converted(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.converted""" return og.RuntimeAttribute(self._attributes.converted.get_attribute_data(), self._context, False) @converted.setter def converted(self, value_to_set: Any): """Assign another attribute's value to outputs.converted""" if isinstance(value_to_set, og.RuntimeAttribute): self.converted.value = value_to_set.value else: self.converted.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 = OgnToDoubleDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnToDoubleDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnToDoubleDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantFloatDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantFloat Holds a 32 bit floating point value """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnConstantFloatDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantFloat Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'float', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, 0.0, 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 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) 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 = { } 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 = OgnConstantFloatDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantFloatDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantFloatDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnAnyZeroDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.AnyZero Outputs a boolean indicating if any of the input values are zero within a specified tolerance. """ 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 OgnAnyZeroDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.AnyZero Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.tolerance inputs.value 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:tolerance', 'double', 0, 'Tolerance', 'How close the value must be to 0 to be considered "zero".', {}, True, 0.0, False, ''), ('inputs:value', '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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, 'Value', 'Value(s) to check for zero.', {}, True, None, False, ''), ('outputs:result', 'bool', 0, 'Result', "If 'value' is a scalar then 'result' will be true if 'value' is zero. If 'value' is non-scalar\n(array, tuple, matrix, etc) then 'result' will be true if any of its elements are zero. If those\nelements are themselves non-scalar (e.g. an array of vectors) they will be considered zero only if\nall of the sub-elements are zero. For example, if 'value' is [3, 0, 1] then 'result' will be true\nbecause the second element is zero. But if 'value' is [[3, 0, 1], [-5, 4, 17]] then 'result' will\nbe false because neither of the two vectors is fully zero.", {}, 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 tolerance(self): data_view = og.AttributeValueHelper(self._attributes.tolerance) return data_view.get() @tolerance.setter def tolerance(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.tolerance) data_view = og.AttributeValueHelper(self._attributes.tolerance) 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 result(self): data_view = og.AttributeValueHelper(self._attributes.result) return data_view.get() @result.setter def result(self, value): data_view = og.AttributeValueHelper(self._attributes.result) 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 = OgnAnyZeroDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnAnyZeroDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnAnyZeroDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
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)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnStartsWithDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.StartsWith Determines if a string starts with a given string value """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnStartsWithDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.StartsWith Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.prefix inputs.value Outputs: outputs.isPrefix """ # 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:prefix', 'string', 0, None, 'The prefix to test', {}, True, "", False, ''), ('inputs:value', 'string', 0, None, 'The string to check', {}, True, "", False, ''), ('outputs:isPrefix', 'bool', 0, None, "True if 'value' starts with 'prefix'", {}, 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.prefix = og.AttributeRole.TEXT role_data.inputs.value = 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 prefix(self): data_view = og.AttributeValueHelper(self._attributes.prefix) return data_view.get() @prefix.setter def prefix(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.prefix) data_view = og.AttributeValueHelper(self._attributes.prefix) data_view.set(value) self.prefix_size = data_view.get_array_size() @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 isPrefix(self): data_view = og.AttributeValueHelper(self._attributes.isPrefix) return data_view.get() @isPrefix.setter def isPrefix(self, value): data_view = og.AttributeValueHelper(self._attributes.isPrefix) 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 = OgnStartsWithDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnStartsWithDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnStartsWithDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantDouble2Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantDouble2 Holds a 2-component double constant. """ 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 OgnConstantDouble2Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantDouble2 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'double2', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0.0, 0.0], 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 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) 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 = { } 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 = OgnConstantDouble2Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantDouble2Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantDouble2Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnBreakVector3Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.BreakVector3 Split vector into 3 component values. """ 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 OgnBreakVector3Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.BreakVector3 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.tuple Outputs: outputs.x outputs.y outputs.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:tuple', 'double[3],float[3],half[3],int[3]', 1, 'Vector', '3-vector to be broken', {}, True, None, False, ''), ('outputs:x', 'double,float,half,int', 1, 'X', 'The first component of the vector', {}, True, None, False, ''), ('outputs:y', 'double,float,half,int', 1, 'Y', 'The second component of the vector', {}, True, None, False, ''), ('outputs:z', 'double,float,half,int', 1, 'Z', 'The third component of the vector', {}, 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 tuple(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.tuple""" return og.RuntimeAttribute(self._attributes.tuple.get_attribute_data(), self._context, True) @tuple.setter def tuple(self, value_to_set: Any): """Assign another attribute's value to outputs.tuple""" if isinstance(value_to_set, og.RuntimeAttribute): self.tuple.value = value_to_set.value else: self.tuple.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 x(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.x""" return og.RuntimeAttribute(self._attributes.x.get_attribute_data(), self._context, False) @x.setter def x(self, value_to_set: Any): """Assign another attribute's value to outputs.x""" if isinstance(value_to_set, og.RuntimeAttribute): self.x.value = value_to_set.value else: self.x.value = value_to_set @property def y(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.y""" return og.RuntimeAttribute(self._attributes.y.get_attribute_data(), self._context, False) @y.setter def y(self, value_to_set: Any): """Assign another attribute's value to outputs.y""" if isinstance(value_to_set, og.RuntimeAttribute): self.y.value = value_to_set.value else: self.y.value = value_to_set @property def z(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.z""" return og.RuntimeAttribute(self._attributes.z.get_attribute_data(), self._context, False) @z.setter def z(self, value_to_set: Any): """Assign another attribute's value to outputs.z""" if isinstance(value_to_set, og.RuntimeAttribute): self.z.value = value_to_set.value else: self.z.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 = OgnBreakVector3Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnBreakVector3Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnBreakVector3Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnHasVariantSetDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.HasVariantSet Query the existence of a variantSet on a prim """ import carb 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 OgnHasVariantSetDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.HasVariantSet Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.prim inputs.variantSetName Outputs: outputs.exists """ # 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 with the variantSet', {}, True, [], False, ''), ('inputs:variantSetName', 'token', 0, None, 'The variantSet name', {}, True, "", False, ''), ('outputs:exists', 'bool', 0, None, 'Variant exists', {}, 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 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 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._batchedWriteValues = { } @property def exists(self): data_view = og.AttributeValueHelper(self._attributes.exists) return data_view.get() @exists.setter def exists(self, value): data_view = og.AttributeValueHelper(self._attributes.exists) 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 = OgnHasVariantSetDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnHasVariantSetDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnHasVariantSetDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnNegateDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Negate Computes the result of multiplying a vector, scalar, or array of vectors or scalars by -1. The input must not be unsigned. """ 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 OgnNegateDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Negate Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.input Outputs: outputs.output """ # 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:input', '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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The vector(s) or scalar(s) to negate', {}, True, None, False, ''), ('outputs:output', '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[],frame[4],frame[4][],half,half[2],half[2][],half[3],half[3][],half[4],half[4][],half[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],matrixd[3],matrixd[3][],matrixd[4],matrixd[4][],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[],transform[4],transform[4][],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The resulting negated value(s)', {}, 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 input(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.input""" return og.RuntimeAttribute(self._attributes.input.get_attribute_data(), self._context, True) @input.setter def input(self, value_to_set: Any): """Assign another attribute's value to outputs.input""" if isinstance(value_to_set, og.RuntimeAttribute): self.input.value = value_to_set.value else: self.input.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 output(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.output""" return og.RuntimeAttribute(self._attributes.output.get_attribute_data(), self._context, False) @output.setter def output(self, value_to_set: Any): """Assign another attribute's value to outputs.output""" if isinstance(value_to_set, og.RuntimeAttribute): self.output.value = value_to_set.value else: self.output.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 = OgnNegateDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnNegateDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnNegateDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnXorDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.BooleanXor Boolean XOR on two inputs. If a and b are arrays, XOR operations will be performed pair-wise. Sizes of a and b must match. If only one input is an array, the other input will be broadcast to the size of the array. Returns an array of booleans if either input is an array, otherwise returning a boolean. """ 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 OgnXorDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.BooleanXor 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', 'bool,bool[]', 1, None, 'Input A: bool or bool array.', {}, True, None, False, ''), ('inputs:b', 'bool,bool[]', 1, None, 'Input B: bool or bool array.', {}, True, None, False, ''), ('outputs:result', 'bool,bool[]', 1, 'Result', 'The result of the boolean XOR - an array of booleans if either input is an array, otherwise a boolean.', {}, 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 = OgnXorDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnXorDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnXorDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnArrayFindValueDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ArrayFindValue Searches for a value in an array, returns the index of the first occurrence of the value, or -1 if not found. """ 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 OgnArrayFindValueDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ArrayFindValue Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.array inputs.value Outputs: outputs.index """ # 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 searched', {}, True, None, 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 be found', {}, True, None, False, ''), ('outputs:index', 'int', 0, 'Index', 'The index of the first occurrence of value, or -1 if not found', {}, 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 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 index(self): data_view = og.AttributeValueHelper(self._attributes.index) return data_view.get() @index.setter def index(self, value): data_view = og.AttributeValueHelper(self._attributes.index) 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 = OgnArrayFindValueDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnArrayFindValueDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnArrayFindValueDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnRoundDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Round Round a decimal input to the given number of decimals. Accepts float, double, half, or arrays / tuples of the aformentioned types """ 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 OgnRoundDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Round Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.decimals inputs.input Outputs: outputs.output """ # 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:decimals', 'int', 0, 'Decimals', 'The number of decimal places to round to. Negative numbers specify the number of positions left of the decimal', {}, True, 0, False, ''), ('inputs:input', '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, 'Input', 'The input data to round', {}, True, None, False, ''), ('outputs:output', '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, 'Output', 'The resultant rounded numbers', {}, 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 decimals(self): data_view = og.AttributeValueHelper(self._attributes.decimals) return data_view.get() @decimals.setter def decimals(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.decimals) data_view = og.AttributeValueHelper(self._attributes.decimals) data_view.set(value) @property def input(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.input""" return og.RuntimeAttribute(self._attributes.input.get_attribute_data(), self._context, True) @input.setter def input(self, value_to_set: Any): """Assign another attribute's value to outputs.input""" if isinstance(value_to_set, og.RuntimeAttribute): self.input.value = value_to_set.value else: self.input.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 output(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.output""" return og.RuntimeAttribute(self._attributes.output.get_attribute_data(), self._context, False) @output.setter def output(self, value_to_set: Any): """Assign another attribute's value to outputs.output""" if isinstance(value_to_set, og.RuntimeAttribute): self.output.value = value_to_set.value else: self.output.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 = OgnRoundDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnRoundDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnRoundDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnAsinDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Asin Trigonometric operation arcsin of one input in degrees. """ 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 OgnAsinDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Asin Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.value 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:value', 'double,double[],float,float[],half,half[],timecode', 1, None, 'Angle value in degrees whose inverse sine is to be found', {}, True, None, False, ''), ('outputs:value', 'double,double[],float,float[],half,half[],timecode', 1, 'Result', 'The arcsin value of the input angle in degrees', {}, 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 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 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 = OgnAsinDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnAsinDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnAsinDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnExtractBundleDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ExtractBundle 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 """ 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 OgnExtractBundleDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ExtractBundle Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.bundle Outputs: outputs.passThrough """ # 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, ''), ('outputs:passThrough', 'bundle', 0, None, 'The input bundle passed as-is', {}, 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.outputs.passThrough = 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 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 passThrough(self) -> og.BundleContents: """Get the bundle wrapper class for the attribute outputs.passThrough""" return self.__bundles.passThrough @passThrough.setter def passThrough(self, bundle: og.BundleContents): """Overwrite the bundle attribute outputs.passThrough 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.passThrough.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 = OgnExtractBundleDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnExtractBundleDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnExtractBundleDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantDouble4Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantDouble4 Holds a 4-component double constant. """ 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 OgnConstantDouble4Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantDouble4 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'double4', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0.0, 0.0, 0.0, 0.0], 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 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) 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 = { } 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 = OgnConstantDouble4Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantDouble4Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantDouble4Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantInt4Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantInt4 Holds a 4-component int constant. """ 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 OgnConstantInt4Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantInt4 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'int4', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0, 0, 0, 0], 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 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) 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 = { } 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 = OgnConstantInt4Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantInt4Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantInt4Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantTokenDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantToken Holds a token value, which is a 64-bit value representing an interned string """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnConstantTokenDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantToken Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'token', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, 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 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) 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 = { } 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 = OgnConstantTokenDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantTokenDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantTokenDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantDouble3Database.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantDouble3 Holds a 3-component double constant. """ 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 OgnConstantDouble3Database(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantDouble3 Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'double3', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0.0, 0.0, 0.0], 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 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) 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 = { } 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 = OgnConstantDouble3Database.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantDouble3Database.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantDouble3Database.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantUCharDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantUChar Holds an 8-bit unsigned character value """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnConstantUCharDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantUChar Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'uchar', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, 0, 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 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) 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 = { } 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 = OgnConstantUCharDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantUCharDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantUCharDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnGetParentPrimsDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.GetParentPrims Generates parent paths from one or more targeted paths (ex. /World/Cube -> /World) """ 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 OgnGetParentPrimsDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.GetParentPrims Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.prims Outputs: outputs.parentPrims """ # 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:prims', 'target', 0, None, 'Input prim paths (ex. /World/Cube)', {ogn.MetadataKeys.ALLOW_MULTI_INPUTS: '1'}, True, [], False, ''), ('outputs:parentPrims', 'target', 0, None, 'Computed parent paths (ex. /World)', {}, 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.prims = og.AttributeRole.TARGET role_data.outputs.parentPrims = 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 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() 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.parentPrims_size = None self._batchedWriteValues = { } @property def parentPrims(self): data_view = og.AttributeValueHelper(self._attributes.parentPrims) return data_view.get(reserved_element_count=self.parentPrims_size) @parentPrims.setter def parentPrims(self, value): data_view = og.AttributeValueHelper(self._attributes.parentPrims) data_view.set(value) self.parentPrims_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 = OgnGetParentPrimsDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnGetParentPrimsDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnGetParentPrimsDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnRemoveAttrDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.RemoveAttribute Copies all attributes from an input bundle to the output bundle, except for any specified to be removed. """ 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 OgnRemoveAttrDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.RemoveAttribute Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.allowRemovePrimInternal inputs.attrNamesToRemove inputs.data 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:allowRemovePrimInternal', 'bool', 0, 'Allow Remove Prim Internal', "When on, then primitive internal attributes can be removed('sourcePrimPath' etc...)", {ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''), ('inputs:attrNamesToRemove', 'token', 0, 'Attributes To Remove', "A list of wildcard patterns used to match the attribute names that are to be removed from the output bundle\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:data', 'bundle', 0, 'Original Bundle', 'Collection of attributes to be partially copied to the output', {}, True, None, False, ''), ('outputs:data', 'bundle', 0, 'Bundle After Removal', 'Final bundle of attributes, with the attributes specified by attrNamesToRemove omitted', {}, 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 allowRemovePrimInternal(self): data_view = og.AttributeValueHelper(self._attributes.allowRemovePrimInternal) return data_view.get() @allowRemovePrimInternal.setter def allowRemovePrimInternal(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.allowRemovePrimInternal) data_view = og.AttributeValueHelper(self._attributes.allowRemovePrimInternal) data_view.set(value) @property def attrNamesToRemove(self): data_view = og.AttributeValueHelper(self._attributes.attrNamesToRemove) return data_view.get() @attrNamesToRemove.setter def attrNamesToRemove(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.attrNamesToRemove) data_view = og.AttributeValueHelper(self._attributes.attrNamesToRemove) data_view.set(value) @property def data(self) -> og.BundleContents: """Get the bundle wrapper class for the attribute inputs.data""" return self.__bundles.data 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 = OgnRemoveAttrDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnRemoveAttrDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnRemoveAttrDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantTexCoord3fDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantTexCoord3f Holds a 3D uvw texture coordinate. """ 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 OgnConstantTexCoord3fDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantTexCoord3f Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'texCoord3f', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, True, [0.0, 0.0, 0.0], 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.value = og.AttributeRole.TEXCOORD 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): 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) 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 = { } 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 = OgnConstantTexCoord3fDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantTexCoord3fDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantTexCoord3fDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnNorDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.BooleanNor Boolean NOR on two or more inputs. If the inputs are arrays, NOR operations will be performed pair-wise. The input sizes must match. If only one input is an array, the other input will be broadcast to the size of the array. Returns an array of booleans if either input is an array, otherwise returning a boolean. """ 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 OgnNorDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.BooleanNor 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', 'bool,bool[]', 1, None, 'Input A: bool or bool array.', {}, True, None, False, ''), ('inputs:b', 'bool,bool[]', 1, None, 'Input B: bool or bool array.', {}, True, None, False, ''), ('outputs:result', 'bool,bool[]', 1, 'Result', 'The result of the boolean NOR - an array of booleans if either input is an array, otherwise a boolean.', {}, 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 = OgnNorDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnNorDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnNorDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnMagnitudeDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Magnitude Compute the magnitude of a vector, array of vectors, or a scalar If a scalar is passed in, the absolute value will be returned If an array of vectors are passed in, the output will be an array of corresponding magnitudes """ 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 OgnMagnitudeDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Magnitude Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.input Outputs: outputs.magnitude """ # 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:input', '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[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],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[],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The vector(s) or scalar to take the magnitude of', {}, True, None, False, ''), ('outputs:magnitude', '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[],int,int64,int64[],int[2],int[2][],int[3],int[3][],int[4],int[4][],int[],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[],uchar,uchar[],uint,uint64,uint64[],uint[],vectord[3],vectord[3][],vectorf[3],vectorf[3][],vectorh[3],vectorh[3][]', 1, None, 'The resulting magnitude(s)', {}, 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 input(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.input""" return og.RuntimeAttribute(self._attributes.input.get_attribute_data(), self._context, True) @input.setter def input(self, value_to_set: Any): """Assign another attribute's value to outputs.input""" if isinstance(value_to_set, og.RuntimeAttribute): self.input.value = value_to_set.value else: self.input.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 magnitude(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute outputs.magnitude""" return og.RuntimeAttribute(self._attributes.magnitude.get_attribute_data(), self._context, False) @magnitude.setter def magnitude(self, value_to_set: Any): """Assign another attribute's value to outputs.magnitude""" if isinstance(value_to_set, og.RuntimeAttribute): self.magnitude.value = value_to_set.value else: self.magnitude.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 = OgnMagnitudeDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnMagnitudeDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnMagnitudeDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnAcosDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Acos Trigonometric operation arccosine of one input in degrees. """ 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 OgnAcosDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Acos Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.value 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:value', 'double,double[],float,float[],half,half[],timecode', 1, None, 'Angle value in degrees whose inverse cosine is to be found', {}, True, None, False, ''), ('outputs:value', 'double,double[],float,float[],half,half[],timecode', 1, 'Result', 'The arccos value of the input angle in degrees', {}, 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 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 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 = OgnAcosDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnAcosDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnAcosDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnSetMatrix4TranslationDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.SetMatrix4Translation Sets the translation of the given matrix4d value which represents a linear transformation. Does not modify the orientation (row 0-2) 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 OgnSetMatrix4TranslationDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.SetMatrix4Translation Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.matrix inputs.translation Outputs: outputs.matrix """ # 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:matrix', 'matrixd[4],matrixd[4][]', 1, None, 'The matrix to be modified', {}, True, None, False, ''), ('inputs:translation', 'vectord[3],vectord[3][]', 1, 'Translation', 'The translation that the matrix will apply', {}, True, None, False, ''), ('outputs:matrix', 'matrixd[4],matrixd[4][]', 1, None, 'The updated matrix', {}, 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 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 translation(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.translation""" return og.RuntimeAttribute(self._attributes.translation.get_attribute_data(), self._context, True) @translation.setter def translation(self, value_to_set: Any): """Assign another attribute's value to outputs.translation""" if isinstance(value_to_set, og.RuntimeAttribute): self.translation.value = value_to_set.value else: self.translation.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 = OgnSetMatrix4TranslationDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnSetMatrix4TranslationDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnSetMatrix4TranslationDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnNormalizeDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.Normalize Normalize the input vector. If the input vector has a magnitude of zero, the null vector is returned. """ 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 OgnNormalizeDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.Normalize Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.vector 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: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][]', 1, 'Vector', 'Vector to normalize', {}, True, None, False, ''), ('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][]', 1, 'Result', 'Normalized vector', {}, 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 vector(self) -> og.RuntimeAttribute: """Get the runtime wrapper class for the attribute inputs.vector""" return og.RuntimeAttribute(self._attributes.vector.get_attribute_data(), self._context, True) @vector.setter def vector(self, value_to_set: Any): """Assign another attribute's value to outputs.vector""" if isinstance(value_to_set, og.RuntimeAttribute): self.vector.value = value_to_set.value else: self.vector.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 = OgnNormalizeDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnNormalizeDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnNormalizeDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnArrayResizeDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ArrayResize Resizes an array. If the new size is larger, zeroed values will be added to the end. """ 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 OgnArrayResizeDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ArrayResize Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.array inputs.newSize 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:newSize', 'int', 0, None, 'The new size of the array, negative values are treated as size of 0', {}, True, 0, 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 newSize(self): data_view = og.AttributeValueHelper(self._attributes.newSize) return data_view.get() @newSize.setter def newSize(self, value): if self._setting_locked: raise og.ReadOnlyError(self._attributes.newSize) data_view = og.AttributeValueHelper(self._attributes.newSize) 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 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 = OgnArrayResizeDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnArrayResizeDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnArrayResizeDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
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)
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)
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")
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)
omniverse-code/kit/exts/omni.graph.nodes/omni/graph/nodes/ogn/OgnConstantPathDatabase.py
"""Support for simplified access to data on nodes of type omni.graph.nodes.ConstantPath Holds a path constant value """ import omni.graph.core as og import omni.graph.core._omni_graph_core as _og import omni.graph.tools.ogn as ogn class OgnConstantPathDatabase(og.Database): """Helper class providing simplified access to data on nodes of type omni.graph.nodes.ConstantPath Class Members: node: Node being evaluated Attribute Value Properties: Inputs: inputs.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:value', 'path', 0, 'Value', 'The constant value', {ogn.MetadataKeys.OUTPUT_ONLY: '1'}, 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.value = 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 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 = { } 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 = OgnConstantPathDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT) self.outputs = OgnConstantPathDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes) dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE) self.state = OgnConstantPathDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)