Particle System: use DEG to get current time in psys_get_particle_state()
authorSybren A. Stüvel <sybren@stuvel.eu>
Wed, 16 May 2018 14:09:48 +0000 (16:09 +0200)
committerSybren A. Stüvel <sybren@stuvel.eu>
Wed, 16 May 2018 14:09:52 +0000 (16:09 +0200)
source/blender/blenkernel/intern/particle.c

index 4d07f212c970c1cd2d15ed090df420aa5fe84f36..ed09e89a770c1340f758103faccf0351003a6a48 100644 (file)
@@ -3867,7 +3867,7 @@ int psys_get_particle_state(ParticleSimulationData *sim, int p, ParticleKey *sta
        float timestep = psys_get_timestep(sim);
 
        /* negative time means "use current time" */
-       cfra = state->time > 0 ? state->time : BKE_scene_frame_get(sim->scene);
+       cfra = state->time > 0 ? state->time : DEG_get_ctime(sim->depsgraph);
 
        if (p >= totpart) {
                if (!psys->totchild)