find what's triggering a dirty flag

find what's triggering a dirty flag

samPT7WG
Contributor Contributor
455 Views
2 Replies
Message 1 of 3

find what's triggering a dirty flag

samPT7WG
Contributor
Contributor

Hi, we have an issue in our studio where if someone has saved a scene and immediately hits "close" they are sometimes asked to save the scene again.

 

Is there any way to find out what is triggering the dirty flag? (other than the undo list)

 

Thanks

0 Likes
456 Views
2 Replies
Replies (2)
Message 2 of 3

10DSpace
Advisor
Advisor

@samPT7WG 

 

Since saving a scene takes some time (especially for large scenes), hitting "close" immediately may not have allowed the save to complete so the "dirty flag" has not yet been reset.   

0 Likes
Message 3 of 3

denisT.MaxDoctor
Advisor
Advisor

@samPT7WG wrote:

Hi, we have an issue in our studio where if someone has saved a scene and immediately hits "close" they are sometimes asked to save the scene again.

 

Is there any way to find out what is triggering the dirty flag? (other than the undo list)

Firstly, it is not at all necessary that the scene needs to be saved (meaning save flag is dirty). It's easy to check - run

 

 

getSaveRequired​()

 


If it's dirty anyway... Most likely that some script is using one of general callbacks (file notifications) to do something what makes scene dirty... more likely is #filePreSave, #filePostSave, #filePreSaveProcess or #filePostSaveProcess callback.

 

You can look them all using:

 

callbacks.show()

 

find suspicious ones, and you can technically remove them at your own risk.

If this does not help, then we can look for something else, as well as remove the dirty flag 😉

 

By the way, check Undo Buffer after "save" the file. Do you see any new records?

 

0 Likes