[Bf-blender-cvs] [94d1674] master: Fix T47303: Voxel texture disappears after first frame
Campbell Barton
noreply at git.blender.org
Wed Feb 3 07:45:10 CET 2016
Commit: 94d1674ddcce3356489c79e58473450d015c8a59
Author: Campbell Barton
Date: Wed Feb 3 17:33:51 2016 +1100
Branches: master
https://developer.blender.org/rB94d1674ddcce3356489c79e58473450d015c8a59
Fix T47303: Voxel texture disappears after first frame
Failed reads didn't update the voxel 'ok' tag,
making successive reads fail (even on existing frames).
===================================================================
M source/blender/render/intern/source/voxeldata.c
===================================================================
diff --git a/source/blender/render/intern/source/voxeldata.c b/source/blender/render/intern/source/voxeldata.c
index bb92a8f..7a0d12d 100644
--- a/source/blender/render/intern/source/voxeldata.c
+++ b/source/blender/render/intern/source/voxeldata.c
@@ -371,7 +371,6 @@ static void init_frame_hair(VoxelData *vd, int UNUSED(cfra))
{
Object *ob;
ModifierData *md;
- bool found = false;
vd->dataset = NULL;
if (vd->object == NULL) return;
@@ -381,11 +380,9 @@ static void init_frame_hair(VoxelData *vd, int UNUSED(cfra))
ParticleSystemModifierData *pmd = (ParticleSystemModifierData *)md;
if (pmd->psys && pmd->psys->clmd) {
- found |= BPH_cloth_solver_get_texture_data(ob, pmd->psys->clmd, vd);
+ vd->ok |= BPH_cloth_solver_get_texture_data(ob, pmd->psys->clmd, vd);
}
}
-
- vd->ok = found;
}
void cache_voxeldata(Tex *tex, int scene_frame)
@@ -414,6 +411,9 @@ void cache_voxeldata(Tex *tex, int scene_frame)
BLI_strncpy(path, vd->source_path, sizeof(path));
+ /* each type is responsible for setting to true */
+ vd->ok = false;
+
switch (vd->file_format) {
case TEX_VD_IMAGE_SEQUENCE:
load_frame_image_sequence(vd, tex);
More information about the Bf-blender-cvs
mailing list