Experiment with setting proper socket name for debug pass
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 24 Jul 2015 16:41:54 +0000 (18:41 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 24 Jul 2015 16:41:54 +0000 (18:41 +0200)
source/blender/makesrna/intern/rna_scene.c
source/blender/nodes/composite/nodes/node_composite_image.c

index dec4a9aab13724bf0b8f1c12b6498512d82f0fa5..e990ff1ec29778881bac5eb04ed3f7791b3f791b 100644 (file)
@@ -5883,6 +5883,7 @@ static void rna_def_scene_render_data(BlenderRNA *brna)
        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");
+       RNA_def_property_update(prop, NC_SCENE | ND_RENDER_OPTIONS, NULL);
 #endif
 
        /* Nestled Data  */
index 208c1f843879adac92022c39bbd6f80d3c4e5ce2..21142900e201314e44fb8957c72aa3e619cdbc49 100644 (file)
 #include "BKE_global.h"
 #include "BKE_main.h"
 
+#ifdef WITH_CYCLES_DEBUG
+#  include "RE_pipeline.h"
+#endif
+
 /* **************** IMAGE (and RenderResult, multilayer image) ******************** */
 
 static bNodeSocketTemplate cmp_node_rlayers_out[] = {
@@ -453,7 +457,11 @@ void node_cmp_rlayers_force_hidden_passes(bNode *node)
        set_output_visible(node, passflag, RRES_OUT_SUBSURFACE_COLOR,       SCE_PASS_SUBSURFACE_COLOR);
 
 #ifdef WITH_CYCLES_DEBUG
-       set_output_visible(node, passflag, RRES_OUT_DEBUG,                  SCE_PASS_DEBUG);
+       {
+               bNodeSocket *sock = BLI_findlink(&node->outputs, RRES_OUT_DEBUG);
+               set_output_visible(node, passflag, RRES_OUT_DEBUG, SCE_PASS_DEBUG);
+               strcpy(sock->name, RE_debug_pass_name_get(scene->r.debug_pass_type));
+       }
 #endif
 }