Package mrv :: Package automation :: Module process :: Class WorkflowProcessBase
[hide private]
[frames] | no frames]

Class WorkflowProcessBase

source code

         object --+                    
                  |                    
interface.Interface --+                
                      |                
interface.iDuplicatable --+            
                          |            
               dge.NodeBase --+        
                              |        
            dgfe.FacadeNodeBase --+    
                                  |    
                 dgfe.GraphNodeBase --+
                                      |
             object --+               |
                      |               |
    interface.Interface --+           |
                          |           |
    interface.iDuplicatable --+       |
                              |       |
                   dge.NodeBase --+   |
                                  |   |
                        ProcessBase --+
                                      |
                                     WorkflowProcessBase

A process wrapping a workflow, allowing workflows to be nested Derive from this class and initialize it with the workflow you would like to have wrapped The process works by transmitting relevant calls to its underlying workflow, allowing nodeInsideNestedWorkflow -> thisworkflow.node.plug connections

Workflows are standin nodes - they can connect anything their wrapped nodes can connect


Note: to prevent dependency issues, the workflow instance will be bound on first use

Nested Classes [hide private]

Inherited from dgfe.FacadeNodeBase: shellcls

Inherited from dge.NodeBase: __metaclass__

Instance Methods [hide private]
 
_createWrappedWfl(self, wfldir, wflname)
Returns: our wrapped workflow instance as created by a method loading a workflow from a file
source code

Inherited from dgfe.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 that have no output connections or no input connections
source code
    To be Subclass-Implemented
 
_getNodePlugs(self)
Override the base method, filtering it's output so that only unconnected plugs will be returned
source code
    iDuplicatable Interface
 
createInstance(self, *args, **kwargs)
Create a copy of self and return it - required due to our very special constructor
source code

Inherited from dgfe.FacadeNodeBase: copyFrom

    Query

Inherited from ProcessBase: supportedTargetTypes, targetRating

    Interface

Inherited from ProcessBase: compute, evaluateState

    Base
 
prepareProcess(self)
As we have different callgraphs, but want proper reports, just swap in the callgraph of our own workflow to allow it to be maintained correctly when the nodes of the wrapped graph evaluate.
source code

Inherited from dgfe.FacadeNodeBase: plugs

Inherited from ProcessBase: workflow

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

    Overridden from Object
 
__init__(self, id, wflInstance=None, **kwargs)
Will take all important configuration variables from its class variables - you should override these with your subclass
source code

Inherited from dge.NodeBase: __del__, __str__

    ID Handling

Inherited from dge.NodeBase: id, setID

Class Methods [hide private]
    Base

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

Class Variables [hide private]
  workflow_file = 'name of the workflow dot file ( incl. extensi...
  workflow_directory = 'directory containing workflows to load '
  exclude_connected_plugs = True

Inherited from ProcessBase: dirty_check, is_state, kGood, kNo, kPerfect, noun, target_state, verb

    Configuration
  duplicate_wrapped_graph = False
hash(x)

Inherited from dgfe.GraphNodeBase: allow_auto_plugs, exclude, ignore_failed_includes, include

Inherited from dgfe.FacadeNodeBase: caching_enabled

Inherited from ProcessBase: track_compute_calls

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, id, wflInstance=None, **kwargs)
(Constructor)

source code 
Will take all important configuration variables from its class variables - you should override these with your subclass
Parameters:
  • wflInstance - if given, this instance will be used instead of creating a new workflow. Used by copy constructor.
  • kwargs - all arguments required to initialize the ProcessBase
Overrides: object.__init__

createInstance(self, *args, **kwargs)

source code 
Create a copy of self and return it - required due to our very special constructor
Returns:
new instance of self
Overrides: interface.iDuplicatable.createInstance

_createWrappedWfl(self, wfldir, wflname)

source code 
Returns:
our wrapped workflow instance as created by a method loading a workflow from a file

prepareProcess(self)

source code 
As we have different callgraphs, but want proper reports, just swap in the callgraph of our own workflow to allow it to be maintained correctly when the nodes of the wrapped graph evaluate.
Overrides: ProcessBase.prepareProcess

Note: this requires that we get called after the callgraph has bene initialized

_iterNodes(self)

source code 
Returns:
generator for nodes that have no output connections or no input connections
Overrides: dgfe.GraphNodeBase._iterNodes

_getNodePlugs(self)

source code 
Override the base method, filtering it's output so that only unconnected plugs will be returned
Returns:
all plugs on nodes we wrap ( as node,plug tuple )
Overrides: dgfe.FacadeNodeBase._getNodePlugs

Class Variable Details [hide private]

workflow_file

Value:
'name of the workflow dot file ( incl. extension )'