Commit: 1f88c9c667ba51c4b0297b68fa4b867ce46c280e
Author: Martin Felke
Date:   Thu Aug 9 14:11:32 2018 +0200
Branches: temp-fracture-modifier-2.8
https://developer.blender.org/rB1f88c9c667ba51c4b0297b68fa4b867ce46c280e

yay first fracture sim in 2.8 :) (but not very stable yet)

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

M       source/blender/blenkernel/intern/rigidbody.c

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

diff --git a/source/blender/blenkernel/intern/rigidbody.c 
b/source/blender/blenkernel/intern/rigidbody.c
index fa9cc866372..e419886a12c 100644
--- a/source/blender/blenkernel/intern/rigidbody.c
+++ b/source/blender/blenkernel/intern/rigidbody.c
@@ -1192,12 +1192,12 @@ RigidBodyWorld *BKE_rigidbody_world_copy(RigidBodyWorld 
*rbw, const int flag)
                rbw_copy->shared = MEM_callocN(sizeof(*rbw_copy->shared), 
"RigidBodyWorld_Shared");
                BKE_ptcache_copy_list(&rbw_copy->shared->ptcaches, 
&rbw->shared->ptcaches, LIB_ID_COPY_CACHES);
                rbw_copy->shared->pointcache = rbw_copy->shared->ptcaches.first;
-
-               rbw_copy->shared->objects = NULL;
-               rbw_copy->shared->numbodies = 0;
-               BKE_rigidbody_update_ob_array(rbw_copy, false);
        }
 
+       rbw_copy->shared->objects = NULL;
+       rbw_copy->shared->numbodies = 0;
+       BKE_rigidbody_update_ob_array(rbw_copy, false);
+
        return rbw_copy;
 }
 
@@ -2649,8 +2649,7 @@ void BKE_rigidbody_do_simulation(Depsgraph *depsgraph, 
Scene *scene, float ctime
        }
 
        /* advance simulation, we can only step one frame forward */
-       //if (compare_ff_relative(ctime, rbw->ltime + 1, FLT_EPSILON, 64))
-       if (can_simulate)
+       if (compare_ff_relative(ctime, rbw->ltime + 1, FLT_EPSILON, 64))
        {
                /* write cache for first frame when on second frame */
                if (rbw->ltime == startframe && (cache->flag & PTCACHE_OUTDATED 
|| cache->last_exact == 0)) {

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to