How to run commands on Reset?

Hi,

I wrote a simple script to change some setups for my needs and put it into the startup folder. It changes default time range, playback rate, frame res. etc. Everything is fine, except when I reset Max, since it doesnt re-run the script, everything returns back.

Is there a quick way to run commands on reset?

 Thanks in advance.

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Stokes's picture

Yes, indeed: you can do it

Yes, indeed: you can do it via the general event callbacks.

 callbacks.addScript #systemPostReset "the_code_to_execute()" id:#someID

The stuff in quotes is a string that gets executed. It should probably be short, like a call to a function defined elsewhere. The ID is just for being able to name the callback for removal later. Even if you don't intend to remove it, give it an ID, anyway... it will make the script development much easier if nothing else.

 

 

David "Stokes" Stokes
Senior Technical Artist, Blue Fang Games

masquerade's picture

That was very helpful.

That was very helpful. Thanks Stokes.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.