mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
UI: Remove paint curve theme colors, use gizmo colors instead
3D Viewport and Image Editor had theme colors for paint curve handle and pivot. Paint curves are one of the stroke methods for brushes, and are generally not widely used. To simplify theming it's best to remove those four properties and use other shared colors instead. We could use common curve colors for them, but they don't have point color and handle point color is black, so we would need to add one more property anyway and it would look bad as well. Instead, use gizmo primary and secondary colors. Technically, paint curves can be treated as gizmos, because they're interactive widgets in the viewport. Pull Request: https://projects.blender.org/blender/blender/pulls/146777
This commit is contained in:
parent
712c507519
commit
eca7056cfe
7 changed files with 2 additions and 42 deletions
|
|
@ -429,8 +429,6 @@ const bTheme U_theme_default = {
|
|||
.gp_vertex = RGBA(0x000000ff),
|
||||
.gp_vertex_select = RGBA(0xff8500ff),
|
||||
.skin_root = RGBA(0xb44d4dff),
|
||||
.paint_curve_pivot = RGBA(0xff7f7f7f),
|
||||
.paint_curve_handle = RGBA(0x7fff7f7f),
|
||||
},
|
||||
.space_file = {
|
||||
.back = RGBA(0x28282800),
|
||||
|
|
@ -602,8 +600,6 @@ const bTheme U_theme_default = {
|
|||
.preview_stitch_unstitchable = RGBA(0xff0000ff),
|
||||
.preview_stitch_active = RGBA(0xe1d2c323),
|
||||
.uv_shadow = RGBA(0x707070ff),
|
||||
.paint_curve_pivot = RGBA(0xff7f7f7f),
|
||||
.paint_curve_handle = RGBA(0x7fff7f7f),
|
||||
.metadatatext = RGBA(0xffffffff),
|
||||
},
|
||||
.space_text = {
|
||||
|
|
|
|||
|
|
@ -527,8 +527,6 @@
|
|||
skin_root="#b44d4d"
|
||||
view_overlay="#000000"
|
||||
transform="#ffffff"
|
||||
paint_curve_handle="#7fff7f7f"
|
||||
paint_curve_pivot="#ff7f7f7f"
|
||||
outline_width="1"
|
||||
object_origin_size="6"
|
||||
>
|
||||
|
|
@ -674,8 +672,6 @@
|
|||
uv_shadow="#707070ff"
|
||||
metadatabg="#000000"
|
||||
metadatatext="#ffffff"
|
||||
paint_curve_handle="#7fff7f7f"
|
||||
paint_curve_pivot="#ff7f7f7f"
|
||||
>
|
||||
<space>
|
||||
<ThemeSpaceGeneric
|
||||
|
|
|
|||
|
|
@ -277,9 +277,6 @@ enum ThemeColorID {
|
|||
TH_STITCH_PREVIEW_UNSTITCHABLE,
|
||||
TH_STITCH_PREVIEW_ACTIVE,
|
||||
|
||||
TH_PAINT_CURVE_HANDLE,
|
||||
TH_PAINT_CURVE_PIVOT,
|
||||
|
||||
TH_UV_SHADOW,
|
||||
|
||||
TH_MATCH, /* highlight color for search matches */
|
||||
|
|
|
|||
|
|
@ -826,13 +826,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
|||
cp = ts->preview_stitch_active;
|
||||
break;
|
||||
|
||||
case TH_PAINT_CURVE_HANDLE:
|
||||
cp = ts->paint_curve_handle;
|
||||
break;
|
||||
case TH_PAINT_CURVE_PIVOT:
|
||||
cp = ts->paint_curve_pivot;
|
||||
break;
|
||||
|
||||
case TH_METADATA_BG:
|
||||
cp = ts->metadatabg;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -986,8 +986,8 @@ static void paint_draw_curve_cursor(Brush *brush, ViewContext *vc)
|
|||
|
||||
float selec_col[4], handle_col[4], pivot_col[4];
|
||||
UI_GetThemeColorType4fv(TH_VERTEX_SELECT, SPACE_VIEW3D, selec_col);
|
||||
UI_GetThemeColorType4fv(TH_PAINT_CURVE_HANDLE, SPACE_VIEW3D, handle_col);
|
||||
UI_GetThemeColorType4fv(TH_PAINT_CURVE_PIVOT, SPACE_VIEW3D, pivot_col);
|
||||
UI_GetThemeColorType4fv(TH_GIZMO_PRIMARY, SPACE_VIEW3D, handle_col);
|
||||
UI_GetThemeColorType4fv(TH_GIZMO_SECONDARY, SPACE_VIEW3D, pivot_col);
|
||||
|
||||
for (int i = 0; i < pc->tot_points - 1; i++, cp++) {
|
||||
int j;
|
||||
|
|
|
|||
|
|
@ -450,9 +450,6 @@ typedef struct ThemeSpace {
|
|||
unsigned char info_property[4], info_property_text[4];
|
||||
unsigned char info_operator[4], info_operator_text[4];
|
||||
|
||||
unsigned char paint_curve_pivot[4];
|
||||
unsigned char paint_curve_handle[4];
|
||||
|
||||
unsigned char metadatabg[4];
|
||||
unsigned char metadatatext[4];
|
||||
} ThemeSpace;
|
||||
|
|
|
|||
|
|
@ -2770,21 +2770,6 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna, const bool has_fa
|
|||
}
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_spaces_paint_curves(StructRNA *srna)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
||||
prop = RNA_def_property(srna, "paint_curve_handle", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 4);
|
||||
RNA_def_property_ui_text(prop, "Paint Curve Handle", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "paint_curve_pivot", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 4);
|
||||
RNA_def_property_ui_text(prop, "Paint Curve Pivot", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_spaces_gpencil(StructRNA *srna)
|
||||
{
|
||||
PropertyRNA *prop;
|
||||
|
|
@ -3087,8 +3072,6 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
|
|||
RNA_def_property_ui_text(prop, "Transform", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
rna_def_userdef_theme_spaces_paint_curves(srna);
|
||||
|
||||
prop = RNA_def_property(srna, "outline_width", PROP_INT, PROP_PIXEL);
|
||||
RNA_def_property_range(prop, 1, 5);
|
||||
RNA_def_property_ui_text(prop, "Outline Width", "");
|
||||
|
|
@ -3738,8 +3721,6 @@ static void rna_def_userdef_theme_space_image(BlenderRNA *brna)
|
|||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Metadata Text", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
rna_def_userdef_theme_spaces_paint_curves(srna);
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_space_seq(BlenderRNA *brna)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue