[Bf-blender-cvs] [bb0da7dbbd4] master: Fix (unreported): missing relations update after adding scene time node
Jacques Lucke
noreply at git.blender.org
Wed Dec 29 19:40:32 CET 2021
Commit: bb0da7dbbd4b210fce8c15714a3cb50a756d8075
Author: Jacques Lucke
Date: Wed Dec 29 19:40:00 2021 +0100
Branches: master
https://developer.blender.org/rBbb0da7dbbd4b210fce8c15714a3cb50a756d8075
Fix (unreported): missing relations update after adding scene time node
This just moves the relations update to a lower level function that is used
by other functions. Eventually, the special case for this node should be
generalized.
===================================================================
M source/blender/blenkernel/intern/node.cc
M source/blender/makesrna/intern/rna_nodetree.c
===================================================================
diff --git a/source/blender/blenkernel/intern/node.cc b/source/blender/blenkernel/intern/node.cc
index 67da16ae398..e61afe02f57 100644
--- a/source/blender/blenkernel/intern/node.cc
+++ b/source/blender/blenkernel/intern/node.cc
@@ -65,6 +65,7 @@
#include "BKE_animsys.h"
#include "BKE_bpath.h"
#include "BKE_colortools.h"
+#include "BKE_context.h"
#include "BKE_cryptomatte.h"
#include "BKE_global.h"
#include "BKE_icons.h"
@@ -2168,6 +2169,10 @@ bNode *nodeAddNode(const struct bContext *C, bNodeTree *ntree, const char *idnam
BKE_ntree_update_tag_node_new(ntree, node);
+ if (node->type == GEO_NODE_INPUT_SCENE_TIME) {
+ DEG_relations_tag_update(CTX_data_main(C));
+ }
+
return node;
}
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c
index 7bca07ad058..f6751117d55 100644
--- a/source/blender/makesrna/intern/rna_nodetree.c
+++ b/source/blender/makesrna/intern/rna_nodetree.c
@@ -1273,10 +1273,6 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree,
ED_node_tree_propagate_change(C, bmain, ntree);
WM_main_add_notifier(NC_NODE | NA_EDITED, ntree);
- if (node->type == GEO_NODE_INPUT_SCENE_TIME) {
- DEG_relations_tag_update(bmain);
- }
-
return node;
}
More information about the Bf-blender-cvs
mailing list