[Bf-blender-cvs] [f0ea8a1] alembic: Use FPS value to sync the strand simulation time with the render time.
Lukas Tönne
noreply at git.blender.org
Fri Apr 3 11:29:00 CEST 2015
Commit: f0ea8a19c17ee9cf8b1955b5546aa44c32b823c2
Author: Lukas Tönne
Date: Fri Apr 3 11:28:15 2015 +0200
Branches: alembic
https://developer.blender.org/rBf0ea8a19c17ee9cf8b1955b5546aa44c32b823c2
Use FPS value to sync the strand simulation time with the render time.
Additionally the time can be scaled using the timescale parameter.
===================================================================
M source/blender/physics/intern/BPH_mass_spring.cpp
===================================================================
diff --git a/source/blender/physics/intern/BPH_mass_spring.cpp b/source/blender/physics/intern/BPH_mass_spring.cpp
index 2522dd9..3a2c29c 100644
--- a/source/blender/physics/intern/BPH_mass_spring.cpp
+++ b/source/blender/physics/intern/BPH_mass_spring.cpp
@@ -1272,7 +1272,7 @@ bool BPH_strands_solve(Strands *strands, Implicit_Data *id, StrandSimParams *par
if (params->timescale == 0.0f || params->substeps < 1)
return false;
- float tf = (frame - frame_prev) * params->timescale;
+ float tf = (FRA2TIME(frame) - FRA2TIME(frame_prev)) * params->timescale;
float dt = tf / params->substeps;
int numverts = strands->totverts;
More information about the Bf-blender-cvs
mailing list