Notifications
Clear all

[Closed] how can you permanently define functions or variables?

ive found that you can keep variables within a scene file using persistent globals.

is there a way to define a function that is always available in max all the time, even when starting a new project?

im guessing i might have to do this with callbacks, but the documentation on them is a bit confusing for me, and im not sure how i might do this.

im also having trouble rotating objects using their absolute world values. must be simple, but so far i can only rotate objects using a transform commands which simply increment rotation values.

thanks for any help!

3 Replies

You can make a script file that holds all your functions and save it in scripts/startup. This way everytime you start max, that script will run and all your functions will be global.

ahh right. thats awesome thanks!

 PEN

Another good location for scripts that you want run every time at startup is stdPlugs/stdSripts, this folder loads first, then macroScripts and then the scripts/startup dir.