3D View: use 1.0 opacity for wpaint shading
Now the colors are multiplied, faded color isn't useful to see weights. Matches 2.7x behavior.
This commit is contained in:
@@ -1786,9 +1786,10 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
|
||||
if (sl->spacetype == SPACE_VIEW3D) {
|
||||
View3D *v3d = (View3D *)sl;
|
||||
float alpha = v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE ? 0.0f : 0.8f;
|
||||
float alpha_full = v3d->flag2 & V3D_SHOW_MODE_SHADE_OVERRIDE ? 0.0f : 1.0f;
|
||||
v3d->overlay.texture_paint_mode_opacity = alpha;
|
||||
v3d->overlay.vertex_paint_mode_opacity = alpha;
|
||||
v3d->overlay.weight_paint_mode_opacity = alpha;
|
||||
v3d->overlay.weight_paint_mode_opacity = alpha_full;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -82,8 +82,8 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
|
||||
{
|
||||
/* For all startup.blend files. */
|
||||
for (bScreen *screen = bmain->screen.first; screen; screen = screen->id.next) {
|
||||
for (ScrArea *area = screen->areabase.first; area; area = area->next) {
|
||||
for (ARegion *ar = area->regionbase.first; ar; ar = ar->next) {
|
||||
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
|
||||
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
|
||||
/* Remove all stored panels, we want to use defaults (order, open/closed) as defined by UI code here! */
|
||||
BKE_area_region_panels_free(&ar->panels);
|
||||
|
||||
@@ -93,6 +93,16 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
|
||||
ar->v2d.flag &= ~V2D_IS_INITIALISED;
|
||||
}
|
||||
}
|
||||
|
||||
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
|
||||
switch (sl->spacetype) {
|
||||
case SPACE_VIEW3D:
|
||||
{
|
||||
View3D *v3d = (View3D *)sl;
|
||||
v3d->overlay.weight_paint_mode_opacity = 1.0f;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -328,7 +328,7 @@ static SpaceLink *view3d_new(const ScrArea *UNUSED(sa), const Scene *scene)
|
||||
v3d->overlay.wireframe_threshold = 0.5f;
|
||||
v3d->overlay.bone_select_alpha = 0.5f;
|
||||
v3d->overlay.texture_paint_mode_opacity = 0.8;
|
||||
v3d->overlay.weight_paint_mode_opacity = 0.8;
|
||||
v3d->overlay.weight_paint_mode_opacity = 1.0f;
|
||||
v3d->overlay.vertex_paint_mode_opacity = 0.8;
|
||||
v3d->overlay.edit_flag = V3D_OVERLAY_EDIT_FACES |
|
||||
V3D_OVERLAY_EDIT_SEAMS |
|
||||
|
||||
@@ -2935,7 +2935,7 @@ static void rna_def_space_view3d_overlay(BlenderRNA *brna)
|
||||
|
||||
prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity");
|
||||
RNA_def_property_float_default(prop, 0.8f);
|
||||
RNA_def_property_float_default(prop, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay");
|
||||
RNA_def_property_range(prop, 0.0f, 1.0f);
|
||||
RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL);
|
||||
|
||||
Reference in New Issue
Block a user