diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-15 09:57:10 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-15 10:00:47 +0300 |
commit | 3810bcc1604756f433b5b799b66d8b81645767ca (patch) | |
tree | de0ba2c5ca0cbadf3838959a19475d19cce994df /source/blender/editors/include | |
parent | 0bac7682239f2ee117a80ed3ce62a1877331c974 (diff) |
Spreadsheet: breadcrumbs and node pinning
This introduces a context path to the spreadsheet editor, which contains
information about what data is shown in the spreadsheet. The context
path (breadcrumbs) can reference a specific node in a node group
hierarchy. During object evaluation, the geometry nodes modifier checks
what data is currently requested by visible spreadsheets and stores
the corresponding geometry sets separately for later access.
The context path can be updated by the user explicitely, by clicking
on the new icon in the header of nodes. Under some circumstances,
the context path is updated automatically based on Blender's context.
This patch also consolidates the "Node" and "Final" object evaluation
mode to just "Evaluated". Based on the current context path, either
the final geometry set of an object will be displayed, or the data at
a specific node.
The new preview icon in geometry nodes now behaves more like
a toggle. It can be clicked again to clear the context path in an
open spreadsheet editor.
Previously, only an object could be pinned in the spreadsheet editor.
Now it is possible to pin the entire context path. That allows two
different spreadsheets to display geometry data from two different
nodes.
The breadcrumbs in the spreadsheet header can be collapsed by
clicking on the arrow icons. It's not ideal but works well for now.
This might be changed again, if we get a data set region on the left.
Differential Revision: https://developer.blender.org/D10931
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r-- | source/blender/editors/include/ED_spreadsheet.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/source/blender/editors/include/ED_spreadsheet.h b/source/blender/editors/include/ED_spreadsheet.h new file mode 100644 index 00000000000..3a07b1b9d4b --- /dev/null +++ b/source/blender/editors/include/ED_spreadsheet.h @@ -0,0 +1,43 @@ +/* + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software Foundation, + * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + */ + +#pragma once + +struct SpreadsheetContext; +struct SpaceSpreadsheet; +struct SpaceNode; +struct ID; +struct bNode; + +#ifdef __cplusplus +extern "C" { +#endif + +struct SpreadsheetContext *ED_spreadsheet_context_new(int type); +void ED_spreadsheet_context_free(struct SpreadsheetContext *context); +void ED_spreadsheet_context_path_clear(struct SpaceSpreadsheet *sspreadsheet); +void ED_spreadsheet_context_path_update_tag(struct SpaceSpreadsheet *sspreadsheet); +uint64_t ED_spreadsheet_context_path_hash(struct SpaceSpreadsheet *sspreadsheet); + +struct ID *ED_spreadsheet_get_current_id(struct SpaceSpreadsheet *sspreadsheet); + +void ED_spreadsheet_set_geometry_node_context(struct SpaceSpreadsheet *sspreadsheet, + struct SpaceNode *snode, + struct bNode *node); + +#ifdef __cplusplus +} +#endif |