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

Imports data from a USD prim into attributes in an output bundle
"""

import carb
import numpy

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

    Class Members:
        node: Node being evaluated

    Attribute Value Properties:
        Inputs:
            inputs.applySkelBinding
            inputs.applyTransform
            inputs.attrNamesToImport
            inputs.computeBoundingBox
            inputs.importAttributes
            inputs.importPath
            inputs.importPrimvarMetadata
            inputs.importTime
            inputs.importTransform
            inputs.importType
            inputs.inputAttrNames
            inputs.keepPrimsSeparate
            inputs.outputAttrNames
            inputs.prim
            inputs.renameAttributes
            inputs.timeVaryingAttributes
            inputs.usdTimecode
        Outputs:
            outputs.output
        State:
            state.prevApplySkelBinding
            state.prevApplyTransform
            state.prevAttrNamesToImport
            state.prevComputeBoundingBox
            state.prevImportAttributes
            state.prevImportPath
            state.prevImportPrimvarMetadata
            state.prevImportTime
            state.prevImportTransform
            state.prevImportType
            state.prevInputAttrNames
            state.prevInvNodeTransform
            state.prevKeepPrimsSeparate
            state.prevOnlyImportSpecified
            state.prevOutputAttrNames
            state.prevPaths
            state.prevRenameAttributes
            state.prevTimeVaryingAttributes
            state.prevTransforms
            state.prevUsdTimecode
    """

    # 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:applySkelBinding', 'bool', 0, None, 'If the input USD prim is a Mesh, and has SkelBindingAPI schema applied, compute skinned points and normals.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:applyTransform', 'bool', 0, None, 'If importAttributes is true, apply the transform necessary to transform any transforming attributes into the space of this node.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
        ('inputs:attrNamesToImport', 'token', 0, 'Attributes To Import', 'Comma or space separated text, listing the names of attributes in the input data to be imported \nor empty to import all attributes.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: '""'}, True, "", False, ''),
        ('inputs:computeBoundingBox', 'bool', 0, None, 'Compute and store local bounding box of a prim and its children.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
        ('inputs:importAttributes', 'bool', 0, None, 'Import attribute data from the USD prim.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:importPath', 'bool', 0, None, 'Record the input USD prim\'s path into the output bundle in an attribute named "primPath".', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:importPrimvarMetadata', 'bool', 0, None, 'Import metadata like the interpolation type for primvars, and store it as attributes in the output bundle.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:importTime', 'bool', 0, None, 'Record the usdTimecode above into the output bundle in an attribute named "primTime".', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:importTransform', 'bool', 0, None, 'Record the transform required to take any attributes of the input USD prim \ninto the space of this node, i.e. the world transform of the input prim times the \ninverse world transform of this node, into the output bundle in an attribute named "transform".', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:importType', 'bool', 0, None, 'Deprecated, prim type is always imported', {ogn.MetadataKeys.HIDDEN: 'true', 'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:inputAttrNames', 'token', 0, 'Attributes To Rename', 'Comma or space separated text, listing the names of attributes in the input data to be renamed', {ogn.MetadataKeys.DEFAULT: '""'}, True, "", False, ''),
        ('inputs:keepPrimsSeparate', 'bool', 0, None, 'Prefix output attribute names with "prim" followed by a unique number and a colon, \nto keep the attributes for separate input prims separate.  The prim paths will \nbe in the "primPaths" token array attribute.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:outputAttrNames', 'token', 0, 'New Attribute Names', 'Comma or space separated text, listing the new names for the attributes listed in inputAttrNames', {ogn.MetadataKeys.DEFAULT: '""'}, True, "", False, ''),
        ('inputs:prim', 'bundle', 0, None, 'The USD prim from which to import data.', {}, False, None, False, ''),
        ('inputs:renameAttributes', 'bool', 0, None, 'If true, attributes listed in "inputAttrNames" will be imported to attributes with the names specified in "outputAttrNames".', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'false'}, True, False, False, ''),
        ('inputs:timeVaryingAttributes', 'bool', 0, None, 'Check whether the USD attributes are time-varying and if so, import their data at the time "usdTimecode".', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: 'true'}, True, True, False, ''),
        ('inputs:usdTimecode', 'double', 0, None, 'The time at which to evaluate the transform of the USD prim.', {'displayGroup': 'parameters', ogn.MetadataKeys.DEFAULT: '0'}, True, 0, False, ''),
        ('outputs:output', 'bundle', 0, None, 'Output bundle containing all of the imported data.', {}, True, None, False, ''),
        ('state:prevApplySkelBinding', 'bool', 0, None, 'Value of "applySkelBinding" input from previous run', {}, True, None, False, ''),
        ('state:prevApplyTransform', 'bool', 0, None, 'Value of "applyTransform" input from previous run', {}, True, None, False, ''),
        ('state:prevAttrNamesToImport', 'token', 0, None, 'Value of "attrNamesToImport" input from previous run', {}, True, None, False, ''),
        ('state:prevComputeBoundingBox', 'bool', 0, None, 'Value of "computeBoundingBox" input from previous run', {}, True, None, False, ''),
        ('state:prevImportAttributes', 'bool', 0, None, 'Value of "importAttributes" input from previous run', {}, True, None, False, ''),
        ('state:prevImportPath', 'bool', 0, None, 'Value of "importPath" input from previous run', {}, True, None, False, ''),
        ('state:prevImportPrimvarMetadata', 'bool', 0, None, 'Value of "importPrimvarMetadata" input from previous run', {}, True, None, False, ''),
        ('state:prevImportTime', 'bool', 0, None, 'Value of "importTime" input from previous run', {}, True, None, False, ''),
        ('state:prevImportTransform', 'bool', 0, None, 'Value of "importTransform" input from previous run', {}, True, None, False, ''),
        ('state:prevImportType', 'bool', 0, None, 'Value of "importType" input from previous run', {}, True, None, False, ''),
        ('state:prevInputAttrNames', 'token', 0, None, 'Value of "inputAttrNames" input from previous run', {}, True, None, False, ''),
        ('state:prevInvNodeTransform', 'matrix4d', 0, None, 'Inverse transform of the node prim from the previous run.', {}, True, None, False, ''),
        ('state:prevKeepPrimsSeparate', 'bool', 0, None, 'Value of "keepPrimsSeparate" input from previous run', {}, True, None, False, ''),
        ('state:prevOnlyImportSpecified', 'bool', 0, None, 'Value of "onlyImportSpecified" input from previous run', {}, True, None, False, ''),
        ('state:prevOutputAttrNames', 'token', 0, None, 'Value of "outputAttrNames" input from previous run', {}, True, None, False, ''),
        ('state:prevPaths', 'token[]', 0, None, 'Array of paths from the previous run.', {}, True, None, False, ''),
        ('state:prevRenameAttributes', 'bool', 0, None, 'Value of "renameAttributes" input from previous run', {}, True, None, False, ''),
        ('state:prevTimeVaryingAttributes', 'bool', 0, None, 'Value of "timeVaryingAttributes" input from previous run', {}, True, None, False, ''),
        ('state:prevTransforms', 'matrix4d[]', 0, None, 'Array of transforms from the previous run.', {}, True, None, False, ''),
        ('state:prevUsdTimecode', 'double', 0, None, 'Value of "usdTimecode" input from previous run', {}, 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.BUNDLE
        role_data.outputs.output = og.AttributeRole.BUNDLE
        role_data.state.prevInvNodeTransform = og.AttributeRole.MATRIX
        role_data.state.prevTransforms = 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.__bundles = og.BundleContainer(context, node, attributes, [], read_only=True, gpu_ptr_kinds={})
            self._batchedReadAttributes = []
            self._batchedReadValues = []

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

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

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

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

        @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 importAttributes(self):
            data_view = og.AttributeValueHelper(self._attributes.importAttributes)
            return data_view.get()

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @timeVaryingAttributes.setter
        def timeVaryingAttributes(self, value):
            if self._setting_locked:
                raise og.ReadOnlyError(self._attributes.timeVaryingAttributes)
            data_view = og.AttributeValueHelper(self._attributes.timeVaryingAttributes)
            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):
            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 output(self) -> og.BundleContents:
            """Get the bundle wrapper class for the attribute outputs.output"""
            return self.__bundles.output

        @output.setter
        def output(self, bundle: og.BundleContents):
            """Overwrite the bundle attribute outputs.output 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.output.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.prevPaths_size = None
            self.prevTransforms_size = None

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        @property
        def prevPaths(self):
            data_view = og.AttributeValueHelper(self._attributes.prevPaths)
            self.prevPaths_size = data_view.get_array_size()
            return data_view.get()

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

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

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

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

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

        @property
        def prevTransforms(self):
            data_view = og.AttributeValueHelper(self._attributes.prevTransforms)
            self.prevTransforms_size = data_view.get_array_size()
            return data_view.get()

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

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

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