ScriptSpot

Forum topic · General Scripting

autobackup timer and scene dirty state

By br0t · 2009-12-07

Downloads
Description

Heyho,
I tried scripting a countdowntimer to have a visual information on when the next autobackup is going to happen. but i have some issues here, maybe someone can help!

1. Is there any way to get the internal time after which 3dsmax will do the next autobackup?
I used a workaround, by setting my own timer (with the "autosave.Interval" as starting value), resetting the "autosave.resetTimer()" to synchronize with 3dsmax and then registering a "#filePostSave callback", which would tell me when the autobackup has happened, so i can reset everything and go again. but this does not work precisely and i also have to force a backup, if the scene has not been changed, to not lose the sync, so I'm not quite happy with it. Any better ideas?

2. Is there a way to check for the "scene-dirty-state", meaning if the scene has been changed and needs saving or if not. because 3dsmax will not perform any autobackup if there were no changes. I would like to simply check for this and give a hint to the user instead of forcing a backup.

you can have a look on my script for explanation, please excuse my english and the programming style, comments welcome!

Greetings

Comments (3)

Anubis · 2009-12-07

No built-in method for this purpose,
but I think u'r almost there.

Anubis · 2009-12-07

Maybe checkForSave() or getSaveRequired() will help?

br0t · 2009-12-07

You Sir, are amazing ;) getSaveRequired() is exactly what I was asking for in my second question! Now I don't have to create and delete a box() to change tht scene-dirty-flag anymore :cough:

Any Idea how to access the "autobackup-Timer" in Max?

Greetings