Beispiel #1
0
 def undoIt(self):
     blueprintModel = getBlueprintModel()
     if blueprintModel:
         # deserialize str value into objects
         value = deserializeAttrValue(self.oldStrValue)
         blueprintModel.setActionAttr(self.attrPath, value,
                                      self.variantIndex)
Beispiel #2
0
 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)
Beispiel #3
0
    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)
Beispiel #4
0
 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)
Beispiel #5
0
 def undoIt(self):
     blueprintModel = getBlueprintModel()
     if blueprintModel:
         oldData = deserializeAttrValue(self.oldStrData)
         blueprintModel.setActionData(self.stepPath, oldData)