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
This commit is contained in:
Kévin Dietrich
2020-08-18 12:15:46 +02:00
parent 673b1930d8
commit 1da0685076
9 changed files with 101 additions and 28 deletions

View File

@@ -97,17 +97,17 @@ void BakeManager::set(Scene *scene,
type = type_;
pass_filter = shader_type_to_pass_filter(type_, pass_filter_);
Pass::add(PASS_BAKE_PRIMITIVE, scene->film->passes);
Pass::add(PASS_BAKE_DIFFERENTIAL, scene->film->passes);
Pass::add(PASS_BAKE_PRIMITIVE, scene->passes);
Pass::add(PASS_BAKE_DIFFERENTIAL, scene->passes);
if (type == SHADER_EVAL_UV) {
/* force UV to be available */
Pass::add(PASS_UV, scene->film->passes);
Pass::add(PASS_UV, scene->passes);
}
/* force use_light_pass to be true if we bake more than just colors */
if (pass_filter & ~BAKE_FILTER_COLOR) {
Pass::add(PASS_LIGHT, scene->film->passes);
Pass::add(PASS_LIGHT, scene->passes);
}
/* create device and update scene */