PDA

View Full Version : how can you permanently define functions or variables?


acgraham
08-10-2007, 02:12 AM
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!

antonv
08-10-2007, 02:41 AM
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.

acgraham
08-10-2007, 06:00 AM
ahh right. thats awesome thanks!

PEN
08-10-2007, 02:11 PM
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.

CGTalk Moderation
08-10-2007, 02:11 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.