forked from bartvdbraak/blender
Cycles: Fix missing camera-in-volume update when using certain render layers configurations
This commit is contained in:
parent
3d3d805b64
commit
0a60c7d8ee
@ -80,6 +80,7 @@ Camera::Camera()
|
|||||||
|
|
||||||
need_update = true;
|
need_update = true;
|
||||||
need_device_update = true;
|
need_device_update = true;
|
||||||
|
need_flags_update = true;
|
||||||
previous_need_motion = -1;
|
previous_need_motion = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,6 +172,7 @@ void Camera::update()
|
|||||||
|
|
||||||
need_update = false;
|
need_update = false;
|
||||||
need_device_update = true;
|
need_device_update = true;
|
||||||
|
need_flags_update = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
|
void Camera::device_update(Device *device, DeviceScene *dscene, Scene *scene)
|
||||||
@ -288,7 +290,7 @@ void Camera::device_update_volume(Device * /*device*/,
|
|||||||
DeviceScene *dscene,
|
DeviceScene *dscene,
|
||||||
Scene *scene)
|
Scene *scene)
|
||||||
{
|
{
|
||||||
if(!need_device_update) {
|
if(!need_device_update && !need_flags_update) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
KernelCamera *kcam = &dscene->data.cam;
|
KernelCamera *kcam = &dscene->data.cam;
|
||||||
@ -304,6 +306,7 @@ void Camera::device_update_volume(Device * /*device*/,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
need_device_update = false;
|
need_device_update = false;
|
||||||
|
need_flags_update = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Camera::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
|
void Camera::device_free(Device * /*device*/, DeviceScene * /*dscene*/)
|
||||||
|
@ -105,6 +105,7 @@ public:
|
|||||||
/* update */
|
/* update */
|
||||||
bool need_update;
|
bool need_update;
|
||||||
bool need_device_update;
|
bool need_device_update;
|
||||||
|
bool need_flags_update;
|
||||||
int previous_need_motion;
|
int previous_need_motion;
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include "camera.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "light.h"
|
#include "light.h"
|
||||||
#include "mesh.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->curve_system_manager->need_update = true;
|
||||||
scene->mesh_manager->need_update = true;
|
scene->mesh_manager->need_update = true;
|
||||||
scene->object_manager->need_update = true;
|
scene->object_manager->need_update = true;
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#include "background.h"
|
#include "background.h"
|
||||||
|
#include "camera.h"
|
||||||
#include "device.h"
|
#include "device.h"
|
||||||
#include "graph.h"
|
#include "graph.h"
|
||||||
#include "light.h"
|
#include "light.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user