Package mrv :: Package maya :: Module mdb :: Class MMemberMap
[hide private]
[frames] | no frames]

Class MMemberMap

source code

UserDict.UserDict --+
                    |
                   MMemberMap

Simple accessor for MFnDatabase access Direct access like db[funcname] returns an entry object with all values

Globals: The __globals__ entry in MFn db files allows to pass additional options. Currently there are no supported flags

Instance Methods [hide private]
 
__init__(self, filepath=None, parse_enums=False)
intiialize self from a file if not None
source code
 
__str__(self) source code
 
_initFromFile(self, filepath)
Initialize the database with values from the given file
source code
 
writeToFile(self, filepath)
Write our database contents to the given file
source code
 
methodByName(self, funcname)
Returns: Tuple( mfnfuncname, entry ) original mfnclass function name paired with the db entry containing more information
source code
 
createEntry(self, funcname)
Create an entry for the given function, or return the existing one
source code
 
mfnFunc(self, funcname)
Returns: mfn functionname corresponding to the ( possibly renamed ) funcname
source code

Inherited from UserDict.UserDict: __cmp__, __contains__, __delitem__, __getitem__, __len__, __repr__, __setitem__, clear, copy, get, has_key, items, iteritems, iterkeys, itervalues, keys, pop, popitem, setdefault, update, values

Class Methods [hide private]

Inherited from UserDict.UserDict: fromkeys

Class Variables [hide private]
  kDelete = 'x'
Method Details [hide private]

__init__(self, filepath=None, parse_enums=False)
(Constructor)

source code 
intiialize self from a file if not None
Parameters:
  • parse_enums - if True, enumerations will be parsed. Save time by specifying False in case you know that there are no enumerations
Overrides: UserDict.UserDict.__init__

_initFromFile(self, filepath)

source code 
Initialize the database with values from the given file

Note: the file must have been written using the writeToFile method

methodByName(self, funcname)

source code 
Returns:
Tuple( mfnfuncname, entry ) original mfnclass function name paired with the db entry containing more information
Raises:
  • KeyError - if no such function exists

createEntry(self, funcname)

source code 
Create an entry for the given function, or return the existing one
Returns:
Entry object for funcname

mfnFunc(self, funcname)

source code 
Returns:
mfn functionname corresponding to the ( possibly renamed ) funcname