diff options
author | Erik <ecke101@gmail.com> | 2021-11-23 19:37:31 +0300 |
---|---|---|
committer | Erik <ecke101@gmail.com> | 2021-11-23 19:37:31 +0300 |
commit | e4986f92f32b096aa85440f8f517e38fcdf15e07 (patch) | |
tree | bde68bc3eb6ab0f656676417e92be0c122ef313c /source/blender/makesrna/intern | |
parent | fab39440e94d94b0a6ea8ef7771312adbab98e66 (diff) |
Geometry Nodes: Node execution time overlay
Adds a new overlay called "Timings" to the Geometry Node editor.
This shows the node execution time in milliseconds above the node.
For group nodes and frames, the total time for all nodes inside
(recursively) is shown. Group output node shows the node tree total.
The code is prepared for easily adding new rows of information
to the box above the node in the future.
Differential Revision: https://developer.blender.org/D13256
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index e7bcd387eaf..8f04524c5c1 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -7110,6 +7110,12 @@ static void rna_def_space_node_overlay(BlenderRNA *brna) RNA_def_property_ui_text( prop, "Show Wire Colors", "Color node links based on their connected sockets"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); + + prop = RNA_def_property(srna, "show_timing", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "overlay.flag", SN_OVERLAY_SHOW_TIMINGS); + RNA_def_property_boolean_default(prop, false); + RNA_def_property_ui_text(prop, "Show Timing", "Display each node's last execution time"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); } static void rna_def_space_node(BlenderRNA *brna) |