diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-11 12:27:39 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-06-11 15:53:15 +0300 |
commit | 102e18d05cd4a92375aa6b855e560617d76ccb26 (patch) | |
tree | 35cfa4f3e66edfceb93a79cf4b5663809365c146 /source/blender/makesrna | |
parent | 2bd6de5bbb1381fa34bf4df59d9f134dd9ccce91 (diff) |
Expose debug type into the interface
This way it is now possible to select which exact debug pass is to be used
by the render engine. Accessible from the Passes panel.
Currently it could only be one debug pass, in the future we can make menus
and image users smarter and support multiple passes of the same type.
Diffstat (limited to 'source/blender/makesrna')
-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 |
3 files changed, 14 insertions, 6 deletions
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); |