Package Pmv :: Module selectionCommands :: Class MVCreateSetIfNeeded
[hide private]
[frames] | no frames]

Class MVCreateSetIfNeeded

source code

ViewerFramework.VFCommand.Command --+    
                                    |    
                  mvCommand.MVCommand --+
                                        |
                                       MVCreateSetIfNeeded

create a set, but only if it does not already exist
    
Package : Pmv
    
Module  : selectionCommands
    
Class   : MVCreateSetIfNeeded
    
Command : createSetIfNeeded
    
Synopsis:
       
         None <- createSetIfNeeded(nodes, name, comments='No description',**kw)
    
Required Arguments:
        
        nodes --- TreeNodeSet holding the current selection
        
name --- name under which the selected set will be saved
    
Optional Argumnets:
    
        comments --- description of the saved set, default is 'No description'
    



Instance Methods [hide private]
  doit(self, nodes, name, comments=None)
virtual method.
  __call__(self, nodes, name, comments='No description', **kw)
None <- createSetIfNeeded(nodes, name, comments='No description',**kw)

Inherited from mvCommand.MVCommand: __init__, guiCallback, strArg

Inherited from mvCommand.MVCommand (private): _strArg

Inherited from ViewerFramework.VFCommand.Command: __repr__, addCallbackAfter, addCallbackBefore, addUndoCall, afterDoit, beforeDoit, buildFormDescr, buildLogArgList, checkDependencies, cleanup, customizeGUI, doitWrapper, getArguments, getHelp, getLastUsedValues, getLogArgs, getValNamedArgs, log, logString, onAddCmdToViewer, onAddNewCmd, onCmdRun, setLastUsedValues, setupUndoAfter, setupUndoBefore, showForm, tkCb, updateGeom, warningMsg


Class Variables [hide private]

Inherited from ViewerFramework.VFCommand.Command: negateKw, objArgOnly


Method Details [hide private]

doit(self, nodes, name, comments=None)

source code 
virtual method. Has to be implemented by the sub classes
Overrides: ViewerFramework.VFCommand.Command.doit
(inherited documentation)

__call__(self, nodes, name, comments='No description', **kw)
(Call operator)

source code 

None <- createSetIfNeeded(nodes, name, comments='No description',**kw)

nodes --- TreeNodeSet holding the current selection

name --- name under which the selected set will be saved

comments --- description of the saved set, default is 'No description'
Overrides: ViewerFramework.VFCommand.Command.__call__