diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 00:32:06 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-10-30 00:50:44 +0300 |
commit | 79ff9a0e19018982baa6dbc9fe6c68b7819f5b9a (patch) | |
tree | 25e1c11c57cd0b2293a64acb7a3fe1da0763aec2 /source/blender | |
parent | d69fe6325dbe173219dfe35bbb7a657b5de01cba (diff) |
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.
Diffstat (limited to 'source/blender')
4 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c index 25c243fa589..7ae445ab476 100644 --- a/source/blender/blenloader/intern/versioning_280.c +++ b/source/blender/blenloader/intern/versioning_280.c @@ -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; } } } diff --git a/source/blender/blenloader/intern/versioning_defaults.c b/source/blender/blenloader/intern/versioning_defaults.c index c843ebe6765..5f4f8ddbabb 100644 --- a/source/blender/blenloader/intern/versioning_defaults.c +++ b/source/blender/blenloader/intern/versioning_defaults.c @@ -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; + } + } + } } } diff --git a/source/blender/editors/space_view3d/space_view3d.c b/source/blender/editors/space_view3d/space_view3d.c index dbec52de1a1..04eec211338 100644 --- a/source/blender/editors/space_view3d/space_view3d.c +++ b/source/blender/editors/space_view3d/space_view3d.c @@ -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 | diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 56385ee5447..53aad570c2b 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -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); |