OmniGraph Node omni.graph.tutorials.DynamicAttributes¶
omni.graph.tutorials.DynamicAttributes Properties¶
Name |
Value |
---|---|
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 |
omni.graph.tutorials.DynamicAttributes Description¶
This is a Python 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).
omni.graph.tutorials.DynamicAttributes Inputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
inputs:value |
uint |
0 |
Y |
Original value to be modified. |
omni.graph.tutorials.DynamicAttributes Outputs¶
Name |
Type |
Default |
Required? |
Descripton |
---|---|---|---|---|
outputs:result |
uint |
None |
Y |
Modified value |