PDA

View Full Version : 12-16 bits of storage


Kramsurfer
02-19-2004, 10:44 PM
Hello;

I wish to attach approximately 12-16 bits of info to each object in a max scene, what is the best way to do this. The info does not need to be visible to the user, strickly accessed via MaxScript..

Thanks

Keith Morrison

magicm
02-19-2004, 11:35 PM
setAppData might be an option for you, the only drawback being that it only takes strings.. So you'd need to convert integers to strings (and visa versa with getAppData).

Another option might be custom attributes.

good luck
- Martijn

Kramsurfer
02-20-2004, 12:29 AM
I looked at Custom Attributes, but if you've 10000-15000 objects in your scene.. ha ha..... they seems to start killing a max file around the 2000 objects with CA's point...

I'll try the AppData... thanks...

ummm.. not exactly a safe place to keep data huh? Seems it open to any plugin that might write data there??


Keith Morrison

magicm
02-20-2004, 02:08 AM
Originally posted by Kramsurfer
ummm.. not exactly a safe place to keep data huh? Seems it open to any plugin that might write data there??

setAppData uses an integer, which can range from -2,147,483,648 to 2,147,483,647... Just pick a number within that range and I think you'll be safe ;)

- Martijn

Kramsurfer
02-20-2004, 02:12 AM
and it's fast too..

I just appdata'd 22,000 objects with 50 data sets in about 1.5 seconds... yes this is the answer!! thanks!!

Keith

CGTalk Moderation
01-17-2006, 12:00 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.