.. _ogn_tutorial_abi_py:

Tutorial 12 - Python ABI Override Node
======================================

Although the .ogn format creates an easy-to-use interface to the ABI of the OmniGraph node and the associated
data model, there may be cases where you want to override the ABI to perform special processing.

OgnTutorialABIPy.ogn
--------------------
The *ogn* file shows the implementation of a node named "omni.graph.tutorials.AbiPy", in its first
version, with a simple description.

.. literalinclude:: ../../../../../source/extensions/omni.graph.tutorials/tutorials/tutorial12/OgnTutorialABIPy.ogn
    :linenos:
    :language: json

OgnTutorialABIPy.py
-------------------
The *py* file contains the implementation of the node class with every possible
ABI method replaced with customized processing. The node still functions the same as any other node, although it
is forced to write a lot of extra boilerplate code to do so.

.. literalinclude:: ../../../../../source/extensions/omni.graph.tutorials/tutorials/tutorial12/OgnTutorialABIPy.py
    :linenos:
    :language: python

Metadata Attached To Attributes
-------------------------------
This file introduces the *metadata* keyword to attributes, whose value is a dictionary of key/value pairs associated
with the attribute in which it appears that may be extracted using the ABI metadata functions. These are not persisted
in any files and so must be set either in the .ogn file or in an override of the **initialize()** method in the node
definition.
