Package mrv :: Module dgfe :: Class GraphNodeBase
[hide private]
[frames] | no frames]

Class GraphNodeBase

source code

         object --+                
                  |                
interface.Interface --+            
                      |            
interface.iDuplicatable --+        
                          |        
               dge.NodeBase --+    
                              |    
                 FacadeNodeBase --+
                                  |
                                 GraphNodeBase
Known Subclasses:

A node wrapping a graph, allowing it to be nested within the node All inputs and outputs on this node are purely virtual, thus they internally connect to the wrapped graph.

To Do: tests deletion of graphnodes and see whether they are being garbage collected. It should work with the new collector as it can handle cyclic references - these strong cycles we have a lot in this structure. Weakrefs will not work for nested facade nodes as they are tuples not allowing weak refs.

Nested Classes [hide private]

Inherited from FacadeNodeBase: shellcls

Inherited from dge.NodeBase: __metaclass__

Instance Methods [hide private]
 
_addIncludeNodePlugs(self, outset)
Add the plugs defined in include to the given output list
source code
 
_removeExcludedPlugs(self, outset)
remove the plugs from our exclude list and modify the outset
source code

Inherited from FacadeNodeBase: __getattr__, clearPlugCache

Inherited from interface.iDuplicatable: copyTo, copyToOther, duplicate

Inherited from interface.Interface: supports

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __subclasshook__

    Base Methods
 
_iterNodes(self)
Returns: generator for nodes in our graph
source code
    To be Subclass-Implemented
 
_getNodePlugs(self)
Returns: all plugs on nodes we wrap ( as node,plug tuple )
source code
    Overridden from Object
 
__init__(self, wrappedGraph, *args, **kwargs)
Initialize the instance :param wrappedGraph: graph we are wrapping
source code

Inherited from dge.NodeBase: __del__, __str__

    iDuplicatable Interface
 
createInstance(self, **kwargs)
Create a copy of self and return it
source code

Inherited from FacadeNodeBase: copyFrom

    Base Interface

Inherited from dge.NodeBase: compute

    ID Handling

Inherited from dge.NodeBase: id, setID

    Base

Inherited from FacadeNodeBase: plugs

Inherited from dge.NodeBase: clearCache, connections, inputPlugs, outputPlugs, toShell, toShells

Class Methods [hide private]
    Base

Inherited from dge.NodeBase: filterCompatiblePlugs, inputPlugsStatic, outputPlugsStatic, plugsStatic

Class Variables [hide private]
    Configuration
  duplicate_wrapped_graph = True
  allow_auto_plugs = True
  ignore_failed_includes = False
hash(x)
  include = []
  exclude = []

Inherited from FacadeNodeBase: caching_enabled

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, wrappedGraph, *args, **kwargs)
(Constructor)

source code 
Initialize the instance :param wrappedGraph: graph we are wrapping
Parameters:
  • kwargs - 'id' = id of the instance, defaults to None if it is not required
Overrides: object.__init__

createInstance(self, **kwargs)

source code 
Create a copy of self and return it
Returns:
new instance of self
Overrides: interface.iDuplicatable.createInstance

_iterNodes(self)

source code 
Returns:
generator for nodes in our graph

Note: derived classes could override this to just return a filtered view on their nodes

_getNodePlugs(self)

source code 
Implement this as if it was your plugs method - it will be called by the base - your result needs processing before it can be returned
Returns:
all plugs on nodes we wrap ( as node,plug tuple )
Overrides: FacadeNodeBase._getNodePlugs