Commit: 6c2727e08eff90d404eeead247ed75b709e375e8
Author: Kévin Dietrich
Date:   Fri May 22 05:49:43 2015 +0200
Branches: openvdb
https://developer.blender.org/rB6c2727e08eff90d404eeead247ed75b709e375e8

Initialize the VDB writer when creating a new cache.

===================================================================

M       source/blender/blenkernel/intern/smoke.c
M       source/blender/editors/object/CMakeLists.txt
M       source/blender/editors/object/object_modifier.c

===================================================================

diff --git a/source/blender/blenkernel/intern/smoke.c 
b/source/blender/blenkernel/intern/smoke.c
index 9eb183e..17d7c7d 100644
--- a/source/blender/blenkernel/intern/smoke.c
+++ b/source/blender/blenkernel/intern/smoke.c
@@ -3287,7 +3287,6 @@ void smokeModifier_OpenVDB_export(SmokeModifierData *smd, 
Scene *scene, Object *
        orig_frame = scene->r.cfra;
 
        cache = BKE_openvdb_get_current_cache(sds);
-       cache->writer = OpenVDBWriter_create();
        OpenVDBWriter_set_compression(cache->writer, 0);
 
        for (fr = cache->startframe; fr <= cache->endframe; fr++) {
diff --git a/source/blender/editors/object/CMakeLists.txt 
b/source/blender/editors/object/CMakeLists.txt
index afb852a..27a7a10 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -29,6 +29,7 @@ set(INC
        ../../imbuf
        ../../makesdna
        ../../makesrna
+       ../../openvdb
        ../../python
        ../../render/extern/include
        ../../windowmanager
diff --git a/source/blender/editors/object/object_modifier.c 
b/source/blender/editors/object/object_modifier.c
index f0cee1e..fd76eef 100644
--- a/source/blender/editors/object/object_modifier.c
+++ b/source/blender/editors/object/object_modifier.c
@@ -91,6 +91,7 @@
 #include "WM_types.h"
 
 #include "object_intern.h"
+#include "openvdb_capi.h"
 
 static void modifier_skin_customdata_delete(struct Object *ob);
 
@@ -2495,7 +2496,7 @@ static OpenVDBCache *openvdb_cache_new(void)
 
     cache = MEM_callocN(sizeof(OpenVDBCache), "OpenVDBCache");
        cache->reader = NULL;
-       cache->writer = NULL;
+       cache->writer = OpenVDBWriter_create();
     cache->startframe = 1;
     cache->endframe = 250;

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to