[Bf-blender-cvs] [7ce6750234c] blender-v3.3-release: Fix: set more UI colors to PROP_COLOR_GAMMA

Philipp Oeser noreply at git.blender.org
Mon Nov 28 13:43:38 CET 2022


Commit: 7ce6750234c4c9920e01e9ade158e7b4b9a28d2d
Author: Philipp Oeser
Date:   Tue Oct 25 15:18:22 2022 +0200
Branches: blender-v3.3-release
https://developer.blender.org/rB7ce6750234c4c9920e01e9ade158e7b4b9a28d2d

Fix: set more UI colors to PROP_COLOR_GAMMA

Followup to rBfb424db2b7bb. Found some more candidates.

UI colors should use PROP_COLOR_GAMMA to avoid being affected by scene
color management (clarification by @brecht).

Differential Revision: https://developer.blender.org/D16337

===================================================================

M	source/blender/makesrna/intern/rna_brush.c
M	source/blender/makesrna/intern/rna_fcurve.c
M	source/blender/makesrna/intern/rna_tracking.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index e0d55050c63..f9b1c3a3177 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -3541,13 +3541,13 @@ static void rna_def_brush(BlenderRNA *brna)
   RNA_def_property_ui_text(prop, "Mask Texture Overlay Alpha", "");
   RNA_def_property_update(prop, 0, "rna_Brush_update");
 
-  prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR);
+  prop = RNA_def_property(srna, "cursor_color_add", PROP_FLOAT, PROP_COLOR_GAMMA);
   RNA_def_property_float_sdna(prop, NULL, "add_col");
   RNA_def_property_array(prop, 4);
   RNA_def_property_ui_text(prop, "Add Color", "Color of cursor when adding");
   RNA_def_property_update(prop, 0, "rna_Brush_update");
 
-  prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR);
+  prop = RNA_def_property(srna, "cursor_color_subtract", PROP_FLOAT, PROP_COLOR_GAMMA);
   RNA_def_property_float_sdna(prop, NULL, "sub_col");
   RNA_def_property_array(prop, 4);
   RNA_def_property_ui_text(prop, "Subtract Color", "Color of cursor when subtracting");
diff --git a/source/blender/makesrna/intern/rna_fcurve.c b/source/blender/makesrna/intern/rna_fcurve.c
index 727d329781d..9fe7dda0e20 100644
--- a/source/blender/makesrna/intern/rna_fcurve.c
+++ b/source/blender/makesrna/intern/rna_fcurve.c
@@ -2416,7 +2416,7 @@ static void rna_def_fcurve(BlenderRNA *brna)
       prop, "Color Mode", "Method used to determine color of F-Curve in Graph Editor");
   RNA_def_property_update(prop, NC_ANIMATION, NULL);
 
-  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
   RNA_def_property_array(prop, 3);
   RNA_def_property_range(prop, 0.0f, 1.0f);
   RNA_def_property_ui_text(prop, "Color", "Color of the F-Curve in the Graph Editor");
diff --git a/source/blender/makesrna/intern/rna_tracking.c b/source/blender/makesrna/intern/rna_tracking.c
index b9acd57430b..68c7b82d577 100644
--- a/source/blender/makesrna/intern/rna_tracking.c
+++ b/source/blender/makesrna/intern/rna_tracking.c
@@ -1638,7 +1638,7 @@ static void rna_def_trackingTrack(BlenderRNA *brna)
   RNA_def_property_update(prop, NC_MOVIECLIP | ND_DISPLAY, NULL);
 
   /* color */
-  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
+  prop = RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR_GAMMA);
   RNA_def_property_array(prop, 3);
   RNA_def_property_range(prop, 0.0f, 1.0f);
   RNA_def_property_ui_text(



More information about the Bf-blender-cvs mailing list