forked from bartvdbraak/blender
Fix T54299: crash rendering objects with motion blur disabled, after recent changes.
This commit is contained in:
parent
44aa86b0a5
commit
17793a66c6
@ -391,7 +391,7 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
|
||||
|
||||
if(scene->need_motion() == Scene::MOTION_BLUR) {
|
||||
motion_steps = object_motion_steps(b_parent, b_ob);
|
||||
if(object_use_deform_motion(b_parent, b_ob)) {
|
||||
if(motion_steps && object_use_deform_motion(b_parent, b_ob)) {
|
||||
mesh->motion_steps = motion_steps;
|
||||
mesh->use_motion_blur = true;
|
||||
}
|
||||
@ -402,10 +402,13 @@ Object *BlenderSync::sync_object(BL::Object& b_parent,
|
||||
}
|
||||
|
||||
object->motion.resize(motion_steps, transform_empty());
|
||||
object->motion[motion_steps/2] = tfm;
|
||||
|
||||
for(size_t step = 0; step < motion_steps; step++) {
|
||||
motion_times.insert(object->motion_time(step));
|
||||
if(motion_steps) {
|
||||
object->motion[motion_steps/2] = tfm;
|
||||
|
||||
for(size_t step = 0; step < motion_steps; step++) {
|
||||
motion_times.insert(object->motion_time(step));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user