diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 17:27:50 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2009-11-25 17:27:50 +0300 |
commit | 077edbb384e3845f27cc06618046a08c7101cc4c (patch) | |
tree | 7956c198717590d68a285ecb903f91064f35314a /source/blender/makesdna/DNA_customdata_types.h | |
parent | 436969ce49bc17573e8f87a87ef89d1d036d5f4e (diff) |
Sculpt: external file storage for multires
* This is experimental, the file format may change still!
* Helps reduce memory usage, keeps .blend files smaller, and makes
saving quicker when not editing multires.
* This is implemented at the customdata level, currently only the
multires displacements can be stored externally.
ToDo
* Better integration with object duplication/removal/..
* Memory is not yet freed when exiting sculpt mode.
* Loading only lower levels is not supported yet.
Diffstat (limited to 'source/blender/makesdna/DNA_customdata_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_customdata_types.h | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/makesdna/DNA_customdata_types.h b/source/blender/makesdna/DNA_customdata_types.h index ad686e37097..91e4cefce80 100644 --- a/source/blender/makesdna/DNA_customdata_types.h +++ b/source/blender/makesdna/DNA_customdata_types.h @@ -44,14 +44,19 @@ typedef struct CustomDataLayer { void *data; /* layer data */ } CustomDataLayer; +typedef struct CustomDataExternal { + char filename[240]; /* FILE_MAX */ +} CustomDataExternal; + /* structure which stores custom element data associated with mesh elements * (vertices, edges or faces). The custom data is organised into a series of * layers, each with a data type (e.g. MTFace, MDeformVert, etc.). */ typedef struct CustomData { - CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ - int totlayer, maxlayer; /* number of layers, size of layers array */ - int totsize, pad; /* in editmode, total size of all data layers */ - void *pool; /* for Bmesh: Memory pool for allocation of blocks*/ + CustomDataLayer *layers; /* CustomDataLayers, ordered by type */ + int totlayer, maxlayer; /* number of layers, size of layers array */ + int totsize, pad; /* in editmode, total size of all data layers */ + void *pool; /* Bmesh: Memory pool for allocation of blocks */ + CustomDataExternal *external; /* external file storing customdata layers */ } CustomData; /* CustomData.type */ @@ -115,6 +120,10 @@ typedef struct CustomData { #define CD_FLAG_NOFREE (1<<1) /* indicates the layer is only temporary, also implies no copy */ #define CD_FLAG_TEMPORARY ((1<<2)|CD_FLAG_NOCOPY) +/* indicates the layer is stored in an external file */ +#define CD_FLAG_EXTERNAL (1<<3) +/* indicates external data is read into memory */ +#define CD_FLAG_IN_MEMORY (1<<4) /* Limits */ #define MAX_MTFACE 8 |