[Bf-committers] Another library data question, and a suggestion on documentation

Joe Eagar joeedh at gmail.com
Tue Jul 25 00:05:10 CEST 2006


Branan Riley wrote:
> Alright, more questions about the library. I've been trying to figure 
> out how to properly save and load library data that's linked 
> elsewhere. Here's what I think I need to do. As soon as this is 
> figured out, I'll know just about everything I need to do to make it 
> all work.
>  
> SAVING
> -Save the library data for my shader nodes
> -Save the new pointers along with everything else in the Material 
> structure
>  
> What else is there to do in here? Are there any weird functions that 
> need to be called to make sure that when the data is loaded, it can be 
> re-pointed to the right location?
One of the arguments in the struct you use to define nodes, is the name 
DNA struct that get's automatically saved by the node system.  If the 
struct has pointers to other data then you have to insert custom code 
into source/blender/blenloader/read(and write)file.c. 

See makesdna/DNA_node_types.h.
>  
> LOADING
> I have no idea about loading. The loading code is much more complex 
> than the saving code. It kind of scares me, actually.
>  
Again, so long as there is no pointers or such in the DNA struct you 
make, then saving/loading should be fairly automatic.

Joe


More information about the Bf-committers mailing list