diff --git a/intern/cycles/render/camera.cpp b/intern/cycles/render/camera.cpp index 8a4eaf63414..89505221862 100644 --- a/intern/cycles/render/camera.cpp +++ b/intern/cycles/render/camera.cpp @@ -80,6 +80,7 @@ Camera::Camera() need_update = true; need_device_update = true; + need_flags_update = true; previous_need_motion = -1; } @@ -171,6 +172,7 @@ void Camera::update() need_update = false; need_device_update = true; + need_flags_update = true; } void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene) @@ -288,7 +290,7 @@ void Camera::device_update_volume(Device * /*device*/, DeviceScene *dscene, Scene *scene) { - if(!need_device_update) { + if(!need_device_update && !need_flags_update) { return; } KernelCamera *kcam = &dscene->data.cam; @@ -304,6 +306,7 @@ void Camera::device_update_volume(Device * /*device*/, } } need_device_update = false; + need_flags_update = false; } void Camera::device_free(Device * /*device*/, DeviceScene * /*dscene*/) diff --git a/intern/cycles/render/camera.h b/intern/cycles/render/camera.h index 00387bcb7b1..3efbe904e2f 100644 --- a/intern/cycles/render/camera.h +++ b/intern/cycles/render/camera.h @@ -105,6 +105,7 @@ public: /* update */ bool need_update; bool need_device_update; + bool need_flags_update; int previous_need_motion; /* functions */ diff --git a/intern/cycles/render/object.cpp b/intern/cycles/render/object.cpp index 6650b42d39c..da9bc23ccc4 100644 --- a/intern/cycles/render/object.cpp +++ b/intern/cycles/render/object.cpp @@ -14,6 +14,7 @@ * limitations under the License. */ +#include "camera.h" #include "device.h" #include "light.h" #include "mesh.h" @@ -192,6 +193,7 @@ void Object::tag_update(Scene *scene) } } + scene->camera->need_flags_update = true; scene->curve_system_manager->need_update = true; scene->mesh_manager->need_update = true; scene->object_manager->need_update = true; diff --git a/intern/cycles/render/shader.cpp b/intern/cycles/render/shader.cpp index 2eaba3fa786..667279360c3 100644 --- a/intern/cycles/render/shader.cpp +++ b/intern/cycles/render/shader.cpp @@ -15,6 +15,7 @@ */ #include "background.h" +#include "camera.h" #include "device.h" #include "graph.h" #include "light.h"