Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJacques Lucke <jacques@blender.org>2021-10-26 12:25:32 +0300
committerJacques Lucke <jacques@blender.org>2021-10-26 12:25:32 +0300
commit5bfe09df2244cb9de0b6554a378eecef77b1e75d (patch)
treee4315292b81a99f08abe83c02e550ae79e41a8d6 /source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh
parentfee2cedb33ccf33f72d0370892dd25faa884968b (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_data_source.hh')
-rw-r--r--source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh b/source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh
index 2ea7fb5809f..873735c81e5 100644
--- a/source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh
+++ b/source/blender/editors/space_spreadsheet/spreadsheet_data_source.hh
@@ -36,8 +36,12 @@ class DataSource {
* Calls the callback with all the column ids that should be displayed as long as the user does
* not manually add or remove columns. The column id can be stack allocated. Therefore, the
* callback should not keep a reference to it (and copy it instead).
+ *
+ * The `is_extra` argument indicates that this column is special and should be drawn as the first
+ * column. (This can be made a bit more generic in the future when necessary.)
*/
- virtual void foreach_default_column_ids(FunctionRef<void(const SpreadsheetColumnID &)> fn) const
+ virtual void foreach_default_column_ids(
+ FunctionRef<void(const SpreadsheetColumnID &, bool is_extra)> fn) const
{
UNUSED_VARS(fn);
}