diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-23 10:39:29 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-01-23 10:39:40 +0300 |
commit | e9452f909cdba368f54637cd0b15ff14d1c60cf3 (patch) | |
tree | 7d276fa9063f351e8b9f128f4436b87c2338c764 /source/blender/blenkernel/BKE_pointcache.h | |
parent | 275abd14a0963a42aeb6e7fcd9b61ac8bc00da42 (diff) |
Implementation of OpenVDB as a possible cache format for smoke
simulations.
This commits implements OpenVDB as an extra cache format in the Point
Cache system for smoke simulations. Compilation with the library is
turned off by default for now, and shall be enabled when the library is
present.
A documentation of its doings is available here: http://
wiki.blender.org/index.php/User:Kevindietrich/OpenVDBSmokeExport.
A guide to compile OpenVDB can be found here (Linux): http://
wiki.blender.org/index.php?title=Dev:Doc/Building_Blender/Linux/
Dependencies_From_Source#OpenVDB
Reviewers: sergey, lukastoenne, brecht, campbellbarton
Reviewed By: brecht, campbellbarton
Subscribers: galenb, Blendify, robocyte, Lapineige, bliblubli,
jtheninja, lukasstockner97, dingto, brecht
Differential Revision: https://developer.blender.org/D1721
Diffstat (limited to 'source/blender/blenkernel/BKE_pointcache.h')
-rw-r--r-- | source/blender/blenkernel/BKE_pointcache.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/source/blender/blenkernel/BKE_pointcache.h b/source/blender/blenkernel/BKE_pointcache.h index d1b8aa672c5..40dbffe7222 100644 --- a/source/blender/blenkernel/BKE_pointcache.h +++ b/source/blender/blenkernel/BKE_pointcache.h @@ -94,6 +94,9 @@ struct SmokeModifierData; struct SoftBody; struct RigidBodyWorld; +struct OpenVDBReader; +struct OpenVDBWriter; + /* temp structure for read/write */ typedef struct PTCacheData { unsigned int index; @@ -119,13 +122,18 @@ typedef struct PTCacheFile { #define PTCACHE_VEL_PER_SEC 1 +enum { + PTCACHE_FILE_PTCACHE = 0, + PTCACHE_FILE_OPENVDB = 1, +}; + typedef struct PTCacheID { struct PTCacheID *next, *prev; struct Scene *scene; struct Object *ob; void *calldata; - unsigned int type; + unsigned int type, file_type; unsigned int stack_index; unsigned int flag; @@ -147,6 +155,11 @@ typedef struct PTCacheID { /* copies cache cata to point data */ int (*read_stream)(PTCacheFile *pf, void *calldata); + /* copies point data to cache data */ + int (*write_openvdb_stream)(struct OpenVDBWriter *writer, void *calldata); + /* copies cache cata to point data */ + int (*read_openvdb_stream)(struct OpenVDBReader *reader, void *calldata); + /* copies custom extradata to cache data */ void (*write_extra_data)(void *calldata, struct PTCacheMem *pm, int cfra); /* copies custom extradata to cache data */ |