diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2021-12-09 20:50:25 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2021-12-09 20:50:25 +0300 |
commit | bd3bd776c8938dbae29c6cb764195124ca59641b (patch) | |
tree | 7e797dfad162dec38c2eda33e999b8fe728e7e4e /source/blender/makesrna/intern/rna_nodetree.c | |
parent | ad44f22397b07109eadc677032804db57fa9838a (diff) |
Geometry Nodes: Scene Time Node
This node outputs the current scene time in seconds or in frames.
Use of this node eliminates the need to use drivers to control values
in the node tree that are driven by the scene time.
Frame is a float value to provide for subframe rendering for motion
blur.
Differential Revision: https://developer.blender.org/D13455
Diffstat (limited to 'source/blender/makesrna/intern/rna_nodetree.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_nodetree.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_nodetree.c b/source/blender/makesrna/intern/rna_nodetree.c index 6469607f292..640a1439a57 100644 --- a/source/blender/makesrna/intern/rna_nodetree.c +++ b/source/blender/makesrna/intern/rna_nodetree.c @@ -1268,10 +1268,15 @@ static bNode *rna_NodeTree_node_new(bNodeTree *ntree, ntreeTexCheckCyclics(ntree); } - ntreeUpdateTree(CTX_data_main(C), ntree); + Main *bmain = CTX_data_main(C); + ntreeUpdateTree(bmain, ntree); nodeUpdate(ntree, node); WM_main_add_notifier(NC_NODE | NA_EDITED, ntree); + if (node->type == GEO_NODE_INPUT_SCENE_TIME) { + DEG_relations_tag_update(bmain); + } + return node; } |