[Bf-blender-cvs] [f694d379294] master: Fix T59792: Cycles crash rendering motion pass with motion blur enabled.
Brecht Van Lommel
noreply at git.blender.org
Wed Jan 2 17:47:45 CET 2019
Commit: f694d3792941ce24092865cffb038aa0e5cc08f2
Author: Brecht Van Lommel
Date: Wed Jan 2 17:46:57 2019 +0100
Branches: master
https://developer.blender.org/rBf694d3792941ce24092865cffb038aa0e5cc08f2
Fix T59792: Cycles crash rendering motion pass with motion blur enabled.
===================================================================
M intern/cycles/render/film.cpp
===================================================================
diff --git a/intern/cycles/render/film.cpp b/intern/cycles/render/film.cpp
index d0f15496e50..355294e23b5 100644
--- a/intern/cycles/render/film.cpp
+++ b/intern/cycles/render/film.cpp
@@ -328,8 +328,17 @@ void Film::device_update(Device *device, DeviceScene *dscene, Scene *scene)
for(size_t i = 0; i < passes.size(); i++) {
Pass& pass = passes[i];
- if(pass.type == PASS_NONE)
+ if(pass.type == PASS_NONE) {
continue;
+ }
+
+ /* Can't do motion pass if no motion vectors are available. */
+ if (pass.type == PASS_MOTION || pass.type == PASS_MOTION_WEIGHT) {
+ if (scene->need_motion() != Scene::MOTION_PASS) {
+ kfilm->pass_stride += pass.components;
+ continue;
+ }
+ }
int pass_flag = (1 << (pass.type % 32));
if(pass.type <= PASS_CATEGORY_MAIN_END) {
More information about the Bf-blender-cvs
mailing list