def processCommand(alg): # We temporary remove the output 'sequence' sequence = alg.getOutputFromName(u'sequence') sequenceFile = alg.getOutputValue(u'sequence') alg.exportedLayers[sequence.value] = sequence.name + alg.uniqueSufix alg.removeOutputFromName(u'sequence') # We create a new parameter with the same name param = getParameterFromString(u"ParameterString|sequence|sequence|None|False|False") param.setValue(sequenceFile) alg.addParameter(param) # Let's do the incorporation and command generation incorporatePoints(alg) # then we delete the input parameter and add the old output alg.parameters.remove(param) alg.addOutput(sequence)
def processCommand(alg): # We temporary remove the output 'sequence' sequence = alg.getOutputFromName(u'sequence') sequenceFile = alg.getOutputValue(u'sequence') alg.exportedLayers[sequence.value] = sequence.name + alg.uniqueSufix alg.removeOutputFromName(u'sequence') # We create a new parameter with the same name param = getParameterFromString( u"ParameterString|sequence|sequence|None|False|False") param.setValue(sequenceFile) alg.addParameter(param) # Let's do the incorporation and command generation incorporatePoints(alg) # then we delete the input parameter and add the old output alg.parameters.remove(param) alg.addOutput(sequence)
def processCommand(alg): incorporatePoints(alg)