#NEWLINE# def ListProperties( self , pattern = None , _type = None , **kwargs ) : #NEWLINE# #INDENT# '\n        Returns a list of property names from the PropertyList with optional filters\n        @param pattern: list properties with specific names with optional wildcard *. Default is all.\n        @param _type: get properties of specific types. See self.kPropertyTypes.keys() for names\n        \n        Optional parameters True/False for testing from FBProperty:\n        IsAnimatable\n        IsInternal\n        IsList\n        IsMaxClamp\n        IsMinClamp\n        IsObjectList\n        IsReadOnly\n        IsReferenceProperty\n        IsUserProperty\n        ' #NEWLINE# def passesOptionalTest( x ) : #NEWLINE# #INDENT# for ( arg , challenge ) in kwargs . iteritems ( ) : #NEWLINE# #INDENT# func = getattr ( x , arg , None ) #NEWLINE# if ( func and ( func ( ) != challenge ) ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# return True #NEWLINE# #UNINDENT# if pattern : #NEWLINE# #INDENT# if ( '*' in pattern ) : #NEWLINE# #INDENT# pattern = pattern . replace ( '*' , '.*' ) #NEWLINE# passesNameTest = ( lambda x : re . match ( pattern , x . GetName ( ) ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# passesNameTest = ( lambda x : ( pattern == x . GetName ( ) ) ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# passesNameTest = ( lambda x : True ) #NEWLINE# #UNINDENT# if _type : #NEWLINE# #INDENT# propertyType = self . kPropertyTypes [ _type ] [ 0 ] #NEWLINE# passesTypeTest = ( lambda x : ( x . GetPropertyType ( ) == propertyType ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# passesTypeTest = ( lambda x : True ) #NEWLINE# #UNINDENT# properties = [ ] #NEWLINE# for p in _type . component . PropertyList : #NEWLINE# #INDENT# if ( p is None ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not passesOptionalTest ( p ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if ( not passesTypeTest ( p ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# if passesNameTest ( p ) : #NEWLINE# #INDENT# properties . append ( p ) #NEWLINE# #UNINDENT# #UNINDENT# return properties