patch [#26495] Adjustable outline width for selected objects
This commit is contained in:
parent
e263657df7
commit
aee5f0e20f
@ -161,6 +161,7 @@ enum {
|
||||
TH_VERTEX,
|
||||
TH_VERTEX_SELECT,
|
||||
TH_VERTEX_SIZE,
|
||||
TH_OUTLINE_WIDTH,
|
||||
TH_EDGE,
|
||||
TH_EDGE_SELECT,
|
||||
TH_EDGE_SEAM,
|
||||
|
@ -265,6 +265,8 @@ const unsigned char *UI_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colo
|
||||
cp= ts->vertex_select; break;
|
||||
case TH_VERTEX_SIZE:
|
||||
cp= &ts->vertex_size; break;
|
||||
case TH_OUTLINE_WIDTH:
|
||||
cp= &ts->outline_width; break;
|
||||
case TH_EDGE:
|
||||
cp= ts->edge; break;
|
||||
case TH_EDGE_SELECT:
|
||||
@ -513,6 +515,7 @@ void ui_theme_init_default(void)
|
||||
SETCOL(btheme->tv3d.vertex, 0, 0, 0, 255);
|
||||
SETCOL(btheme->tv3d.vertex_select, 255, 133, 0, 255);
|
||||
btheme->tv3d.vertex_size= 3;
|
||||
btheme->tv3d.outline_width= 1;
|
||||
SETCOL(btheme->tv3d.edge, 0x0, 0x0, 0x0, 255);
|
||||
SETCOL(btheme->tv3d.edge_select, 255, 160, 0, 255);
|
||||
SETCOL(btheme->tv3d.edge_seam, 219, 37, 18, 255);
|
||||
@ -1512,6 +1515,13 @@ void init_userdef_do_versions(void)
|
||||
}
|
||||
}
|
||||
|
||||
if (bmain->versionfile < 256 || (bmain->versionfile == 256 && bmain->subversionfile < 4)) {
|
||||
bTheme *btheme;
|
||||
for(btheme= U.themes.first; btheme; btheme= btheme->next) {
|
||||
if((btheme->tv3d.outline_width) == 0) btheme->tv3d.outline_width= 1;
|
||||
}
|
||||
}
|
||||
|
||||
if (bmain->versionfile < 257) {
|
||||
/* clear "AUTOKEY_FLAG_ONLYKEYINGSET" flag from userprefs, so that it doesn't linger around from old configs like a ghost */
|
||||
U.autokey_flag &= ~AUTOKEY_FLAG_ONLYKEYINGSET;
|
||||
|
@ -2455,7 +2455,7 @@ static void draw_mesh_object_outline(View3D *v3d, Object *ob, DerivedMesh *dm)
|
||||
{
|
||||
|
||||
if(v3d->transp==0) { // not when we draw the transparent pass
|
||||
glLineWidth(2.0);
|
||||
glLineWidth(UI_GetThemeValuef(TH_OUTLINE_WIDTH) * 2.0);
|
||||
glDepthMask(0);
|
||||
|
||||
/* if transparent, we cannot draw the edges for solid select... edges have no material info.
|
||||
|
@ -219,8 +219,8 @@ typedef struct ThemeSpace {
|
||||
char console_output[4], console_input[4], console_info[4], console_error[4];
|
||||
char console_cursor[4];
|
||||
|
||||
char vertex_size, facedot_size;
|
||||
char bpad[2];
|
||||
char vertex_size, outline_width, facedot_size;
|
||||
char bpad;
|
||||
|
||||
char syntaxl[4], syntaxn[4], syntaxb[4]; // syntax for textwindow and nodes
|
||||
char syntaxv[4], syntaxc[4];
|
||||
|
@ -971,6 +971,11 @@ static void rna_def_userdef_theme_space_view3d(BlenderRNA *brna)
|
||||
RNA_def_property_array(prop, 3);
|
||||
RNA_def_property_ui_text(prop, "Current Frame", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop= RNA_def_property(srna, "outline_width", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_range(prop, 1, 5);
|
||||
RNA_def_property_ui_text(prop, "Outline Width", "");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
}
|
||||
|
||||
static void rna_def_userdef_theme_space_graph(BlenderRNA *brna)
|
||||
|
Loading…
Reference in New Issue
Block a user