Anim: send notifier when deleting a node from a node tree/group
Send a WM notifier when deleting a node from a node tree/group. Removing a node also removes its animation data, and thus animation editors need to receive a notification to refresh. Pull Request: https://projects.blender.org/blender/blender/pulls/128255
This commit is contained in:
@@ -1968,6 +1968,10 @@ static int node_delete_reconnect_exec(bContext *C, wmOperator * /*op*/)
|
||||
if (node->flag & SELECT) {
|
||||
blender::bke::node_internal_relink(snode->edittree, node);
|
||||
bke::node_remove_node(bmain, snode->edittree, node, true);
|
||||
|
||||
/* Since this node might have been animated, and that animation data been
|
||||
* deleted, a notifier call is necessary to redraw any animation editor. */
|
||||
WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user