3 Replies Latest reply on Jul 26, 2012 2:00 AM by c.pfaffenbichler

    activeHistoryBrushSource deletes only if it exists. How?

    Pedro Cortez Marques Level 3

      If I use the first time or use again this script, I must reset history and delete activeHistoryBrushSource if there is one.

      How can I reset (or delete) the activeHistoryBrushSource?

      If it not exist or if it exist, it must not give me any error.




      // here I need to delete activeHistoryBrushSource only if it exists
      savedState = doc.activeHistoryState
      doc.activeLayer.applyDustAndScratches(16,0); // only an example
      doc.activeHistoryBrushSource = doc.activeHistoryState
      doc.activeHistoryState = savedState