.. _omni_graph_tutorials_DynamicAttributes_1:

.. _omni_graph_tutorials_DynamicAttributes:

.. ================================================================================
.. THIS PAGE IS AUTO-GENERATED. DO NOT MANUALLY EDIT.
.. ================================================================================

:orphan:

.. meta::
    :title: Tutorial Node: Dynamic Attributes
    :keywords: lang-en omnigraph node tutorials threadsafe tutorials dynamic-attributes


Tutorial Node: Dynamic Attributes
=================================

.. <description>

This is a C++ node that exercises the ability to add and remove database attribute accessors for dynamic attributes. When the dynamic attribute is added the property will exist and be able to get/set the attribute values. When it does not the property will not exist. The dynamic attribute names are found in the tokens below. If neither exist then the input value is copied to the output directly. If 'firstBit' exists then the 'firstBit'th bit of the input is x-ored for the copy. If 'secondBit' exists then the 'secondBit'th bit of the input is x-ored for the copy. (Recall bitwise match xor(0,0)=0, xor(0,1)=1, xor(1,0)=1, and xor(1,1)=0.) For example, if 'firstBit' is present and set to 1 then the bitmask will be b0010, where bit 1 is set. If the input is 7, or b0111, then the xor operation will flip bit 1, yielding b0101, or 5 as the result. If on the next run 'secondBit' is also present and set to 2 then its bitmask will be b0100, where bit 2 is set. The input of 7 (b0111) flips bit 1 because firstBit=1 and flips bit 2 because secondBit=2, yielding a final result of 1 (b0001).

.. </description>


Installation
------------

To use this node enable :ref:`omni.graph.tutorials<ext_omni_graph_tutorials>` in the Extension Manager.


Inputs
------
.. csv-table::
    :header: "Name", "Type", "Descripton", "Default"
    :widths: 20, 20, 50, 10

    "inputs:value", "``uint``", "Original value to be modified.", "0"


Outputs
-------
.. csv-table::
    :header: "Name", "Type", "Descripton", "Default"
    :widths: 20, 20, 50, 10

    "outputs:result", "``uint``", "Modified value", "None"


Metadata
--------
.. csv-table::
    :header: "Name", "Value"
    :widths: 30,70

    "Unique ID", "omni.graph.tutorials.DynamicAttributes"
    "Version", "1"
    "Extension", "omni.graph.tutorials"
    "Icon", "ogn/icons/omni.graph.tutorials.DynamicAttributes.svg"
    "Has State?", "False"
    "Implementation Language", "C++"
    "Default Memory Type", "cpu"
    "Generated Code Exclusions", "None"
    "uiName", "Tutorial Node: Dynamic Attributes"
    "__tokens", "{""firstBit"": ""inputs:firstBit"", ""secondBit"": ""inputs:secondBit"", ""invert"": ""inputs:invert""}"
    "Categories", "tutorials"
    "Generated Class Name", "OgnTutorialDynamicAttributesDatabase"
    "Python Module", "omni.graph.tutorials"

