From 474adc6f883c2d5a854d7324364f7996044d83cb Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 15 Dec 2021 09:34:13 -0600 Subject: Refactor: Simplify spreadsheet handling of cell values Previously we used a `CellValue` class to hold the data for a cell, and called a function to fill it whenever necessary. This is an unnecessary complication when we have virtual generic arrays and most data is already easily accessible that way anyway. This patch removes `CellValue` and uses `fn::GVArray` to provide access to data instead. In the future, if rows have different types within a single column, we can use a `GVArray` of `blender::Any` to interface with the drawing. Along with that, the use of virtual arrays made it easy to do a few other cleanups: - Use selection domain interpolations from rB5841f8656d95 for the mesh selection filter. - Change the row filter to only calculate for necessary indices. Differential Revision: https://developer.blender.org/D13478 --- source/blender/makesdna/DNA_space_types.h | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 3ae7b3b68b8..a7a19be5b3e 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -2006,6 +2006,7 @@ typedef enum eSpaceSpreadsheet_ContextType { } eSpaceSpreadsheet_ContextType; typedef enum eSpreadsheetColumnValueType { + SPREADSHEET_VALUE_TYPE_UNKNOWN = -1, SPREADSHEET_VALUE_TYPE_BOOL = 0, SPREADSHEET_VALUE_TYPE_INT32 = 1, SPREADSHEET_VALUE_TYPE_FLOAT = 2, -- cgit v1.2.3