From ccead2ed9c6121c42a516712da38a2faec877e2f Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Wed, 3 Nov 2021 13:45:51 -0500 Subject: Spreadsheet: Display geometry volume component grids This shows a geometry's volume grids in the spreadsheet. Three columns are displayed: - Name: The text name of each grid - Data type: Float, Vector, etc. - Class: Fog volume, Level Set, or unkown In the future, values of the voxels themselves could be displayed, but that is a much more complex problem, with important performance implications, etc. Differential Revision: https://developer.blender.org/D13049 --- .../editors/space_spreadsheet/spreadsheet_layout.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'source/blender/editors/space_spreadsheet/spreadsheet_layout.cc') diff --git a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc index 355899be279..202523c0e64 100644 --- a/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc +++ b/source/blender/editors/space_spreadsheet/spreadsheet_layout.cc @@ -228,6 +228,23 @@ class SpreadsheetLayoutDrawer : public SpreadsheetDrawer { 0, nullptr); } + else if (cell_value.value_string.has_value()) { + uiDefIconTextBut(params.block, + UI_BTYPE_LABEL, + 0, + ICON_NONE, + cell_value.value_string->c_str(), + params.xmin, + params.ymin, + params.width, + params.height, + nullptr, + 0, + 0, + 0, + 0, + nullptr); + } } void draw_float_vector(const CellDrawParams ¶ms, const Span values) const -- cgit v1.2.3