UI: Theme: Remove "Active Spline" theme property

In 3D Viewport theme settings there is "Active Spline" property, which behaves weirdly.
Color of that property is multiplied to color of curve handles. Even though it says active,
it's multiplied in selected and unselected states, for all curves all the time.

That doesn't make much sense, has no real value, and ends up only causing confusion.
Having this property on anything but pure black means that whatever colors you choose
for curve handles in Preferences isn't actually what you're getting them. If color is set to
high-saturation color it completely washes away all colors and makes it difficult to differentiate
between handle types.

I think there is no reason for this property to exist, so this PR just removes that property.

Pull Request: https://projects.blender.org/blender/blender/pulls/145360
This commit is contained in:
Nika Kutsniashvili
2025-09-29 12:27:16 +02:00
committed by Nika Kutsniashvili
parent f8d2a3af38
commit 1067112c11
10 changed files with 6 additions and 20 deletions

View File

@@ -413,7 +413,6 @@ const bTheme U_theme_default = {
.time_gp_keyframe = RGBA(0x7a9b14ff), .time_gp_keyframe = RGBA(0x7a9b14ff),
.nurb_uline = RGBA(0x909000ff), .nurb_uline = RGBA(0x909000ff),
.nurb_vline = RGBA(0x803060ff), .nurb_vline = RGBA(0x803060ff),
.act_spline = RGBA(0xdb2512ff),
.nurb_sel_uline = RGBA(0xf0ff40ff), .nurb_sel_uline = RGBA(0xf0ff40ff),
.nurb_sel_vline = RGBA(0xf090a0ff), .nurb_sel_vline = RGBA(0xf090a0ff),
.vertex_size = 3, .vertex_size = 3,

View File

@@ -506,7 +506,6 @@
nurb_vline="#803060" nurb_vline="#803060"
nurb_sel_uline="#f0ff40" nurb_sel_uline="#f0ff40"
nurb_sel_vline="#f090a0" nurb_sel_vline="#f090a0"
act_spline="#db2512"
extra_edge_len="#ff6149" extra_edge_len="#ff6149"
extra_edge_angle="#cccc00" extra_edge_angle="#cccc00"
extra_face_angle="#b3b3ff" extra_face_angle="#b3b3ff"

View File

@@ -342,7 +342,6 @@ void Resources::update_theme_settings(const DRWContext *ctx, const State &state)
UI_GetThemeColor4fv(TH_NURB_VLINE, gb.colors.nurb_vline); UI_GetThemeColor4fv(TH_NURB_VLINE, gb.colors.nurb_vline);
UI_GetThemeColor4fv(TH_NURB_SEL_ULINE, gb.colors.nurb_sel_uline); UI_GetThemeColor4fv(TH_NURB_SEL_ULINE, gb.colors.nurb_sel_uline);
UI_GetThemeColor4fv(TH_NURB_SEL_VLINE, gb.colors.nurb_sel_vline); UI_GetThemeColor4fv(TH_NURB_SEL_VLINE, gb.colors.nurb_sel_vline);
UI_GetThemeColor4fv(TH_ACTIVE_SPLINE, gb.colors.active_spline);
UI_GetThemeColor4fv(TH_CFRAME, gb.colors.current_frame); UI_GetThemeColor4fv(TH_CFRAME, gb.colors.current_frame);
UI_GetThemeColor4fv(TH_FRAME_BEFORE, gb.colors.before_frame); UI_GetThemeColor4fv(TH_FRAME_BEFORE, gb.colors.before_frame);

View File

@@ -234,7 +234,6 @@ struct ThemeColors {
float4 nurb_vline; float4 nurb_vline;
float4 nurb_sel_uline; float4 nurb_sel_uline;
float4 nurb_sel_vline; float4 nurb_sel_vline;
float4 active_spline;
float4 bone_pose; float4 bone_pose;
float4 bone_pose_active; float4 bone_pose_active;

View File

@@ -159,7 +159,7 @@ void geometry_main(VertOut geom_in[2],
} }
/* Minimize active color bleeding on inner_color. */ /* Minimize active color bleeding on inner_color. */
float4 active_color = mix(theme.colors.active_spline, inner_color, 0.25f); float4 active_color = mix(float4(0.0, 0.0, 0.0, 1.0), inner_color, 0.25f);
float4 outer_color = (is_active_nurb != 0u) ? active_color : float4(inner_color.rgb, 0.0f); float4 outer_color = (is_active_nurb != 0u) ? active_color : float4(inner_color.rgb, 0.0f);
float2 v1_2 = (v2.xy / v2.w - v1.xy / v1.w); float2 v1_2 = (v2.xy / v2.w - v1.xy / v1.w);
@@ -172,7 +172,7 @@ void geometry_main(VertOut geom_in[2],
offset.x = 0.0f; offset.x = 0.0f;
} }
float4 border_color = float4(theme.colors.active_spline.rgb, 0.0f); float4 border_color = float4(0.0, 0.0, 0.0, 0.0);
/* Draw the transparent border (AA). */ /* Draw the transparent border (AA). */
if (is_active_nurb != 0u) { if (is_active_nurb != 0u) {
offset *= 0.75f; /* Don't make the active "halo" appear very thick. */ offset *= 0.75f; /* Don't make the active "halo" appear very thick. */

View File

@@ -162,7 +162,7 @@ void geometry_main(VertOut geom_in[2],
} }
/* Minimize active color bleeding on inner_color. */ /* Minimize active color bleeding on inner_color. */
float4 active_color = mix(theme.colors.active_spline, inner_color, 0.25f); float4 active_color = mix(float4(0.0, 0.0, 0.0, 1.0), inner_color, 0.25f);
float4 outer_color = is_active ? active_color : float4(inner_color.rgb, 0.0f); float4 outer_color = is_active ? active_color : float4(inner_color.rgb, 0.0f);
float2 v1_2 = (v2.xy / v2.w - v1.xy / v1.w); float2 v1_2 = (v2.xy / v2.w - v1.xy / v1.w);
@@ -178,7 +178,7 @@ void geometry_main(VertOut geom_in[2],
offset.x = 0.0f; offset.x = 0.0f;
} }
float4 border_color = float4(theme.colors.active_spline.rgb, 0.0f); float4 border_color = float4(0.0, 0.0, 0.0, 0.0);
/* Draw the transparent border (AA). */ /* Draw the transparent border (AA). */
if (is_active) { if (is_active) {
offset *= 0.75f; /* Don't make the active "halo" appear very thick. */ offset *= 0.75f; /* Don't make the active "halo" appear very thick. */

View File

@@ -137,8 +137,6 @@ enum ThemeColorID {
TH_HANDLE_SEL_ALIGN, TH_HANDLE_SEL_ALIGN,
TH_HANDLE_SEL_AUTOCLAMP, TH_HANDLE_SEL_AUTOCLAMP,
TH_ACTIVE_SPLINE,
TH_SYNTAX_B, TH_SYNTAX_B,
TH_SYNTAX_V, TH_SYNTAX_V,
TH_SYNTAX_R, TH_SYNTAX_R,

View File

@@ -565,9 +565,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
case TH_NURB_SEL_VLINE: case TH_NURB_SEL_VLINE:
cp = ts->nurb_sel_vline; cp = ts->nurb_sel_vline;
break; break;
case TH_ACTIVE_SPLINE:
cp = ts->act_spline;
break;
case TH_HANDLE_FREE: case TH_HANDLE_FREE:
cp = btheme->common.curves.handle_free; cp = btheme->common.curves.handle_free;

View File

@@ -335,7 +335,8 @@ typedef struct ThemeSpace {
unsigned char bevel[4], seam[4], sharp[4], crease[4], freestyle[4]; unsigned char bevel[4], seam[4], sharp[4], crease[4], freestyle[4];
unsigned char nurb_uline[4], nurb_vline[4]; unsigned char nurb_uline[4], nurb_vline[4];
unsigned char act_spline[4], nurb_sel_uline[4], nurb_sel_vline[4]; unsigned char nurb_sel_uline[4], nurb_sel_vline[4];
char _pad5[4];
/** Dope-sheet. */ /** Dope-sheet. */
unsigned char ds_ipoline[4]; unsigned char ds_ipoline[4];

View File

@@ -2990,12 +2990,6 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "NURBS Active V Lines", ""); RNA_def_property_ui_text(prop, "NURBS Active V Lines", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update"); RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
prop = RNA_def_property(srna, "act_spline", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_float_sdna(prop, nullptr, "act_spline");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Active Spline", "");
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
/* Armature Object specific. */ /* Armature Object specific. */
prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA); prop = RNA_def_property(srna, "bone_pose", PROP_FLOAT, PROP_COLOR_GAMMA);