diff options
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesdna/DNA_scene_types.h | 8 | ||||
-rw-r--r-- | source/blender/makesrna/RNA_enum_types.h | 1 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 12 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 7 | ||||
-rw-r--r-- | source/blender/render/intern/source/render_result.c | 2 |
5 files changed, 22 insertions, 8 deletions
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h index ef0e98a14c9..397751d85e9 100644 --- a/source/blender/makesdna/DNA_scene_types.h +++ b/source/blender/makesdna/DNA_scene_types.h @@ -689,7 +689,13 @@ typedef struct RenderData { struct BakeData bake; int preview_start_resolution; - int pad; + + /* Type of the debug pass to use. + * Only used when built with debug passes support. + */ + short debug_pass_type; + + short pad; /* MultiView */ ListBase views; diff --git a/source/blender/makesrna/RNA_enum_types.h b/source/blender/makesrna/RNA_enum_types.h index d3d3578e8b0..061133a9fcf 100644 --- a/source/blender/makesrna/RNA_enum_types.h +++ b/source/blender/makesrna/RNA_enum_types.h @@ -132,6 +132,7 @@ extern EnumPropertyItem object_axis_unsigned_items[]; extern EnumPropertyItem controller_type_items[]; extern EnumPropertyItem render_pass_type_items[]; +extern EnumPropertyItem render_pass_debug_type_items[]; extern EnumPropertyItem keymap_propvalue_items[]; diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 7ec2619d2df..a759779d6a3 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -77,6 +77,12 @@ EnumPropertyItem render_pass_type_items[] = { {0, NULL, 0, NULL, NULL} }; +EnumPropertyItem render_pass_debug_type_items[] = { + {RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS, "BVH_TRAVERSAL_STEPS", 0, "BVH Traversal Steps", ""}, + {RENDER_PASS_DEBUG_RAY_BOUNCES, "RAY_BOUNCES", 0, "Ray Steps", ""}, + {0, NULL, 0, NULL, NULL} +}; + #ifdef RNA_RUNTIME #include "MEM_guardedalloc.h" @@ -767,12 +773,6 @@ static void rna_def_render_pass(BlenderRNA *brna) StructRNA *srna; PropertyRNA *prop; - static EnumPropertyItem render_pass_debug_type_items[] = { - {RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS, "BVH_TRAVERSAL_STEPS", 0, "BVH Traversal Steps", ""}, - {RENDER_PASS_DEBUG_RAY_BOUNCES, "RAY_BOUNCES", 0, "Ray Steps", ""}, - {0, NULL, 0, NULL, NULL} - }; - srna = RNA_def_struct(brna, "RenderPass", NULL); RNA_def_struct_ui_text(srna, "Render Pass", ""); diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 00114d1125c..ea726711327 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -5873,6 +5873,13 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_struct_type(prop, "BakeSettings"); RNA_def_property_ui_text(prop, "Bake Data", ""); + /* Debugging settings. */ +#ifdef WITH_CYCLES_DEBUG + prop = RNA_def_property(srna, "debug_pass_type", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_items(prop, render_pass_debug_type_items); + RNA_def_property_ui_text(prop, "Debug Pass Type", "Type of the debug pass to use"); +#endif + /* Nestled Data */ /* *** Non-Animated *** */ RNA_define_animate_sdna(false); diff --git a/source/blender/render/intern/source/render_result.c b/source/blender/render/intern/source/render_result.c index ea7b32d2da9..7f54bebd673 100644 --- a/source/blender/render/intern/source/render_result.c +++ b/source/blender/render/intern/source/render_result.c @@ -705,7 +705,7 @@ RenderResult *render_result_new(Render *re, rcti *partrct, int crop, int savebuf #ifdef WITH_CYCLES_DEBUG if (BKE_scene_use_new_shading_nodes(re->scene)) { render_layer_add_debug_pass(rr, rl, 1, SCE_PASS_DEBUG, - RENDER_PASS_DEBUG_BVH_TRAVERSAL_STEPS, view); + re->r.debug_pass_type, view); } #endif } |