Fix T89981: missing refresh on the compositors render layer node when adding/removing AOVs

Just refresh the node's outputs via ntreeCompositUpdateRLayers().

Maniphest Tasks: T89981

Differential Revision: https://developer.blender.org/D11973
This commit is contained in:
Philipp Oeser 2021-07-20 14:25:30 +02:00
parent 3e29175af3
commit f164188a6d
Notes: blender-bot 2023-02-14 08:42:54 +01:00
Referenced by issue #88449, Blender LTS: Maintenance Task 2.93
Referenced by issue #89981, adding a custom AOV doesn't show the output on the compositors render layer node.
1 changed files with 9 additions and 0 deletions

View File

@ -56,6 +56,7 @@
#include "BKE_linestyle.h"
#include "BKE_main.h"
#include "BKE_material.h"
#include "BKE_node.h"
#include "BKE_object.h"
#include "BKE_report.h"
#include "BKE_scene.h"
@ -1043,6 +1044,10 @@ static int view_layer_add_aov_exec(bContext *C, wmOperator *UNUSED(op))
engine = NULL;
}
if (scene->nodetree) {
ntreeCompositUpdateRLayers(scene->nodetree);
}
DEG_id_tag_update(&scene->id, 0);
DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);
@ -1091,6 +1096,10 @@ static int view_layer_remove_aov_exec(bContext *C, wmOperator *UNUSED(op))
engine = NULL;
}
if (scene->nodetree) {
ntreeCompositUpdateRLayers(scene->nodetree);
}
DEG_id_tag_update(&scene->id, 0);
DEG_relations_tag_update(CTX_data_main(C));
WM_event_add_notifier(C, NC_SCENE | ND_LAYER, scene);