Package slumMaya :: Module classNode :: Class classNode
[hide private]
[frames] | no frames]

Class classNode

source code

object --+    
         |    
      dict --+
             |
            classNode

wraps a maya node as if it was a dictionary. Attrs are dictionary keys and adding a new key will add and attribute in the node. this class makes use of color/vector classes (color.py and vector.py) to create color/vectors attributes see slum for more info about color/vector classes

classNode also have some special methods that wraps some really usefull api methods, like setConnectable and setInternal. Also, some low level api methos to return an MObject of the node, a MFnDependecyNode object of the node and MFnAttribute of the specified key (attribute)

Nested Classes [hide private]
  _dict
_classNode = classNode that own this data key = original key(attr) in the classnode index = all the keys that are needed to get to this data from the original classNode attr(list)
Instance Methods [hide private]
new empty dictionary

__init__(self, node, data=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
attr(self, key) source code
 
addAttr(self, key, item, hidden=False) source code
 
setAttr(self, key, item) source code
 
getAttr(self, key) source code
 
__setitem__(self, key, item)
x[i]=y
source code
 
__getitem__(self, key)
x[y]
source code
 
__repr__(self)
repr(x)
source code
 
__str__(self)
str(x)
source code
 
__len__(self)
len(x)
source code
list of D's keys
keys(self) source code
True if D has a key k, else False
has_key(self, f) source code
None
update(self, f)
Update D from dict/iterable E and F.
source code
 
__delitem__(self, key)
del x[y]
source code
 
MObject(self) source code
 
MFnDependencyNode(self) source code
 
MFnAttribute(self, key) source code
 
_setNeededAttributes(self, key) source code
 
setInternal(self, key, value=True) source code
 
setReadable(self, key, value=True) source code
 
setStorable(self, key, value=True) source code
 
setWritable(self, key, value=True) source code
 
setHidden(self, key, value=False) source code
 
setConnectable(self, key, value=True) source code

Inherited from dict: __cmp__, __contains__, __eq__, __ge__, __getattribute__, __gt__, __iter__, __le__, __lt__, __ne__, __new__, __sizeof__, clear, copy, fromkeys, get, items, iteritems, iterkeys, itervalues, pop, popitem, setdefault, values

Inherited from object: __delattr__, __format__, __reduce__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, node, data=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Returns:
new empty dictionary

Overrides: object.__init__
(inherited documentation)

__setitem__(self, key, item)
(Index assignment operator)

source code 

x[i]=y

Overrides: dict.__setitem__
(inherited documentation)

__getitem__(self, key)
(Indexing operator)

source code 

x[y]

Overrides: dict.__getitem__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__len__(self)
(Length operator)

source code 

len(x)

Overrides: dict.__len__
(inherited documentation)

keys(self)

source code 
Returns: list of D's keys
Overrides: dict.keys
(inherited documentation)

has_key(self, f)

source code 
Returns: True if D has a key k, else False
Overrides: dict.has_key
(inherited documentation)

update(self, f)

source code 

Update D from dict/iterable E and F. If E has a .keys() method, does: for k in E: D[k] = E[k] If E lacks .keys() method, does: for (k, v) in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

Returns: None
Overrides: dict.update
(inherited documentation)

__delitem__(self, key)
(Index deletion operator)

source code 

del x[y]

Overrides: dict.__delitem__
(inherited documentation)