Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--intern/cycles/render/object.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp
index 750fae98662..e2d6ae6fa18 100644
--- a/intern/cycles/render/object.cpp
+++ b/intern/cycles/render/object.cpp
@@ -189,11 +189,12 @@ vector<float> Object::motion_times()
{
/* compute times at which we sample motion for this object */
vector<float> times;
- int motion_steps = mesh->motion_steps;
- if(!mesh || motion_steps == 1)
+ if(!mesh || mesh->motion_steps == 1)
return times;
+ int motion_steps = mesh->motion_steps;
+
for(int step = 0; step < motion_steps; step++) {
if(step != motion_steps / 2) {
float time = 2.0f * step / (motion_steps - 1) - 1.0f;