def undoIt(self): blueprintModel = getBlueprintModel() if blueprintModel: # deserialize str value into objects value = deserializeAttrValue(self.oldStrValue) blueprintModel.setActionAttr(self.attrPath, value, self.variantIndex)
def undoIt(self): blueprintModel = getBlueprintModel() if blueprintModel and self.deletedStrData: deletedData = deserializeAttrValue(self.deletedStrData) parentPath = os.path.dirname(self.stepPath) blueprintModel.createStep(parentPath, self.deletedChildIndex, deletedData)
def redoIt(self): blueprintModel = getBlueprintModel() if blueprintModel: # store old value as str self.oldStrValue = serializeAttrValue( blueprintModel.getActionAttr(self.attrPath, self.variantIndex)) # deserialize str value into objects value = deserializeAttrValue(self.newStrValue) blueprintModel.setActionAttr(self.attrPath, value, self.variantIndex)
def redoIt(self): blueprintModel = getBlueprintModel() if blueprintModel: stepData = deserializeAttrValue(self.stepStrData) newStep = blueprintModel.createStep(self.stepPath, self.stepChildIndex, stepData) if not newStep: raise RuntimeError("Failed to create BuildStep") self.newStepPath = newStep.getFullPath() self.clearResult() self.setResult(self.newStepPath)
def undoIt(self): blueprintModel = getBlueprintModel() if blueprintModel: oldData = deserializeAttrValue(self.oldStrData) blueprintModel.setActionData(self.stepPath, oldData)