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:
authorBrecht Van Lommel <brecht@blender.org>2022-06-29 14:01:38 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-06-29 18:08:50 +0300
commit6b508eb012b929b34e893f71a785580562cc9a6a (patch)
tree37cd279a588e7b6f187163208af29466f2f3124d /source/blender/editors/space_spreadsheet/space_spreadsheet.cc
parent6dd8ceef2a21f64cbb61a96560c50c162f9dae39 (diff)
Spreadsheet: display byte colors as scene linear floats
The compression as sRGB is mostly an implementation detail and showing the integers does not make it clear what the actual values are that will be used for computations in geometry nodes. This follows the general convention that colors in Blender are displayed and edited in scene linear floats. The raw sRGB bytes can still be viewed as a tooltip. Ref T99205 Differential Revision: https://developer.blender.org/D15322
Diffstat (limited to 'source/blender/editors/space_spreadsheet/space_spreadsheet.cc')
-rw-r--r--source/blender/editors/space_spreadsheet/space_spreadsheet.cc4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
index dd3aac1eae9..8dbb4a2ee0c 100644
--- a/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
+++ b/source/blender/editors/space_spreadsheet/space_spreadsheet.cc
@@ -298,7 +298,6 @@ static float get_default_column_width(const ColumnValues &values)
return values.default_width;
}
static const float float_width = 3;
- static const float int_width = 2;
switch (values.type()) {
case SPREADSHEET_VALUE_TYPE_BOOL:
return 2.0f;
@@ -312,13 +311,12 @@ static float get_default_column_width(const ColumnValues &values)
case SPREADSHEET_VALUE_TYPE_FLOAT3:
return 3.0f * float_width;
case SPREADSHEET_VALUE_TYPE_COLOR:
+ case SPREADSHEET_VALUE_TYPE_BYTE_COLOR:
return 4.0f * float_width;
case SPREADSHEET_VALUE_TYPE_INSTANCES:
return 8.0f;
case SPREADSHEET_VALUE_TYPE_STRING:
return 5.0f;
- case SPREADSHEET_VALUE_TYPE_BYTE_COLOR:
- return 4.0f * int_width;
case SPREADSHEET_VALUE_TYPE_UNKNOWN:
return 2.0f;
}