original_docstring: the attributes of the node from attribute types
  
          :param attributeTypes: types of attributes to get - All if nothing is specified
          :type attributeTypes: list[str]
  
          :param attributeTypesIncluded: ``True`` : attribute types are included -
                                         ``False`` : attribute types are excluded
          :type attributeTypesIncluded: bool
  
          :param onlyUserDefined: ``True`` : only user defined attributes - ``False`` : not only user defined attributes
          :type onlyUserDefined: bool
  
          :return: the attributes
          :rtype: list[:class:`cgp_maya_utils.scene.Attribute`]
          
docstring: the attributes of the node from attribute types
docstring_tokens: the attributes of the node from attribute types
code: def attributes(self, attributeTypes=None, attributeTypesIncluded=True, onlyUserDefined=False):
          """the attributes of the node from attribute types
  
          :param attributeTypes: types of attributes to get - All if nothing is specified
          :type attributeTypes: list[str]
  
          :param attributeTypesIncluded: ``True`` : attribute types are included -
                                         ``False`` : attribute types are excluded
          :type attributeTypesIncluded: bool
  
          :param onlyUserDefined: ``True`` : only user defined attributes - ``False`` : not only user defined attributes
          :type onlyUserDefined: bool
  
          :return: the attributes
          :rtype: list[:class:`cgp_maya_utils.scene.Attribute`]
          """
  
          # init
          returnAttributes = []
          queryAttributeTypes = []
          userDefinedAttributes = maya.cmds.listAttr(self.name(), userDefined=True)
  
          # errors
          if attributeTypes:
              for attributeType in attributeTypes:
                  if attributeType not in cgp_maya_utils.constants.AttributeType.ALL:
                      raise ValueError('{0} is not a valid type - {1}'
                                       .format(attributeType, cgp_maya_utils.constants.AttributeType.ALL))
  
          # get attrTypes to query
          if not attributeTypes and attributeTypesIncluded:
              queryAttributeTypes = cgp_maya_utils.constants.AttributeType.ALL
  
          elif attributeTypes and attributeTypesIncluded:
              queryAttributeTypes = attributeTypes
  
          elif attributeTypes and not attributeTypesIncluded:
              queryAttributeTypes = set(cgp_maya_utils.constants.AttributeType.ALL) - set(attributeTypes)
  
          # execute
          for attribute in maya.cmds.listAttr(self.name()):
  
              # continue
              if onlyUserDefined and attribute not in userDefinedAttributes:
                  continue
  
              # get full attribute
              fullAttribute = '{0}.{1}'.format(self.name(), attribute)
  
              # get attribute type
              # try except work around for unrecognized attributes like publishedNodeInfo.publishedNode
              try:
                  attributeType = maya.cmds.getAttr(fullAttribute, type=True)
              except (ValueError, RuntimeError):
                  continue
  
              # update
              if attributeType in queryAttributeTypes:
                  returnAttributes.append(cgp_maya_utils.scene._api.attribute(fullAttribute))
  
          # return
          return returnAttributes
code_tokens: def attributes ( self , attributeTypes = None , attributeTypesIncluded = True , onlyUserDefined = False ) : returnAttributes = [ ] queryAttributeTypes = [ ] userDefinedAttributes = maya . cmds . listAttr ( self . name ( ) , userDefined = True ) if attributeTypes : for attributeType in attributeTypes : if attributeType not in cgp_maya_utils . constants . AttributeType . ALL : raise ValueError ( '{0} is not a valid type - {1}' . format ( attributeType , cgp_maya_utils . constants . AttributeType . ALL ) ) if not attributeTypes and attributeTypesIncluded : queryAttributeTypes = cgp_maya_utils . constants . AttributeType . ALL elif attributeTypes and attributeTypesIncluded : queryAttributeTypes = attributeTypes elif attributeTypes and not attributeTypesIncluded : queryAttributeTypes = set ( cgp_maya_utils . constants . AttributeType . ALL ) - set ( attributeTypes ) for attribute in maya . cmds . listAttr ( self . name ( ) ) : if onlyUserDefined and attribute not in userDefinedAttributes : continue fullAttribute = '{0}.{1}' . format ( self . name ( ) , attribute ) try : attributeType = maya . cmds . getAttr ( fullAttribute , type = True ) except ( ValueError , RuntimeError ) : continue if attributeType in queryAttributeTypes : returnAttributes . append ( cgp_maya_utils . scene . _api . attribute ( fullAttribute ) ) return returnAttributes
short_docstring: the attributes of the node from attribute types
short_docstring_tokens: the attributes of the node from attribute types
comment: """the attributes of the node from attribute types
  
          :param attributeTypes: types of attributes to get - All if nothing is specified
          :type attributeTypes: list[str]
  
          :param attributeTypesIncluded: ``True`` : attribute types are included -
                                         ``False`` : attribute types are excluded
          :type attributeTypesIncluded: bool
  
          :param onlyUserDefined: ``True`` : only user defined attributes - ``False`` : not only user defined attributes
          :type onlyUserDefined: bool
  
          :return: the attributes
          :rtype: list[:class:`cgp_maya_utils.scene.Attribute`]
          """$SEP$# init$SEP$# errors$SEP$# get attrTypes to query$SEP$# execute$SEP$# continue$SEP$# get full attribute$SEP$# get attribute type$SEP$# try except work around for unrecognized attributes like publishedNodeInfo.publishedNode$SEP$# update$SEP$# return