[Bf-blender-cvs] [27c954386b2] blender2.8: Weightpaint mode: Removing barbarian batch tagging on engine init

Dalai Felinto noreply at git.blender.org
Mon Sep 3 16:18:03 CEST 2018


Commit: 27c954386b279c480410b12e30ca5bd8e57629e7
Author: Dalai Felinto
Date:   Mon Sep 3 11:12:31 2018 -0300
Branches: blender2.8
https://developer.blender.org/rB27c954386b279c480410b12e30ca5bd8e57629e7

Weightpaint mode: Removing barbarian batch tagging on engine init

This was introduced in the original implementation of weightpaint
in 2.8 (20f95de6ba2d). But this is very shortsighted, we can't assume only one
object will be edited at once, nor should we tag things during drawing.

There is a chance this introduces "bugs". If it does, we then tackle them in the
proper way (usually tagging DEG after operators changing the weight paint data).

===================================================================

M	source/blender/draw/modes/paint_weight_mode.c

===================================================================

diff --git a/source/blender/draw/modes/paint_weight_mode.c b/source/blender/draw/modes/paint_weight_mode.c
index 5284f5552a9..f0dd1994e09 100644
--- a/source/blender/draw/modes/paint_weight_mode.c
+++ b/source/blender/draw/modes/paint_weight_mode.c
@@ -90,14 +90,6 @@ typedef struct PAINT_WEIGHT_PrivateData {
 
 static void PAINT_WEIGHT_engine_init(void *UNUSED(vedata))
 {
-	const DRWContextState *draw_ctx = DRW_context_state_get();
-
-	if (e_data.actdef != draw_ctx->obact->actdef) {
-		e_data.actdef = draw_ctx->obact->actdef;
-
-		BKE_mesh_batch_cache_dirty_tag(draw_ctx->obact->data, BKE_MESH_BATCH_DIRTY_ALL);
-	}
-
 	if (!e_data.weight_face_shader) {
 		e_data.weight_face_shader = GPU_shader_get_builtin_shader(GPU_SHADER_SIMPLE_LIGHTING_SMOOTH_COLOR_ALPHA);
 	}



More information about the Bf-blender-cvs mailing list