Fix #114648: Compositor executes upon editing non-compositor trees
The compositor currently executes when editing node trees that are not compositor related, like geometry and shader node trees. That's because the node space listener always tags the compositor to execute for any node edit notifier. To fix this, we add the ID of the edited node tree as a reference to the edit notifier and only tag for an update when the space tree matches the reference one. Pull Request: https://projects.blender.org/blender/blender/pulls/114978
This commit is contained in:
@@ -417,7 +417,7 @@ bool composite_node_editable(bContext *C)
|
||||
|
||||
static void send_notifiers_after_tree_change(ID *id, bNodeTree *ntree)
|
||||
{
|
||||
WM_main_add_notifier(NC_NODE | NA_EDITED, nullptr);
|
||||
WM_main_add_notifier(NC_NODE | NA_EDITED, id);
|
||||
|
||||
if (ntree->type == NTREE_SHADER && id != nullptr) {
|
||||
if (GS(id->name) == ID_MA) {
|
||||
|
||||
@@ -616,7 +616,9 @@ static void node_area_listener(const wmSpaceTypeListenerParams *params)
|
||||
break;
|
||||
case NC_NODE:
|
||||
if (wmn->action == NA_EDITED) {
|
||||
node_area_tag_tree_recalc(snode, area);
|
||||
if (wmn->reference == snode->id || snode->id == nullptr) {
|
||||
node_area_tag_tree_recalc(snode, area);
|
||||
}
|
||||
}
|
||||
else if (wmn->action == NA_SELECTED) {
|
||||
ED_area_tag_redraw(area);
|
||||
|
||||
Reference in New Issue
Block a user