Weightpaint mode: Removing barbarian batch tagging on engine init

This was introduced in the original implementation of weightpaint
in 2.8 (20f95de6ba). 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).
This commit is contained in:
Dalai Felinto 2018-09-03 11:12:31 -03:00
parent 70382fe7b3
commit 27c954386b
1 changed files with 0 additions and 8 deletions

View File

@ -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);
}