Fix #103284: Cycles uses sampling pattern from debug UI
The sampling pattern is only a debug setting at this point and should not be used without the debug UI enabled where users can actually see and edit the value. Pull Request: https://projects.blender.org/blender/blender/pulls/112606
This commit is contained in:
committed by
Brecht Van Lommel
parent
e9fb0be754
commit
c8365bb217
@@ -375,7 +375,8 @@ class CYCLES_RENDER_PT_sampling_advanced(CyclesButtonsPanel, Panel):
|
||||
layout.separator()
|
||||
|
||||
heading = layout.column(align=True, heading="Scrambling Distance")
|
||||
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL'
|
||||
# Tabulated Sobol is used when the debug UI is turned off.
|
||||
heading.active = cscene.sampling_pattern == 'TABULATED_SOBOL' or not CyclesDebugButtonsPanel.poll(context)
|
||||
heading.prop(cscene, "auto_scrambling_distance", text="Automatic")
|
||||
heading.prop(cscene, "preview_scrambling_distance", text="Viewport")
|
||||
heading.prop(cscene, "scrambling_distance", text="Multiplier")
|
||||
|
||||
@@ -355,8 +355,14 @@ void BlenderSync::sync_integrator(BL::ViewLayer &b_view_layer, bool background)
|
||||
scene->light_manager->tag_update(scene, LightManager::UPDATE_ALL);
|
||||
}
|
||||
|
||||
SamplingPattern sampling_pattern = (SamplingPattern)get_enum(
|
||||
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_TABULATED_SOBOL);
|
||||
SamplingPattern sampling_pattern;
|
||||
if (use_developer_ui) {
|
||||
sampling_pattern = (SamplingPattern)get_enum(
|
||||
cscene, "sampling_pattern", SAMPLING_NUM_PATTERNS, SAMPLING_PATTERN_TABULATED_SOBOL);
|
||||
}
|
||||
else {
|
||||
sampling_pattern = SAMPLING_PATTERN_TABULATED_SOBOL;
|
||||
}
|
||||
integrator->set_sampling_pattern(sampling_pattern);
|
||||
|
||||
int samples = 1;
|
||||
|
||||
Reference in New Issue
Block a user