Fix theme color use for clipping region
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2019 23:35:34 +0000 (10:35 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2019 23:36:46 +0000 (10:36 +1100)
Color needed to be converted to linear in the engine,
not the theme.

release/datafiles/userdef/userdef_default_theme.c
source/blender/draw/engines/workbench/workbench_data.c

index 39ba48eef0a36c6fe167f503a577795a931fa089..aa275d6a99e6b5d34dff15574a3decd488a6d57a 100644 (file)
@@ -355,7 +355,7 @@ const bTheme U_theme_default = {
                .outline_width = 1,
                .facedot_size = 3,
                .editmesh_active = RGBA(0xffffff80),
-               .clipping_border_3d = RGBA(0x0f0f0fff),
+               .clipping_border_3d = RGBA(0x313131ff),
                .bundle_solid = RGBA(0xc8c8c8ff),
                .camera_path = RGBA(0x000000ff),
                .gp_vertex_size = 3,
index 931dfd63088ba47c57262ac3ed00c044a72ff8c8..b5e55d157d0f286303b3d8ebb153b44e06b67889 100644 (file)
@@ -121,6 +121,7 @@ void workbench_private_data_init(WORKBENCH_PrivateData *wpd)
                        wpd->world_clip_planes = rv3d->clip;
                        DRW_state_clip_planes_set_from_rv3d(rv3d);
                        UI_GetThemeColor4fv(TH_V3D_CLIPPING_BORDER, wpd->world_clip_planes_color);
+                       srgb_to_linearrgb_v3_v3(wpd->world_clip_planes_color, wpd->world_clip_planes_color);
                }
                else {
                        wpd->world_clip_planes = NULL;