diff options
author | Hans Goudey <h.goudey@me.com> | 2021-01-20 01:43:08 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-01-20 01:43:08 +0300 |
commit | 6290091bace2fc7654dd3052b8b2553310cead13 (patch) | |
tree | 15ac3d25dac4a45ca1cac01fc60dcd2782880099 /source/blender/editors/include | |
parent | da6dea5701311f41c7d70429b111b901b6bcf966 (diff) |
Cleanup: Store runtime space node variables in a separate struct
This commit moves runtime-only variables from the `SpaceNode`
DNA struct to a private struct in `node_intern.h`. Before, it was hard
to tell which data needed to be saved in files, this should make it
more clear.
Node that the `edittree` field is basically a runtime variable, since
it's set from the `treepath` list on read, but moving it would require
some more invasive changes that I don't think are worth it right now.
Also, not all of the moved variables were explicitly cleared on read--
`aspect` is set at the start of a redraw, `cursor` is set in a region
callback, and `recalc` was used as an update flag.
Differential Revision: https://developer.blender.org/D10141
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_node.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_node.h b/source/blender/editors/include/ED_node.h index 417cae800ea..78f354a300d 100644 --- a/source/blender/editors/include/ED_node.h +++ b/source/blender/editors/include/ED_node.h @@ -51,6 +51,10 @@ typedef enum { #define NODE_GRID_STEPS 5 /* space_node.c */ + +void ED_node_cursor_location_get(const struct SpaceNode *snode, float value[2]); +void ED_node_cursor_location_set(struct SpaceNode *snode, const float value[2]); + int ED_node_tree_path_length(struct SpaceNode *snode); void ED_node_tree_path_get(struct SpaceNode *snode, char *value); void ED_node_tree_path_get_fixedbuf(struct SpaceNode *snode, char *value, int max_length); |