Notifications
Clear all

[Closed] saving arrays in max scene

I wil like to keep arrays in my max scene. I have a maxscript tool that work in arrays and everytime you restart max i lost my arrays so i have to redo it to continue working.

i already done a save and load option to a ini file. But i will like to dont remenber to save the arrays before exit the maxscene.

It will be great if could be posible to save the array in maxscene without having to store the arrays in and object.is this posible?

and if is not posible how you storage arrays in and object , you do in his porperties or …
How you do it?

both options should be great store in and object or in the scene.

Any help will be apreciated.

7 Replies

Yes, that exists.
Look in reference : “Persistent Global Variables”

thanks a lot it work and made my life much easier .

working perfectly

sometimes is hard to find thinks on the maxscript help.

on the subject of arrays and maxhelp. I remember there is a way to get the listener to list the entire contents of an array. normally it tops out at about 20 items and leaves #(item20…) how do you get the full array?

withprintallelements on (insert your code here e.g. print superlongarray)

mark

great!!! thanks!!!

if you want to keep saving things to a file but you want it automated you can use presave/postload callbacks to get your data saved/loaded every time your save/load a scene…

/Lui

if you use the #filepreopen callback be careful.
Loading render presets will call this and make things funky.
Someone showed me the callbacks.notificationParam() to determine
if a file is really being opened etc or if something else is being done that triggers
the #filepreopen, hence loading render presets.