Commit: ae881ddf43af248ce4f5b69037dd340fa1db90b3
Author: Sergey Sharybin
Date:   Wed Jul 27 15:17:15 2016 +0200
Branches: master
https://developer.blender.org/rBae881ddf43af248ce4f5b69037dd340fa1db90b3

Fix T48760: Changing Renderlayer Compositor node Layer does not update enabled 
outputs until script is finished

===================================================================

M       source/blender/makesrna/intern/rna_nodetree.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_nodetree.c 
b/source/blender/makesrna/intern/rna_nodetree.c
index a5de230..2f9e674 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -2606,6 +2606,10 @@ static void rna_Node_image_layer_update(Main *bmain, 
Scene *scene, PointerRNA *p
        BKE_image_signal(ima, iuser, IMA_SIGNAL_SRC_CHANGE);
        
        rna_Node_update(bmain, scene, ptr);
+
+       if (scene->nodetree != NULL) {
+               ntreeCompositForceHidden(scene->nodetree);
+       }
 }
 
 static EnumPropertyItem *renderresult_layers_add_enum(RenderLayer *rl)
@@ -2739,6 +2743,14 @@ static EnumPropertyItem 
*rna_Node_scene_layer_itemf(bContext *UNUSED(C), Pointer
        return item;
 }
 
+static void rna_Node_scene_layer_update(Main *bmain, Scene *scene, PointerRNA 
*ptr)
+{
+       rna_Node_update(bmain, scene, ptr);
+       if (scene->nodetree != NULL) {
+               ntreeCompositForceHidden(scene->nodetree);
+       }
+}
+
 static EnumPropertyItem *rna_Node_channel_itemf(bContext *UNUSED(C), 
PointerRNA *ptr,
                                                 PropertyRNA *UNUSED(prop), 
bool *r_free)
 {
@@ -4784,7 +4796,7 @@ static void def_cmp_render_layers(StructRNA *srna)
        RNA_def_property_enum_funcs(prop, NULL, NULL, 
"rna_Node_scene_layer_itemf");
        RNA_def_property_flag(prop, PROP_ENUM_NO_TRANSLATE);
        RNA_def_property_ui_text(prop, "Layer", "");
-       RNA_def_property_update(prop, NC_NODE | NA_EDITED, "rna_Node_update");
+       RNA_def_property_update(prop, NC_NODE | NA_EDITED, 
"rna_Node_scene_layer_update");
 }
 
 static void rna_def_cmp_output_file_slot_file(BlenderRNA *brna)

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to