Skip to main content
Known Participant
October 13, 2011
Question

How to set document "dirty" flag

  • October 13, 2011
  • 1 reply
  • 1626 views

Hi I wonder if there is a  simple way to set document "dirty" flag.

The thing is that I am modifing layer XMP info in action script but this change is not reflected by setting the document to modified state

Lukas

This topic has been closed for replies.

1 reply

Paul Riggott
Inspiring
October 13, 2011

You could do something like this...

activeDocument.info.caption = activeDocument.info.caption + " ";

lukychanAuthor
Known Participant
October 13, 2011

trouble is,that anytime i use DOM on big documents (>100 layers) it become terribly slow and unusable. Would you know how to do it using action manager?

lukychanAuthor
Known Participant
October 14, 2011

Another way to set the document dirty would be to create a guide then remove it.


I've actually  found one more way which surprisingly works and seem to be the fastest.

activeDocument.activeLayer.visible=activeDocument.activeLayer.visible

or even quicker

var b:Boolean=activeDocument.activeLayer.visible;

var des:ActionDescriptor = new ActionDescriptor();

var ref:ActionReference = new ActionReference();

var lst:ActionList = new ActionList();

ref.putEnumerated(lyr, ordn, trgt);

lst.putReference(ref);                  

des.putList(nul,lst);

Photoshop.app.executeAction( b?show:hide, des, DialogModes.NO );