Revert: EditMode Inactive edge drawing

Did it manually as there was some refactoring done that has value
This commit is contained in:
Jeroen Bakker 2018-06-19 14:32:09 +02:00
parent 92823275af
commit ce0a87a208
8 changed files with 2 additions and 30 deletions

View File

@ -50,7 +50,6 @@ struct GPUTexture *globals_ramp = NULL;
void DRW_globals_update(void)
{
UI_GetThemeColor4fv(TH_WIRE, ts.colorWire);
UI_GetThemeColor4fv(TH_WIRE_INACTIVE, ts.colorWireInactive);
UI_GetThemeColor4fv(TH_WIRE_EDIT, ts.colorWireEdit);
UI_GetThemeColor4fv(TH_ACTIVE, ts.colorActive);
UI_GetThemeColor4fv(TH_SELECT, ts.colorSelect);

View File

@ -41,7 +41,6 @@ struct PTCacheEdit;
typedef struct GlobalsUboStorage {
/* UBOs data needs to be 16 byte aligned (size of vec4) */
float colorWire[4];
float colorWireInactive[4];
float colorWireEdit[4];
float colorActive[4];
float colorSelect[4];

View File

@ -2,7 +2,6 @@
/* keep in sync with GlobalsUboStorage */
layout(std140) uniform globalsBlock {
vec4 colorWire;
vec4 colorWireInactive;
vec4 colorWireEdit;
vec4 colorActive;
vec4 colorSelect;

View File

@ -33,7 +33,7 @@ vec4 EDIT_MESH_edge_color_inner(int edge_flag, bool face_active)
color = ((edge_flag & EDGE_ACTIVE) != 0) ? colorEditMeshActive : color;
#else
vec4 color = colorWireInactive;
vec4 color = colorWireEdit;
color = ((edge_flag & EDGE_SELECTED) != 0) ? colorEdgeSelect : color;
#endif
return color;
@ -46,10 +46,6 @@ vec4 EDIT_MESH_vertex_color(int vertex_flag)
return colorEdgeSelect;
}
else {
#ifdef EDGE_SELECTION
return colorWireEdit;
#else
return colorWireInactive;
#endif
}
}

View File

@ -90,7 +90,6 @@ typedef enum ThemeColorID {
TH_WIRE,
TH_WIRE_INNER,
TH_WIRE_EDIT,
TH_WIRE_INACTIVE,
TH_SELECT,
TH_ACTIVE,
TH_GROUP,

View File

@ -298,8 +298,6 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
cp = ts->syntaxr; break;
case TH_WIRE_EDIT:
cp = ts->wire_edit; break;
case TH_WIRE_INACTIVE:
cp = ts->wire_inactive; break;
case TH_LAMP:
cp = ts->lamp; break;
case TH_SPEAKER:
@ -936,7 +934,6 @@ void ui_theme_init_default(void)
rgba_char_args_set(btheme->tv3d.view_overlay, 0, 0, 0, 255);
rgba_char_args_set(btheme->tv3d.wire, 0x0, 0x0, 0x0, 255);
rgba_char_args_set(btheme->tv3d.wire_edit, 0x0, 0x0, 0x0, 255);
rgba_char_args_set(btheme->tv3d.wire_inactive, 32, 32, 32, 255);
rgba_char_args_set(btheme->tv3d.lamp, 0, 0, 0, 40);
rgba_char_args_set(btheme->tv3d.speaker, 0, 0, 0, 255);
rgba_char_args_set(btheme->tv3d.camera, 0, 0, 0, 255);
@ -3050,17 +3047,6 @@ void init_userdef_do_versions(Main *bmain)
}
}
for (bTheme *btheme = U.themes.first; btheme; btheme = btheme->next) {
ThemeSpace *ts;
for (ts = UI_THEMESPACE_START(btheme); ts != UI_THEMESPACE_END(btheme); ts++) {
if (btheme->tv3d.wire_inactive[3] == 0) {
rgba_char_args_set(btheme->tv3d.wire_inactive, 32, 32, 32, 255);
}
}
}
if (U.pixelsize == 0.0f)
U.pixelsize = 1.0f;

View File

@ -253,7 +253,7 @@ typedef struct ThemeSpace {
char view_overlay[4];
char wire[4], wire_edit[4], wire_inactive[4], select[4];
char wire[4], wire_edit[4], select[4];
char lamp[4], speaker[4], empty[4], camera[4];
char active[4], group[4], group_active[4], transform[4];
char vertex[4], vertex_select[4], vertex_bevel[4], vertex_unreferenced[4];
@ -361,7 +361,6 @@ typedef struct ThemeSpace {
char metadatabg[4];
char metadatatext[4];
int pad;
} ThemeSpace;

View File

@ -1709,11 +1709,6 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Wire", "");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "wire_inactive", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Inactive", "Color for wireframe when in edit mode, but edge selection is not active");
RNA_def_property_update(prop, 0, "rna_userdef_update");
prop = RNA_def_property(srna, "wire_edit", PROP_FLOAT, PROP_COLOR_GAMMA);
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Wire Edit", "Color for wireframe when in edit mode, but edge selection is active");