Commit: 40a8ef5ef02427215afd6cacca353630a57cdbf5
Author: Lukas Tönne
Date:   Thu Feb 12 16:37:28 2015 +0100
Branches: alembic_pointcache
https://developer.blender.org/rB40a8ef5ef02427215afd6cacca353630a57cdbf5

Merge branch 'master' into alembic_pointcache

Conflicts:
        source/blender/blenkernel/intern/cloth.c

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



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

diff --cc source/blender/blenkernel/intern/cloth.c
index 3ba32f3,3173489..193324b
--- a/source/blender/blenkernel/intern/cloth.c
+++ b/source/blender/blenkernel/intern/cloth.c
@@@ -450,18 -462,13 +449,15 @@@ void clothModifier_do(ClothModifierDat
        BKE_ptcache_id_time(&pid, scene, framenr, &startframe, &endframe, 
&timescale);
        clmd->sim_parms->timescale= timescale;
  
-       if (clmd->sim_parms->reset ||
-           (framenr == (startframe - clmd->sim_parms->preroll) && 
clmd->sim_parms->preroll != 0) ||
-           (clmd->clothObject && dm->getNumVerts(dm) != 
clmd->clothObject->numverts))
-       {
+       if (clmd->sim_parms->reset || (clmd->clothObject && dm->getNumVerts(dm) 
!= clmd->clothObject->numverts)) {
                clmd->sim_parms->reset = 0;
 -              cache->flag |= PTCACHE_OUTDATED;
 +              cloth_free_modifier(clmd);
 +              
 +              cache->state.flag |= PTC_STATE_OUTDATED;
                BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
                BKE_ptcache_validate(cache, 0);
 -              cache->last_exact= 0;
 -              cache->flag &= ~PTCACHE_REDO_NEEDED;
 +              cache->state.last_exact= 0;
 +              cache->state.flag &= ~PTC_STATE_REDO_NEEDED;
        }
        
        // unused in the moment, calculated separately in implicit.c
@@@ -496,14 -487,11 +476,14 @@@
        if (!do_init_cloth(ob, clmd, dm, framenr))
                return;
  
-       if ((framenr == startframe) && (clmd->sim_parms->preroll == 0)) {
+       if (framenr == startframe) {
 +              cloth_free_modifier(clmd);
 +
                BKE_ptcache_id_reset(scene, &pid, PTCACHE_RESET_OUTDATED);
 -              do_init_cloth(ob, clmd, dm, framenr);
                BKE_ptcache_validate(cache, framenr);
 -              cache->flag &= ~PTCACHE_REDO_NEEDED;
 +              cache->state.flag &= ~PTC_STATE_REDO_NEEDED;
 +
 +              do_init_cloth(ob, clmd, dm, framenr);
                clmd->clothObject->last_frame= framenr;
                return;
        }

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

Reply via email to