def doCmd(self): """ Creates a node by calling the function doCmd() of the class CmdCreateNode. Then sets the value of the param 'filename'. """ CmdCreateNode.doCmd(self) self._node.getTuttleNode().getParam('filename').setValue(str(self._filename)) self._graphTarget.nodesChanged()
def doCmd(self): """ Creates a node by calling the function doCmd() of the class CmdCreateNode. Then sets the value of the param 'filename'. """ CmdCreateNode.doCmd(self) self._node.getTuttleNode().getParam('filename').setValue( str(self._filename)) self._graphTarget.nodesChanged()
def createNode(self, nodeType, x=20, y=20): """ Adds a node from the node list when a node is created. """ cmdCreateNode = CmdCreateNode(self, nodeType, x, y) cmdManager = CommandManager() return cmdManager.push(cmdCreateNode)
def redoCmd(self): """ Redoes the creation of the node. Just calls the function redoCmd() of the class CmdCreateNode. """ CmdCreateNode.redoCmd(self)
def undoCmd(self): """ Undoes the creation of the node. Just calls the function undoCmd() of the class CmdCreateNode. """ CmdCreateNode.undoCmd(self)
def __init__(self, graphTarget, nodeType, x, y, filename): CmdCreateNode.__init__(self, graphTarget, nodeType, x, y) self._filename = filename