Hi Mitchel, I wouldn't recommend using primitive pointers in dna structures. I am even not sure if it works. You will need to write an custom reader/writer to handle this situation. When using fixed array, storing and reading works out of the box.
I don't think that blender will write your material correctly to a file (it will only store the pointer, and not the data that where the pointer points to.) It should not be a problem if the data can be reconstructed during reading process. (this has been done before with methodpointers). Jeroen. Original Message: ----------------- From: Mitchell Stokes [email protected] Date: Tue, 11 May 2010 19:50:37 -0700 To: [email protected] Subject: Re: [Bf-committers] char* or char[MAX_FILE] in DNA? On Tue, May 11, 2010 at 4:36 PM, Joshua Leung <[email protected]> wrote: > Hi, > > On Wed, May 12, 2010 at 10:16 AM, Mitchell Stokes <[email protected]> > wrote: > > Should I continue to use the char* or should I use char[MAX_FILE]? (I > have > > both working) > > If I use char[MAX_FILE], > Just beware that you shouldn't actually define it like that in the > DNA_*_types.h files, since makesdna doesn't understand preprocessor > statements like that, and actually ends up balking when you give it a > file like that. Yeah, I've already run into that problem. They are defined as follows: char *vertex_shader; etc _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers -------------------------------------------------------------------- mail2web LIVE Free email based on Microsoft® Exchange technology - http://link.mail2web.com/LIVE _______________________________________________ Bf-committers mailing list [email protected] http://lists.blender.org/mailman/listinfo/bf-committers
