Skip navigation
Currently Being Moderated

activeHistoryBrushSource deletes only if it exists. How?

Jul 25, 2012 8:34 AM

Tags: #history #activehistorybrushsource #historybrush

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
 
Replies
  • Currently Being Moderated
    Jul 26, 2012 12:21 AM   in reply to Pedro Marques

    delete activeHistoryBrushSource if there is one.

    I suspect you cannot delete that, as it always is something, but you could set it so something else – the activeHistoryState?

     

    And may I ask if what you are achieving with this Script might not just as well be done with Layers and Layer Masks (and then flattened if necessary)? 

     
    |
    Mark as:
  • Currently Being Moderated
    Jul 26, 2012 2:00 AM   in reply to Pedro Marques

    DustAndScratches was just an example.

    I fail to see the truly relevant advantage of the History Brush approach in image editing when compared to working with Layers and Layer Masks.

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points