07 July 2005 | |
![]() |
|
New Member
|
saving array down to disk
Hi.
I need to save an array of booleans in an external file that would let me open the max scene and run the script using the array directly without having to fill it first with the values (because of the time this task takes to complete) but by just loading the file containing the array as i would with a bitmap file. if somebody could tell how to save the array for future use (and how to load it afterwards) i would be very grateful. thanks. |
07 July 2005 | |
![]() |
|
in 3D!
portfolio
Joshua Newman
Director
MESHROOM
London,
United Kingdom
|
Hi Grenadine,
you can save variables (including arrays) inside of MAX files by making them persistent does this help you? have a read in the MSX help. J. __________________
www.joshuanewman.net |
07 July 2005 | |
![]() |
|
New Member
|
array saved with the whole file a bit weighty
Hi j_man
Thanks for the piece of advice. Gotta try but seems like a solution. However an external file would be more handy because it would enable me to load in my max file a specified version of the array among several coming from different max scenes. (by keeping a library of my different arrays on disk, instead of a bunch of heavy max files) Heard it was possible but couldn't make it from the Mxs examples. Thanks J_man i'm sure it'll make it for now. |
07 July 2005 | |
![]() |
|
in 3D!
portfolio
Joshua Newman
Director
MESHROOM
London,
United Kingdom
|
Ok,
well basically you need to create a function to save your txt file:
and then you need to create a function to re-construct the data from the text file when you load it again. I just posted something else along these methods:
Cheers, J. __________________
www.joshuanewman.net |
07 July 2005 | |
![]() |
|
New Member
|
Works perfectly. this is exactly what i needed.
Thank you J, both of your tips helped a lot. Cheers |
07 July 2005 | |
![]() |
|
in 3D!
portfolio
Joshua Newman
Director
MESHROOM
London,
United Kingdom
|
You're welcome! glad to help.
Josh. __________________
www.joshuanewman.net |
07 July 2005 | |
![]() |
|
Maxscript Generator
portfolio
CGConnect Member
Martijn van Herk
VFX Technical Director
Freelance
Rotterdam,
Netherlands
|
This method might be more appropriate in your case since it will read the values back in as integers just like you had in the original array. - Martijn |
07 July 2005 | |
![]() |
|
in 3D!
portfolio
Joshua Newman
Director
MESHROOM
London,
United Kingdom
|
good point Martijn, I'd overlooked that!
J. __________________
www.joshuanewman.net |
07 July 2005 | |
![]() |
|
Expert
|
Thread automatically closed
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.
__________________
CGTalk Policy/Legalities Note that as CGTalk Members, you agree to the terms and conditions of using this website. |
Thread Closed share thread |
«
Previous Thread
|
Next Thread
»
|
|
|