diff options
Diffstat (limited to 'source/blender/blenkernel/intern/cloth.c')
-rw-r--r-- | source/blender/blenkernel/intern/cloth.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/cloth.c b/source/blender/blenkernel/intern/cloth.c index 4e0d969a492..5685259d9d3 100644 --- a/source/blender/blenkernel/intern/cloth.c +++ b/source/blender/blenkernel/intern/cloth.c @@ -473,13 +473,30 @@ Mesh *clothModifier_do( /* TODO(Ish): clmd->mesh = mesh_result should be done only on the first frame of reading the * cache */ + if (clmd->mesh) { + printf("\nclmd->mesh in %s before has totvert: %d totedge: %d totface: %d\n", + __func__, + clmd->mesh->totvert, + clmd->mesh->totedge, + clmd->mesh->totpoly); + } + else { + printf("\n"); + } if (clmd->flags & MOD_CLOTH_FLAG_PREV_FRAME_READ_CACHE) { - printf("\nPrevious read from cache\n"); + printf("Previous read from cache\n"); } else { - printf("\nPrevious frame was simulated\n"); + printf("Previous frame was simulated\n"); clmd->mesh = mesh_result; } + if (clmd->mesh) { + printf("clmd->mesh in %s after has totvert: %d totedge: %d totface: %d\n", + __func__, + clmd->mesh->totvert, + clmd->mesh->totedge, + clmd->mesh->totpoly); + } cache_result = BKE_ptcache_read(&pid, (float)framenr + scene->r.subframe, can_simulate); if (cache_result == PTCACHE_READ_EXACT || cache_result == PTCACHE_READ_INTERPOLATED || @@ -572,9 +589,9 @@ void cloth_free_modifier(ClothModifierData *clmd) if (!clmd) { return; } - clmd->depsgraph = NULL; - clmd->ob = NULL; - clmd->mesh = NULL; + /* clmd->depsgraph = NULL; */ + /* clmd->ob = NULL; */ + /* clmd->mesh = NULL; */ cloth = clmd->clothObject; @@ -664,9 +681,9 @@ void cloth_free_modifier_extern(ClothModifierData *clmd) return; } - clmd->depsgraph = NULL; - clmd->ob = NULL; - clmd->mesh = NULL; + /* clmd->depsgraph = NULL; */ + /* clmd->ob = NULL; */ + /* clmd->mesh = NULL; */ cloth = clmd->clothObject; |