Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dalai@blender.org>2020-04-02 16:05:41 +0300
committerDalai Felinto <dalai@blender.org>2020-04-02 16:07:56 +0300
commitfa8a3c8f26f4eeb09d5d8b2792d32887be4fe111 (patch)
treeb2c918af88c2799311f7566fd770600207b9ca7d /source/blender/draw/engines/overlay/overlay_paint.c
parent7bffdab93c40d6de0410f767cdb24ebe1e478344 (diff)
Revert "Fix T72688: Vertex Group Weights in Edit Mode Occludes In Front Armatures"
This reverts commit 782e6ea4edd9cb09f2583c8f28a24d6330dc6ce8. Said fix introduced a crash the moment one goes to edit mode.
Diffstat (limited to 'source/blender/draw/engines/overlay/overlay_paint.c')
-rw-r--r--source/blender/draw/engines/overlay/overlay_paint.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_paint.c b/source/blender/draw/engines/overlay/overlay_paint.c
index 33008963d8b..4a1aa270de0 100644
--- a/source/blender/draw/engines/overlay/overlay_paint.c
+++ b/source/blender/draw/engines/overlay/overlay_paint.c
@@ -76,18 +76,15 @@ void OVERLAY_paint_cache_init(OVERLAY_Data *vedata)
DRWShadingGroup *grp;
DRWState state;
- const bool is_edit_mode = (pd->ctx_mode == CTX_MODE_EDIT_MESH);
- const bool draw_contours = !is_edit_mode &&
- (pd->overlay.wpaint_flag & V3D_OVERLAY_WPAINT_CONTOURS) != 0;
+ const bool draw_contours = (pd->overlay.wpaint_flag & V3D_OVERLAY_WPAINT_CONTOURS) != 0;
float opacity = 0.0f;
pd->paint_depth_grp = NULL;
psl->paint_depth_ps = NULL;
switch (pd->ctx_mode) {
case CTX_MODE_POSE:
- case CTX_MODE_EDIT_MESH:
case CTX_MODE_PAINT_WEIGHT: {
- opacity = is_edit_mode ? 1.0 : pd->overlay.weight_paint_mode_opacity;
+ opacity = pd->overlay.weight_paint_mode_opacity;
if (opacity > 0.0f) {
state = DRW_STATE_WRITE_COLOR | DRW_STATE_DEPTH_EQUAL;
state |= pd->painting.alpha_blending ? DRW_STATE_BLEND_ALPHA : DRW_STATE_BLEND_MUL;
@@ -210,12 +207,11 @@ void OVERLAY_paint_vertex_cache_populate(OVERLAY_Data *vedata, Object *ob)
struct GPUBatch *geom = NULL;
const Mesh *me_orig = DEG_get_original_object(ob)->data;
- const bool is_edit_mode = (pd->ctx_mode == CTX_MODE_EDIT_MESH);
- const bool use_wire = !is_edit_mode && (pd->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE);
- const bool use_face_sel = !is_edit_mode && (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL);
- const bool use_vert_sel = !is_edit_mode && (me_orig->editflag & ME_EDIT_PAINT_VERT_SEL);
+ const bool use_wire = (pd->overlay.paint_flag & V3D_OVERLAY_PAINT_WIRE) != 0;
+ const bool use_face_sel = (me_orig->editflag & ME_EDIT_PAINT_FACE_SEL) != 0;
+ const bool use_vert_sel = (me_orig->editflag & ME_EDIT_PAINT_VERT_SEL) != 0;
- if (ELEM(ob->mode, OB_MODE_WEIGHT_PAINT, OB_MODE_EDIT)) {
+ if (ob->mode == OB_MODE_WEIGHT_PAINT) {
if (pd->paint_surf_grp) {
geom = DRW_cache_mesh_surface_weights_get(ob);
DRW_shgroup_call(pd->paint_surf_grp, geom, ob);