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:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:47 +0400
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2014-03-29 16:03:47 +0400
commit6997908afc38a3c98d09939f3b46f10d7a165d2e (patch)
tree4e38154ce0b5ebd5cc19b908fd9d1122da7a9077 /intern/cycles/blender/blender_object.cpp
parente2184c653e1f2cc7e05cf9a42a87d23ea3050eac (diff)
Cycles: add per object options to disable motion blur and set deformation motion steps.
Notes: * The motion steps only affect deformation motion blur. * The actual number of steps is 2^(steps - 1). This avoids having to sample at many different times for object with more/fewer steps, now the times overlap. * Deformation motion blur is enabled by default in existing files that have motion blur enabled. If the object is not deforming, this will be detected at export time, so raytracing performance will not be affected. Part of the code is from the summer of code project by Gavin Howard.
Diffstat (limited to 'intern/cycles/blender/blender_object.cpp')
-rw-r--r--intern/cycles/blender/blender_object.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_object.cpp b/intern/cycles/blender/blender_object.cpp
index bd4becb2dd4..69225594a03 100644
--- a/intern/cycles/blender/blender_object.cpp
+++ b/intern/cycles/blender/blender_object.cpp
@@ -244,7 +244,7 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
if(motion) {
object = object_map.find(key);
- if(object) {
+ if(object && (scene->need_motion() == Scene::MOTION_PASS || object_use_motion(b_ob))) {
/* object transformation */
if(tfm != object->tfm) {
if(motion_time == -1.0f) {
@@ -323,9 +323,11 @@ Object *BlenderSync::sync_object(BL::Object b_parent, int persistent_id[OBJECT_P
if(scene->need_motion() == Scene::MOTION_BLUR && object->mesh) {
Mesh *mesh = object->mesh;
- if(true) {
- if(true) {
- mesh->motion_steps = 3;
+ mesh->use_motion_blur = false;
+
+ if(object_use_motion(b_ob)) {
+ if(object_use_deform_motion(b_ob)) {
+ mesh->motion_steps = object_motion_steps(b_ob);
mesh->use_motion_blur = true;
}