diff options
author | Jacques Lucke <jacques@blender.org> | 2021-10-26 12:25:32 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-10-26 12:25:32 +0300 |
commit | 5bfe09df2244cb9de0b6554a378eecef77b1e75d (patch) | |
tree | e4315292b81a99f08abe83c02e550ae79e41a8d6 /source/blender/editors/space_spreadsheet/spreadsheet_intern.hh | |
parent | fee2cedb33ccf33f72d0370892dd25faa884968b (diff) |
Geometry Nodes: support viewing field values in spreadsheet
The viewer node has been expanded to have a field input next to the
geometry input. When both are connected (by ctrl+shift clicking on a node)
the spreadsheet will show the evaluated field on the geometry.
The operator to link to the viewer has become a bit smarter. It automatically
detects if it should link to the geometry or field input. In the future some more
smartness could be added, such as automatically relinking the "right" geometry
when viewing a field.
Internally, there are two major changes:
* Refactor of what happens when ctrl+shift clicking on a node to link to
a viewer. The behavior of the geometry nodes viewer is a bit more complex
than that of the compositor viewers. The behavior in compositing nodes
should not have changed. Any change should be reported as a bug (and then
we can decide if it's worse than before or if it needs fixing).
* Evaluation, display and caching of fields in the spreadsheet editor.
Differential Revision: https://developer.blender.org/D12938
Diffstat (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_intern.hh')
-rw-r--r-- | source/blender/editors/space_spreadsheet/spreadsheet_intern.hh | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_intern.hh b/source/blender/editors/space_spreadsheet/spreadsheet_intern.hh index 8be5283fd63..8b050c2e69b 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_intern.hh +++ b/source/blender/editors/space_spreadsheet/spreadsheet_intern.hh @@ -17,12 +17,24 @@ #pragma once #include "BKE_geometry_set.hh" +#include "spreadsheet_cache.hh" -typedef struct SpaceSpreadsheet_Runtime { - int visible_rows; - int tot_rows; - int tot_columns; -} SpaceSpreadsheet_Runtime; +struct SpaceSpreadsheet_Runtime { + public: + int visible_rows = 0; + int tot_rows = 0; + int tot_columns = 0; + + blender::ed::spreadsheet::SpreadsheetCache cache; + + SpaceSpreadsheet_Runtime() = default; + + /* The cache is not copied currently. */ + SpaceSpreadsheet_Runtime(const SpaceSpreadsheet_Runtime &other) + : visible_rows(other.visible_rows), tot_rows(other.tot_rows), tot_columns(other.tot_columns) + { + } +}; struct bContext; |