diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-08-18 13:15:46 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2020-08-18 15:28:59 +0300 |
commit | 1da0685076bbddaaa9eb20366f07b5d552f03eb4 (patch) | |
tree | 2729556dcaf38ac0cfa4359c777ac098f668afa8 /intern/cycles/render/scene.cpp | |
parent | 673b1930d85bb9759a1297fa3d354f216dcd98da (diff) |
Cycles: add a Pass Node
The Pass struct is now a Node and the passes are moved from the Film
class to the Scene class.
The Pass Node only has `type` and `name` as sockets as those seem to be
the only properties settable by exporters (other properties are implicit
and depend on the pass type).
This is part of T79131.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D8591
Diffstat (limited to 'intern/cycles/render/scene.cpp')
-rw-r--r-- | intern/cycles/render/scene.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/intern/cycles/render/scene.cpp b/intern/cycles/render/scene.cpp index e68ab335da4..a8a5b50e6a2 100644 --- a/intern/cycles/render/scene.cpp +++ b/intern/cycles/render/scene.cpp @@ -115,6 +115,8 @@ Scene::Scene(const SceneParams ¶ms_, Device *device) /* TODO(sergey): Check if it's indeed optimal value for the split kernel. */ max_closure_global = 1; + film->add_default(this); + /* OSL only works on the CPU */ if (device->info.has_osl) shader_manager = ShaderManager::create(params.shadingsystem); @@ -322,7 +324,7 @@ Scene::MotionType Scene::need_motion() { if (integrator->motion_blur) return MOTION_BLUR; - else if (Pass::contains(film->passes, PASS_MOTION)) + else if (Pass::contains(passes, PASS_MOTION)) return MOTION_PASS; else return MOTION_NONE; @@ -339,7 +341,7 @@ float Scene::motion_shutter_time() bool Scene::need_global_attribute(AttributeStandard std) { if (std == ATTR_STD_UV) - return Pass::contains(film->passes, PASS_UV); + return Pass::contains(passes, PASS_UV); else if (std == ATTR_STD_MOTION_VERTEX_POSITION) return need_motion() != MOTION_NONE; else if (std == ATTR_STD_MOTION_VERTEX_NORMAL) |