diff options
author | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:29:50 +0300 |
---|---|---|
committer | Jeroen Bakker <jeroen@blender.org> | 2021-02-12 13:35:05 +0300 |
commit | 26481eabe1e66da2a322190f15ad600d9d69bbee (patch) | |
tree | 15a56363f559558847e2ea7becad623d6d4d550f /intern/cycles/blender/blender_sync.cpp | |
parent | 837b5743ced83c5dfe724a8285eee504f623dbfb (diff) |
Cycles: Use Blender Settings For AOV
This patch will share the AOV settings between Cycles and Eevee.
It enable using the AOV name conflict detection of Blender. This
means that unlike how Cycles used to work it isn't possible to add an
AOV with a similar name. Conflicts with internal render pass names will
be indicated with an Warning icon.
Reviewed By: Brecht van Lommel
Differential Revision: https://developer.blender.org/D9774
Diffstat (limited to 'intern/cycles/blender/blender_sync.cpp')
-rw-r--r-- | intern/cycles/blender/blender_sync.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/intern/cycles/blender/blender_sync.cpp b/intern/cycles/blender/blender_sync.cpp index e27daa2488d..f5890c7e6cb 100644 --- a/intern/cycles/blender/blender_sync.cpp +++ b/intern/cycles/blender/blender_sync.cpp @@ -706,9 +706,15 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, } } - RNA_BEGIN (&crl, b_aov, "aovs") { - bool is_color = (get_enum(b_aov, "type") == 1); - string name = get_string(b_aov, "name"); + BL::ViewLayer::aovs_iterator b_aov_iter; + for (b_view_layer.aovs.begin(b_aov_iter); b_aov_iter != b_view_layer.aovs.end(); ++b_aov_iter) { + BL::AOV b_aov(*b_aov_iter); + if (!b_aov.is_valid()) { + continue; + } + + string name = b_aov.name(); + bool is_color = b_aov.type() == BL::AOV::type_COLOR; if (is_color) { b_engine.add_pass(name.c_str(), 4, "RGBA", b_view_layer.name().c_str()); @@ -719,7 +725,6 @@ vector<Pass> BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, Pass::add(PASS_AOV_VALUE, passes, name.c_str()); } } - RNA_END; scene->film->set_denoising_data_pass(denoising.use || denoising.store_passes); scene->film->set_denoising_clean_pass(scene->film->get_denoising_flags() & |