Fix Cycles unknown passes logged when build with Cycles debug
When WITH_CYCLES_DEBUG is set to ON the following errors are printed to the console: E0412 15:51:22.588564 7996345 sync.cpp:737] Unknown pass Guiding Color E0412 15:51:22.588605 7996345 sync.cpp:737] Unknown pass Guiding Probability E0412 15:51:22.588613 7996345 sync.cpp:737] Unknown pass Guiding Average Roughness This change fixes this by treating the guiding passes the same way as all other passes, solving the errors and making it possible to visualize guiding passes in the viewport later on. Pull Request: https://projects.blender.org/blender/blender/pulls/106863
This commit is contained in:
committed by
Sergey Sharybin
parent
34739f6a6d
commit
e5d50b1787
@@ -172,6 +172,8 @@ def system_info():
|
||||
|
||||
|
||||
def list_render_passes(scene, srl):
|
||||
import _cycles
|
||||
|
||||
crl = srl.cycles
|
||||
|
||||
# Combined pass.
|
||||
@@ -250,6 +252,12 @@ def list_render_passes(scene, srl):
|
||||
for lightgroup in srl.lightgroups:
|
||||
yield ("Combined_%s" % lightgroup.name, "RGB", 'COLOR')
|
||||
|
||||
# Path guiding debug passes.
|
||||
if _cycles.with_debug:
|
||||
yield ("Guiding Color", "RGB", 'COLOR')
|
||||
yield ("Guiding Probability", "X", 'VALUE')
|
||||
yield ("Guiding Average Roughness", "X", 'VALUE')
|
||||
|
||||
|
||||
def register_passes(engine, scene, view_layer):
|
||||
for name, channelids, channeltype in list_render_passes(scene, view_layer):
|
||||
|
||||
@@ -634,6 +634,10 @@ static bool get_known_pass_type(BL::RenderPass &b_pass, PassType &type, PassMode
|
||||
MAP_PASS("AdaptiveAuxBuffer", PASS_ADAPTIVE_AUX_BUFFER, false);
|
||||
MAP_PASS("Debug Sample Count", PASS_SAMPLE_COUNT, false);
|
||||
|
||||
MAP_PASS("Guiding Color", PASS_GUIDING_COLOR, false);
|
||||
MAP_PASS("Guiding Probability", PASS_GUIDING_PROBABILITY, false);
|
||||
MAP_PASS("Guiding Average Roughness", PASS_GUIDING_AVG_ROUGHNESS, false);
|
||||
|
||||
if (string_startswith(name, cryptomatte_prefix)) {
|
||||
type = PASS_CRYPTOMATTE;
|
||||
mode = PassMode::DENOISED;
|
||||
@@ -684,18 +688,6 @@ void BlenderSync::sync_render_passes(BL::RenderLayer &b_rlay, BL::ViewLayer &b_v
|
||||
}
|
||||
scene->film->set_cryptomatte_passes(cryptomatte_passes);
|
||||
|
||||
/* Path guiding debug passes. */
|
||||
#ifdef WITH_CYCLES_DEBUG
|
||||
b_engine.add_pass("Guiding Color", 3, "RGB", b_view_layer.name().c_str());
|
||||
pass_add(scene, PASS_GUIDING_COLOR, "Guiding Color", PassMode::NOISY);
|
||||
|
||||
b_engine.add_pass("Guiding Probability", 1, "X", b_view_layer.name().c_str());
|
||||
pass_add(scene, PASS_GUIDING_PROBABILITY, "Guiding Probability", PassMode::NOISY);
|
||||
|
||||
b_engine.add_pass("Guiding Average Roughness", 1, "X", b_view_layer.name().c_str());
|
||||
pass_add(scene, PASS_GUIDING_AVG_ROUGHNESS, "Guiding Average Roughness", PassMode::NOISY);
|
||||
#endif
|
||||
|
||||
unordered_set<string> expected_passes;
|
||||
|
||||
/* Custom AOV passes. */
|
||||
|
||||
Reference in New Issue
Block a user