"""Support for simplified access to data on nodes of type omni.graph.tutorials.RoleData

This is a tutorial node. It creates both an input and output attribute of every supported  role-based data type. The values
are modified in a simple way so that the compute modifies values. 
"""

import carb
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 OgnTutorialRoleDataDatabase(og.Database):
    """Helper class providing simplified access to data on nodes of type omni.graph.tutorials.RoleData

    Class Members:
        node: Node being evaluated

    Attribute Value Properties:
        Inputs:
            inputs.a_color3d
            inputs.a_color3f
            inputs.a_color3h
            inputs.a_color4d
            inputs.a_color4f
            inputs.a_color4h
            inputs.a_frame
            inputs.a_matrix2d
            inputs.a_matrix3d
            inputs.a_matrix4d
            inputs.a_normal3d
            inputs.a_normal3f
            inputs.a_normal3h
            inputs.a_point3d
            inputs.a_point3f
            inputs.a_point3h
            inputs.a_quatd
            inputs.a_quatf
            inputs.a_quath
            inputs.a_texcoord2d
            inputs.a_texcoord2f
            inputs.a_texcoord2h
            inputs.a_texcoord3d
            inputs.a_texcoord3f
            inputs.a_texcoord3h
            inputs.a_timecode
            inputs.a_vector3d
            inputs.a_vector3f
            inputs.a_vector3h
        Outputs:
            outputs.a_color3d
            outputs.a_color3f
            outputs.a_color3h
            outputs.a_color4d
            outputs.a_color4f
            outputs.a_color4h
            outputs.a_frame
            outputs.a_matrix2d
            outputs.a_matrix3d
            outputs.a_matrix4d
            outputs.a_normal3d
            outputs.a_normal3f
            outputs.a_normal3h
            outputs.a_point3d
            outputs.a_point3f
            outputs.a_point3h
            outputs.a_quatd
            outputs.a_quatf
            outputs.a_quath
            outputs.a_texcoord2d
            outputs.a_texcoord2f
            outputs.a_texcoord2h
            outputs.a_texcoord3d
            outputs.a_texcoord3f
            outputs.a_texcoord3h
            outputs.a_timecode
            outputs.a_vector3d
            outputs.a_vector3f
            outputs.a_vector3h
    """

    # 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_color3d', 'color3d', 0, None, 'This is an attribute interpreted as a double-precision 3d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_color3f', 'color3f', 0, None, 'This is an attribute interpreted as a single-precision 3d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_color3h', 'color3h', 0, None, 'This is an attribute interpreted as a half-precision 3d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_color4d', 'color4d', 0, None, 'This is an attribute interpreted as a double-precision 4d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_color4f', 'color4f', 0, None, 'This is an attribute interpreted as a single-precision 4d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_color4h', 'color4h', 0, None, 'This is an attribute interpreted as a half-precision 4d color', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_frame', 'frame4d', 0, None, 'This is an attribute interpreted as a coordinate frame', {ogn.MetadataKeys.DEFAULT: '[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]'}, True, [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]], False, ''),
        ('inputs:a_matrix2d', 'matrix2d', 0, None, 'This is an attribute interpreted as a double-precision 2d matrix', {ogn.MetadataKeys.DEFAULT: '[[1.0, 0.0], [0.0, 1.0]]'}, True, [[1.0, 0.0], [0.0, 1.0]], False, ''),
        ('inputs:a_matrix3d', 'matrix3d', 0, None, 'This is an attribute interpreted as a double-precision 3d matrix', {ogn.MetadataKeys.DEFAULT: '[[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]]'}, True, [[1.0, 0.0, 0.0], [0.0, 1.0, 0.0], [0.0, 0.0, 1.0]], False, ''),
        ('inputs:a_matrix4d', 'matrix4d', 0, None, 'This is an attribute interpreted as a double-precision 4d matrix', {ogn.MetadataKeys.DEFAULT: '[[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]]'}, True, [[1.0, 0.0, 0.0, 0.0], [0.0, 1.0, 0.0, 0.0], [0.0, 0.0, 1.0, 0.0], [0.0, 0.0, 0.0, 1.0]], False, ''),
        ('inputs:a_normal3d', 'normal3d', 0, None, 'This is an attribute interpreted as a double-precision 3d normal', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_normal3f', 'normal3f', 0, None, 'This is an attribute interpreted as a single-precision 3d normal', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_normal3h', 'normal3h', 0, None, 'This is an attribute interpreted as a half-precision 3d normal', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_point3d', 'point3d', 0, None, 'This is an attribute interpreted as a double-precision 3d point', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_point3f', 'point3f', 0, None, 'This is an attribute interpreted as a single-precision 3d point', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_point3h', 'point3h', 0, None, 'This is an attribute interpreted as a half-precision 3d point', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_quatd', 'quatd', 0, None, 'This is an attribute interpreted as a double-precision 4d quaternion', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_quatf', 'quatf', 0, None, 'This is an attribute interpreted as a single-precision 4d quaternion', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_quath', 'quath', 0, None, 'This is an attribute interpreted as a half-precision 4d quaternion', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0, 0.0], False, ''),
        ('inputs:a_texcoord2d', 'texCoord2d', 0, None, 'This is an attribute interpreted as a double-precision 2d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0]'}, True, [0.0, 0.0], False, ''),
        ('inputs:a_texcoord2f', 'texCoord2f', 0, None, 'This is an attribute interpreted as a single-precision 2d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0]'}, True, [0.0, 0.0], False, ''),
        ('inputs:a_texcoord2h', 'texCoord2h', 0, None, 'This is an attribute interpreted as a half-precision 2d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0]'}, True, [0.0, 0.0], False, ''),
        ('inputs:a_texcoord3d', 'texCoord3d', 0, None, 'This is an attribute interpreted as a double-precision 3d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_texcoord3f', 'texCoord3f', 0, None, 'This is an attribute interpreted as a single-precision 3d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_texcoord3h', 'texCoord3h', 0, None, 'This is an attribute interpreted as a half-precision 3d texcoord', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_timecode', 'timecode', 0, None, 'This is a computed attribute interpreted as a timecode', {ogn.MetadataKeys.DEFAULT: '1.0'}, True, 1.0, False, ''),
        ('inputs:a_vector3d', 'vector3d', 0, None, 'This is an attribute interpreted as a double-precision 3d vector', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_vector3f', 'vector3f', 0, None, 'This is an attribute interpreted as a single-precision 3d vector', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('inputs:a_vector3h', 'vector3h', 0, None, 'This is an attribute interpreted as a half-precision 3d vector', {ogn.MetadataKeys.DEFAULT: '[0.0, 0.0, 0.0]'}, True, [0.0, 0.0, 0.0], False, ''),
        ('outputs:a_color3d', 'color3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d color', {}, True, None, False, ''),
        ('outputs:a_color3f', 'color3f', 0, None, 'This is a computed attribute interpreted as a single-precision 3d color', {}, True, None, False, ''),
        ('outputs:a_color3h', 'color3h', 0, None, 'This is a computed attribute interpreted as a half-precision 3d color', {}, True, None, False, ''),
        ('outputs:a_color4d', 'color4d', 0, None, 'This is a computed attribute interpreted as a double-precision 4d color', {}, True, None, False, ''),
        ('outputs:a_color4f', 'color4f', 0, None, 'This is a computed attribute interpreted as a single-precision 4d color', {}, True, None, False, ''),
        ('outputs:a_color4h', 'color4h', 0, None, 'This is a computed attribute interpreted as a half-precision 4d color', {}, True, None, False, ''),
        ('outputs:a_frame', 'frame4d', 0, None, 'This is a computed attribute interpreted as a coordinate frame', {}, True, None, False, ''),
        ('outputs:a_matrix2d', 'matrix2d', 0, None, 'This is a computed attribute interpreted as a double-precision 2d matrix', {}, True, None, False, ''),
        ('outputs:a_matrix3d', 'matrix3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d matrix', {}, True, None, False, ''),
        ('outputs:a_matrix4d', 'matrix4d', 0, None, 'This is a computed attribute interpreted as a double-precision 4d matrix', {}, True, None, False, ''),
        ('outputs:a_normal3d', 'normal3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d normal', {}, True, None, False, ''),
        ('outputs:a_normal3f', 'normal3f', 0, None, 'This is a computed attribute interpreted as a single-precision 3d normal', {}, True, None, False, ''),
        ('outputs:a_normal3h', 'normal3h', 0, None, 'This is a computed attribute interpreted as a half-precision 3d normal', {}, True, None, False, ''),
        ('outputs:a_point3d', 'point3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d point', {}, True, None, False, ''),
        ('outputs:a_point3f', 'point3f', 0, None, 'This is a computed attribute interpreted as a single-precision 3d point', {}, True, None, False, ''),
        ('outputs:a_point3h', 'point3h', 0, None, 'This is a computed attribute interpreted as a half-precision 3d point', {}, True, None, False, ''),
        ('outputs:a_quatd', 'quatd', 0, None, 'This is a computed attribute interpreted as a double-precision 4d quaternion', {}, True, None, False, ''),
        ('outputs:a_quatf', 'quatf', 0, None, 'This is a computed attribute interpreted as a single-precision 4d quaternion', {}, True, None, False, ''),
        ('outputs:a_quath', 'quath', 0, None, 'This is a computed attribute interpreted as a half-precision 4d quaternion', {}, True, None, False, ''),
        ('outputs:a_texcoord2d', 'texCoord2d', 0, None, 'This is a computed attribute interpreted as a double-precision 2d texcoord', {}, True, None, False, ''),
        ('outputs:a_texcoord2f', 'texCoord2f', 0, None, 'This is a computed attribute interpreted as a single-precision 2d texcoord', {}, True, None, False, ''),
        ('outputs:a_texcoord2h', 'texCoord2h', 0, None, 'This is a computed attribute interpreted as a half-precision 2d texcoord', {}, True, None, False, ''),
        ('outputs:a_texcoord3d', 'texCoord3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d texcoord', {}, True, None, False, ''),
        ('outputs:a_texcoord3f', 'texCoord3f', 0, None, 'This is a computed attribute interpreted as a single-precision 3d texcoord', {}, True, None, False, ''),
        ('outputs:a_texcoord3h', 'texCoord3h', 0, None, 'This is a computed attribute interpreted as a half-precision 3d texcoord', {}, True, None, False, ''),
        ('outputs:a_timecode', 'timecode', 0, None, 'This is a computed attribute interpreted as a timecode', {}, True, None, False, ''),
        ('outputs:a_vector3d', 'vector3d', 0, None, 'This is a computed attribute interpreted as a double-precision 3d vector', {}, True, None, False, ''),
        ('outputs:a_vector3f', 'vector3f', 0, None, 'This is a computed attribute interpreted as a single-precision 3d vector', {}, True, None, False, ''),
        ('outputs:a_vector3h', 'vector3h', 0, None, 'This is a computed attribute interpreted as a half-precision 3d vector', {}, 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.a_color3d = og.AttributeRole.COLOR
        role_data.inputs.a_color3f = og.AttributeRole.COLOR
        role_data.inputs.a_color3h = og.AttributeRole.COLOR
        role_data.inputs.a_color4d = og.AttributeRole.COLOR
        role_data.inputs.a_color4f = og.AttributeRole.COLOR
        role_data.inputs.a_color4h = og.AttributeRole.COLOR
        role_data.inputs.a_frame = og.AttributeRole.FRAME
        role_data.inputs.a_matrix2d = og.AttributeRole.MATRIX
        role_data.inputs.a_matrix3d = og.AttributeRole.MATRIX
        role_data.inputs.a_matrix4d = og.AttributeRole.MATRIX
        role_data.inputs.a_normal3d = og.AttributeRole.NORMAL
        role_data.inputs.a_normal3f = og.AttributeRole.NORMAL
        role_data.inputs.a_normal3h = og.AttributeRole.NORMAL
        role_data.inputs.a_point3d = og.AttributeRole.POSITION
        role_data.inputs.a_point3f = og.AttributeRole.POSITION
        role_data.inputs.a_point3h = og.AttributeRole.POSITION
        role_data.inputs.a_quatd = og.AttributeRole.QUATERNION
        role_data.inputs.a_quatf = og.AttributeRole.QUATERNION
        role_data.inputs.a_quath = og.AttributeRole.QUATERNION
        role_data.inputs.a_texcoord2d = og.AttributeRole.TEXCOORD
        role_data.inputs.a_texcoord2f = og.AttributeRole.TEXCOORD
        role_data.inputs.a_texcoord2h = og.AttributeRole.TEXCOORD
        role_data.inputs.a_texcoord3d = og.AttributeRole.TEXCOORD
        role_data.inputs.a_texcoord3f = og.AttributeRole.TEXCOORD
        role_data.inputs.a_texcoord3h = og.AttributeRole.TEXCOORD
        role_data.inputs.a_timecode = og.AttributeRole.TIMECODE
        role_data.inputs.a_vector3d = og.AttributeRole.VECTOR
        role_data.inputs.a_vector3f = og.AttributeRole.VECTOR
        role_data.inputs.a_vector3h = og.AttributeRole.VECTOR
        role_data.outputs.a_color3d = og.AttributeRole.COLOR
        role_data.outputs.a_color3f = og.AttributeRole.COLOR
        role_data.outputs.a_color3h = og.AttributeRole.COLOR
        role_data.outputs.a_color4d = og.AttributeRole.COLOR
        role_data.outputs.a_color4f = og.AttributeRole.COLOR
        role_data.outputs.a_color4h = og.AttributeRole.COLOR
        role_data.outputs.a_frame = og.AttributeRole.FRAME
        role_data.outputs.a_matrix2d = og.AttributeRole.MATRIX
        role_data.outputs.a_matrix3d = og.AttributeRole.MATRIX
        role_data.outputs.a_matrix4d = og.AttributeRole.MATRIX
        role_data.outputs.a_normal3d = og.AttributeRole.NORMAL
        role_data.outputs.a_normal3f = og.AttributeRole.NORMAL
        role_data.outputs.a_normal3h = og.AttributeRole.NORMAL
        role_data.outputs.a_point3d = og.AttributeRole.POSITION
        role_data.outputs.a_point3f = og.AttributeRole.POSITION
        role_data.outputs.a_point3h = og.AttributeRole.POSITION
        role_data.outputs.a_quatd = og.AttributeRole.QUATERNION
        role_data.outputs.a_quatf = og.AttributeRole.QUATERNION
        role_data.outputs.a_quath = og.AttributeRole.QUATERNION
        role_data.outputs.a_texcoord2d = og.AttributeRole.TEXCOORD
        role_data.outputs.a_texcoord2f = og.AttributeRole.TEXCOORD
        role_data.outputs.a_texcoord2h = og.AttributeRole.TEXCOORD
        role_data.outputs.a_texcoord3d = og.AttributeRole.TEXCOORD
        role_data.outputs.a_texcoord3f = og.AttributeRole.TEXCOORD
        role_data.outputs.a_texcoord3h = og.AttributeRole.TEXCOORD
        role_data.outputs.a_timecode = og.AttributeRole.TIMECODE
        role_data.outputs.a_vector3d = og.AttributeRole.VECTOR
        role_data.outputs.a_vector3f = og.AttributeRole.VECTOR
        role_data.outputs.a_vector3h = og.AttributeRole.VECTOR
        return role_data

    class ValuesForInputs(og.DynamicAttributeAccess):
        LOCAL_PROPERTY_NAMES = { }
        """Helper class that creates natural hierarchical access to input attributes"""
        def __init__(self, node: og.Node, attributes, dynamic_attributes: og.DynamicAttributeInterface):
            """Initialize simplified access for the attribute data"""
            context = node.get_graph().get_default_graph_context()
            super().__init__(context, node, attributes, dynamic_attributes)
            self._batchedReadAttributes = []
            self._batchedReadValues = []

        @property
        def a_color3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3d)
            return data_view.get()

        @a_color3d.setter
        def a_color3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color3d)
            data_view = og.AttributeValueHelper(self._attributes.a_color3d)
            data_view.set(value)

        @property
        def a_color3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3f)
            return data_view.get()

        @a_color3f.setter
        def a_color3f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color3f)
            data_view = og.AttributeValueHelper(self._attributes.a_color3f)
            data_view.set(value)

        @property
        def a_color3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3h)
            return data_view.get()

        @a_color3h.setter
        def a_color3h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color3h)
            data_view = og.AttributeValueHelper(self._attributes.a_color3h)
            data_view.set(value)

        @property
        def a_color4d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4d)
            return data_view.get()

        @a_color4d.setter
        def a_color4d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color4d)
            data_view = og.AttributeValueHelper(self._attributes.a_color4d)
            data_view.set(value)

        @property
        def a_color4f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4f)
            return data_view.get()

        @a_color4f.setter
        def a_color4f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color4f)
            data_view = og.AttributeValueHelper(self._attributes.a_color4f)
            data_view.set(value)

        @property
        def a_color4h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4h)
            return data_view.get()

        @a_color4h.setter
        def a_color4h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_color4h)
            data_view = og.AttributeValueHelper(self._attributes.a_color4h)
            data_view.set(value)

        @property
        def a_frame(self):
            data_view = og.AttributeValueHelper(self._attributes.a_frame)
            return data_view.get()

        @a_frame.setter
        def a_frame(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_frame)
            data_view = og.AttributeValueHelper(self._attributes.a_frame)
            data_view.set(value)

        @property
        def a_matrix2d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix2d)
            return data_view.get()

        @a_matrix2d.setter
        def a_matrix2d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_matrix2d)
            data_view = og.AttributeValueHelper(self._attributes.a_matrix2d)
            data_view.set(value)

        @property
        def a_matrix3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix3d)
            return data_view.get()

        @a_matrix3d.setter
        def a_matrix3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_matrix3d)
            data_view = og.AttributeValueHelper(self._attributes.a_matrix3d)
            data_view.set(value)

        @property
        def a_matrix4d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix4d)
            return data_view.get()

        @a_matrix4d.setter
        def a_matrix4d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_matrix4d)
            data_view = og.AttributeValueHelper(self._attributes.a_matrix4d)
            data_view.set(value)

        @property
        def a_normal3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3d)
            return data_view.get()

        @a_normal3d.setter
        def a_normal3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_normal3d)
            data_view = og.AttributeValueHelper(self._attributes.a_normal3d)
            data_view.set(value)

        @property
        def a_normal3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3f)
            return data_view.get()

        @a_normal3f.setter
        def a_normal3f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_normal3f)
            data_view = og.AttributeValueHelper(self._attributes.a_normal3f)
            data_view.set(value)

        @property
        def a_normal3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3h)
            return data_view.get()

        @a_normal3h.setter
        def a_normal3h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_normal3h)
            data_view = og.AttributeValueHelper(self._attributes.a_normal3h)
            data_view.set(value)

        @property
        def a_point3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3d)
            return data_view.get()

        @a_point3d.setter
        def a_point3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_point3d)
            data_view = og.AttributeValueHelper(self._attributes.a_point3d)
            data_view.set(value)

        @property
        def a_point3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3f)
            return data_view.get()

        @a_point3f.setter
        def a_point3f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_point3f)
            data_view = og.AttributeValueHelper(self._attributes.a_point3f)
            data_view.set(value)

        @property
        def a_point3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3h)
            return data_view.get()

        @a_point3h.setter
        def a_point3h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_point3h)
            data_view = og.AttributeValueHelper(self._attributes.a_point3h)
            data_view.set(value)

        @property
        def a_quatd(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quatd)
            return data_view.get()

        @a_quatd.setter
        def a_quatd(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_quatd)
            data_view = og.AttributeValueHelper(self._attributes.a_quatd)
            data_view.set(value)

        @property
        def a_quatf(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quatf)
            return data_view.get()

        @a_quatf.setter
        def a_quatf(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_quatf)
            data_view = og.AttributeValueHelper(self._attributes.a_quatf)
            data_view.set(value)

        @property
        def a_quath(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quath)
            return data_view.get()

        @a_quath.setter
        def a_quath(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_quath)
            data_view = og.AttributeValueHelper(self._attributes.a_quath)
            data_view.set(value)

        @property
        def a_texcoord2d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2d)
            return data_view.get()

        @a_texcoord2d.setter
        def a_texcoord2d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord2d)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2d)
            data_view.set(value)

        @property
        def a_texcoord2f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2f)
            return data_view.get()

        @a_texcoord2f.setter
        def a_texcoord2f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord2f)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2f)
            data_view.set(value)

        @property
        def a_texcoord2h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2h)
            return data_view.get()

        @a_texcoord2h.setter
        def a_texcoord2h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord2h)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2h)
            data_view.set(value)

        @property
        def a_texcoord3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3d)
            return data_view.get()

        @a_texcoord3d.setter
        def a_texcoord3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord3d)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3d)
            data_view.set(value)

        @property
        def a_texcoord3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3f)
            return data_view.get()

        @a_texcoord3f.setter
        def a_texcoord3f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord3f)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3f)
            data_view.set(value)

        @property
        def a_texcoord3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3h)
            return data_view.get()

        @a_texcoord3h.setter
        def a_texcoord3h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_texcoord3h)
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3h)
            data_view.set(value)

        @property
        def a_timecode(self):
            data_view = og.AttributeValueHelper(self._attributes.a_timecode)
            return data_view.get()

        @a_timecode.setter
        def a_timecode(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_timecode)
            data_view = og.AttributeValueHelper(self._attributes.a_timecode)
            data_view.set(value)

        @property
        def a_vector3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3d)
            return data_view.get()

        @a_vector3d.setter
        def a_vector3d(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_vector3d)
            data_view = og.AttributeValueHelper(self._attributes.a_vector3d)
            data_view.set(value)

        @property
        def a_vector3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3f)
            return data_view.get()

        @a_vector3f.setter
        def a_vector3f(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_vector3f)
            data_view = og.AttributeValueHelper(self._attributes.a_vector3f)
            data_view.set(value)

        @property
        def a_vector3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3h)
            return data_view.get()

        @a_vector3h.setter
        def a_vector3h(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.a_vector3h)
            data_view = og.AttributeValueHelper(self._attributes.a_vector3h)
            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 a_color3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3d)
            return data_view.get()

        @a_color3d.setter
        def a_color3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color3d)
            data_view.set(value)

        @property
        def a_color3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3f)
            return data_view.get()

        @a_color3f.setter
        def a_color3f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color3f)
            data_view.set(value)

        @property
        def a_color3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color3h)
            return data_view.get()

        @a_color3h.setter
        def a_color3h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color3h)
            data_view.set(value)

        @property
        def a_color4d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4d)
            return data_view.get()

        @a_color4d.setter
        def a_color4d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color4d)
            data_view.set(value)

        @property
        def a_color4f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4f)
            return data_view.get()

        @a_color4f.setter
        def a_color4f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color4f)
            data_view.set(value)

        @property
        def a_color4h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_color4h)
            return data_view.get()

        @a_color4h.setter
        def a_color4h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_color4h)
            data_view.set(value)

        @property
        def a_frame(self):
            data_view = og.AttributeValueHelper(self._attributes.a_frame)
            return data_view.get()

        @a_frame.setter
        def a_frame(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_frame)
            data_view.set(value)

        @property
        def a_matrix2d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix2d)
            return data_view.get()

        @a_matrix2d.setter
        def a_matrix2d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix2d)
            data_view.set(value)

        @property
        def a_matrix3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix3d)
            return data_view.get()

        @a_matrix3d.setter
        def a_matrix3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix3d)
            data_view.set(value)

        @property
        def a_matrix4d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix4d)
            return data_view.get()

        @a_matrix4d.setter
        def a_matrix4d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_matrix4d)
            data_view.set(value)

        @property
        def a_normal3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3d)
            return data_view.get()

        @a_normal3d.setter
        def a_normal3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3d)
            data_view.set(value)

        @property
        def a_normal3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3f)
            return data_view.get()

        @a_normal3f.setter
        def a_normal3f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3f)
            data_view.set(value)

        @property
        def a_normal3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3h)
            return data_view.get()

        @a_normal3h.setter
        def a_normal3h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_normal3h)
            data_view.set(value)

        @property
        def a_point3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3d)
            return data_view.get()

        @a_point3d.setter
        def a_point3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_point3d)
            data_view.set(value)

        @property
        def a_point3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3f)
            return data_view.get()

        @a_point3f.setter
        def a_point3f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_point3f)
            data_view.set(value)

        @property
        def a_point3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_point3h)
            return data_view.get()

        @a_point3h.setter
        def a_point3h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_point3h)
            data_view.set(value)

        @property
        def a_quatd(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quatd)
            return data_view.get()

        @a_quatd.setter
        def a_quatd(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_quatd)
            data_view.set(value)

        @property
        def a_quatf(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quatf)
            return data_view.get()

        @a_quatf.setter
        def a_quatf(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_quatf)
            data_view.set(value)

        @property
        def a_quath(self):
            data_view = og.AttributeValueHelper(self._attributes.a_quath)
            return data_view.get()

        @a_quath.setter
        def a_quath(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_quath)
            data_view.set(value)

        @property
        def a_texcoord2d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2d)
            return data_view.get()

        @a_texcoord2d.setter
        def a_texcoord2d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2d)
            data_view.set(value)

        @property
        def a_texcoord2f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2f)
            return data_view.get()

        @a_texcoord2f.setter
        def a_texcoord2f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2f)
            data_view.set(value)

        @property
        def a_texcoord2h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2h)
            return data_view.get()

        @a_texcoord2h.setter
        def a_texcoord2h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord2h)
            data_view.set(value)

        @property
        def a_texcoord3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3d)
            return data_view.get()

        @a_texcoord3d.setter
        def a_texcoord3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3d)
            data_view.set(value)

        @property
        def a_texcoord3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3f)
            return data_view.get()

        @a_texcoord3f.setter
        def a_texcoord3f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3f)
            data_view.set(value)

        @property
        def a_texcoord3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3h)
            return data_view.get()

        @a_texcoord3h.setter
        def a_texcoord3h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_texcoord3h)
            data_view.set(value)

        @property
        def a_timecode(self):
            data_view = og.AttributeValueHelper(self._attributes.a_timecode)
            return data_view.get()

        @a_timecode.setter
        def a_timecode(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_timecode)
            data_view.set(value)

        @property
        def a_vector3d(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3d)
            return data_view.get()

        @a_vector3d.setter
        def a_vector3d(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3d)
            data_view.set(value)

        @property
        def a_vector3f(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3f)
            return data_view.get()

        @a_vector3f.setter
        def a_vector3f(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3f)
            data_view.set(value)

        @property
        def a_vector3h(self):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3h)
            return data_view.get()

        @a_vector3h.setter
        def a_vector3h(self, value):
            data_view = og.AttributeValueHelper(self._attributes.a_vector3h)
            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 = OgnTutorialRoleDataDatabase.ValuesForInputs(node, self.attributes.inputs, dynamic_attributes)
        dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_OUTPUT)
        self.outputs = OgnTutorialRoleDataDatabase.ValuesForOutputs(node, self.attributes.outputs, dynamic_attributes)
        dynamic_attributes = self.dynamic_attribute_data(node, og.AttributePortType.ATTRIBUTE_PORT_TYPE_STATE)
        self.state = OgnTutorialRoleDataDatabase.ValuesForState(node, self.attributes.state, dynamic_attributes)
