Cycles: expose direct light sampling option in Debug panel, tweak panel layout
This commit is contained in:
@@ -429,7 +429,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
|
|||||||
)
|
)
|
||||||
|
|
||||||
direct_light_sampling_type: EnumProperty(
|
direct_light_sampling_type: EnumProperty(
|
||||||
name="Direct Light Sampling Type",
|
name="Direct Light Sampling",
|
||||||
description="The type of strategy used for sampling direct light contributions",
|
description="The type of strategy used for sampling direct light contributions",
|
||||||
items=enum_direct_light_sampling_type,
|
items=enum_direct_light_sampling_type,
|
||||||
default='MULTIPLE_IMPORTANCE_SAMPLING',
|
default='MULTIPLE_IMPORTANCE_SAMPLING',
|
||||||
|
|||||||
@@ -1819,37 +1819,38 @@ class CYCLES_RENDER_PT_debug(CyclesDebugButtonsPanel, Panel):
|
|||||||
|
|
||||||
def draw(self, context):
|
def draw(self, context):
|
||||||
layout = self.layout
|
layout = self.layout
|
||||||
|
layout.use_property_split = True
|
||||||
|
layout.use_property_decorate = False # No animation.
|
||||||
|
|
||||||
scene = context.scene
|
scene = context.scene
|
||||||
cscene = scene.cycles
|
cscene = scene.cycles
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column(heading="CPU")
|
||||||
|
|
||||||
col.label(text="CPU Flags:")
|
|
||||||
row = col.row(align=True)
|
row = col.row(align=True)
|
||||||
row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
|
row.prop(cscene, "debug_use_cpu_sse2", toggle=True)
|
||||||
row.prop(cscene, "debug_use_cpu_sse3", toggle=True)
|
row.prop(cscene, "debug_use_cpu_sse3", toggle=True)
|
||||||
row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
|
row.prop(cscene, "debug_use_cpu_sse41", toggle=True)
|
||||||
row.prop(cscene, "debug_use_cpu_avx", toggle=True)
|
row.prop(cscene, "debug_use_cpu_avx", toggle=True)
|
||||||
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
row.prop(cscene, "debug_use_cpu_avx2", toggle=True)
|
||||||
col.prop(cscene, "debug_bvh_layout")
|
col.prop(cscene, "debug_bvh_layout", text="BVH")
|
||||||
|
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
col = layout.column()
|
col = layout.column(heading="CUDA")
|
||||||
col.label(text="CUDA Flags:")
|
|
||||||
col.prop(cscene, "debug_use_cuda_adaptive_compile")
|
col.prop(cscene, "debug_use_cuda_adaptive_compile")
|
||||||
|
col = layout.column(heading="OptiX")
|
||||||
|
col.prop(cscene, "debug_use_optix_debug", text="Module Debug")
|
||||||
|
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
col = layout.column()
|
col.prop(cscene, "debug_bvh_type", text="Viewport BVH")
|
||||||
col.label(text="OptiX Flags:")
|
|
||||||
col.prop(cscene, "debug_use_optix_debug")
|
|
||||||
|
|
||||||
col.separator()
|
col.separator()
|
||||||
|
|
||||||
col = layout.column()
|
import _cycles
|
||||||
col.prop(cscene, "debug_bvh_type")
|
if _cycles.with_debug:
|
||||||
|
col.prop(cscene, "direct_light_sampling_type")
|
||||||
|
|
||||||
|
|
||||||
class CYCLES_RENDER_PT_simplify(CyclesButtonsPanel, Panel):
|
class CYCLES_RENDER_PT_simplify(CyclesButtonsPanel, Panel):
|
||||||
|
|||||||
@@ -1054,5 +1054,13 @@ void *CCL_python_module_init()
|
|||||||
Py_INCREF(Py_False);
|
Py_INCREF(Py_False);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef WITH_CYCLES_DEBUG
|
||||||
|
PyModule_AddObject(mod, "with_debug", Py_True);
|
||||||
|
Py_INCREF(Py_True);
|
||||||
|
#else /* WITH_CYCLES_DEBUG */
|
||||||
|
PyModule_AddObject(mod, "with_debug", Py_False);
|
||||||
|
Py_INCREF(Py_False);
|
||||||
|
#endif /* WITH_CYCLES_DEBUG */
|
||||||
|
|
||||||
return (void *)mod;
|
return (void *)mod;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -406,6 +406,9 @@ bool RenderScheduler::set_postprocess_render_work(RenderWork *render_work)
|
|||||||
any_scheduled = true;
|
any_scheduled = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Force update. */
|
||||||
|
any_scheduled = true;
|
||||||
|
|
||||||
if (any_scheduled) {
|
if (any_scheduled) {
|
||||||
render_work->display.update = true;
|
render_work->display.update = true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user