UI: Theme: Remove face dot color property
Mesh faces have a separate theme color for selected dots (1px dot in the center of the face), in both the 3D Viewport and the Image Editor. I don't think there is any justification for why that 1 pixel has to be a different color from rest of the active face. Even if result isn't satisfying, we should be tweaking Face Selected color for this purpose. 1 pixel doesn't deserve its own theme setting. This PR removes property from both editors, and instead uses "Face Selected" color with alpha hardcoded to 1 (removed properties didn't have alpha). Also note that dot is still visible in 3D viewport because Face Selected color is different from Face Mode Selected color, which is used for faces when dots are drawn. There are no visual changes in default themes. Pull Request: https://projects.blender.org/blender/blender/pulls/145364
This commit is contained in:
committed by
Nika Kutsniashvili
parent
2e8d5a238e
commit
e0392599f8
@@ -387,7 +387,6 @@ const bTheme U_theme_default = {
|
||||
.face_retopology = RGBA(0x50c8ff0f),
|
||||
.face_back = RGBA(0xff0000b3),
|
||||
.face_front = RGBA(0x0000ff00),
|
||||
.face_dot = RGBA(0xff8a00ff),
|
||||
.extra_edge_len = RGBA(0x150806ff),
|
||||
.extra_edge_angle = RGBA(0x4d4d00ff),
|
||||
.extra_face_angle = RGBA(0x0000ccff),
|
||||
@@ -580,7 +579,6 @@ const bTheme U_theme_default = {
|
||||
.edge_select = RGBA(0xff8500ff),
|
||||
.face = RGBA(0xffffff0a),
|
||||
.face_select = RGBA(0xff85003c),
|
||||
.face_dot = RGBA(0xff8500ff),
|
||||
.vertex_size = 3,
|
||||
.edge_width = 1,
|
||||
.outline_width = 1,
|
||||
|
||||
@@ -499,7 +499,6 @@
|
||||
face="#00000012"
|
||||
face_select="#ffa30033"
|
||||
face_mode_select="#ffb70033"
|
||||
face_dot="#ff8500"
|
||||
facedot_size="4"
|
||||
freestyle_face_mark="#7fff7f33"
|
||||
face_retopology="#50c8ff1e"
|
||||
@@ -662,7 +661,6 @@
|
||||
face="#ffffff0a"
|
||||
face_select="#ff85003c"
|
||||
face_mode_select="#00000000"
|
||||
face_dot="#ff8500"
|
||||
facedot_size="3"
|
||||
editmesh_active="#ffffff40"
|
||||
wire_edit="#c0c0c0"
|
||||
|
||||
@@ -281,7 +281,7 @@ void Resources::update_theme_settings(const DRWContext *ctx, const State &state)
|
||||
UI_GetThemeColor4fv(TH_NORMAL, gb.colors.normal);
|
||||
UI_GetThemeColor4fv(TH_VNORMAL, gb.colors.vnormal);
|
||||
UI_GetThemeColor4fv(TH_LNORMAL, gb.colors.lnormal);
|
||||
UI_GetThemeColor4fv(TH_FACE_DOT, gb.colors.facedot);
|
||||
UI_GetThemeColor4fv(TH_FACE_SELECT, gb.colors.facedot), gb.colors.facedot[3] = 1.0f;
|
||||
UI_GetThemeColor4fv(TH_SKIN_ROOT, gb.colors.skinroot);
|
||||
UI_GetThemeColor4fv(TH_BACK, gb.colors.background);
|
||||
UI_GetThemeColor4fv(TH_BACK_GRAD, gb.colors.background_gradient);
|
||||
|
||||
@@ -112,7 +112,6 @@ enum ThemeColorID {
|
||||
TH_NORMAL,
|
||||
TH_VNORMAL,
|
||||
TH_LNORMAL,
|
||||
TH_FACE_DOT,
|
||||
TH_FACEDOT_SIZE,
|
||||
TH_CFRAME,
|
||||
TH_FRAME_BEFORE,
|
||||
|
||||
@@ -442,9 +442,6 @@ const uchar *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||
case TH_FACE_FRONT:
|
||||
cp = ts->face_front;
|
||||
break;
|
||||
case TH_FACE_DOT:
|
||||
cp = ts->face_dot;
|
||||
break;
|
||||
case TH_FACEDOT_SIZE:
|
||||
cp = &ts->facedot_size;
|
||||
break;
|
||||
|
||||
@@ -303,7 +303,6 @@ typedef struct ThemeSpace {
|
||||
unsigned char header_title[4];
|
||||
unsigned char header_text[4];
|
||||
unsigned char header_text_hi[4];
|
||||
char _pad2[4];
|
||||
|
||||
/* button/tool regions */
|
||||
unsigned char shade1[4];
|
||||
@@ -325,7 +324,6 @@ typedef struct ThemeSpace {
|
||||
unsigned char face[4], face_select[4], face_mode_select[4], face_retopology[4];
|
||||
unsigned char face_back[4], face_front[4];
|
||||
/** Selected color. */
|
||||
unsigned char face_dot[4];
|
||||
unsigned char extra_edge_len[4], extra_edge_angle[4], extra_face_angle[4], extra_face_area[4];
|
||||
unsigned char normal[4];
|
||||
unsigned char vertex_normal[4];
|
||||
@@ -351,7 +349,7 @@ typedef struct ThemeSpace {
|
||||
unsigned char vertex_size, edge_width, outline_width, obcenter_dia, facedot_size;
|
||||
unsigned char noodle_curving;
|
||||
unsigned char grid_levels;
|
||||
char _pad5[2];
|
||||
char _pad2[2];
|
||||
float dash_alpha;
|
||||
|
||||
/* Syntax for text-window and nodes. */
|
||||
|
||||
@@ -2720,11 +2720,6 @@ static void rna_def_userdef_theme_spaces_face(StructRNA *srna,
|
||||
RNA_def_property_ui_text(prop, "Face Mode Selection", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "face_dot", PROP_FLOAT, PROP_COLOR_GAMMA);
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Face Dot Selected", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_theme_update");
|
||||
|
||||
prop = RNA_def_property(srna, "facedot_size", PROP_INT, PROP_PIXEL);
|
||||
RNA_def_property_range(prop, 1, 10);
|
||||
RNA_def_property_ui_text(prop, "Face Dot Size", "");
|
||||
|
||||
Reference in New Issue
Block a user