From 9995bd8532332fb58216c4df66ebd80c9d0f3912 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 17 May 2017 16:08:36 +1000 Subject: DWM: use DRWContextState.obact --- source/blender/draw/modes/paint_weight_mode.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '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 98ead1dc9fc..7bf61b0a133 100644 --- a/source/blender/draw/modes/paint_weight_mode.c +++ b/source/blender/draw/modes/paint_weight_mode.c @@ -89,10 +89,10 @@ static void PAINT_WEIGHT_engine_init(void *UNUSED(vedata)) { const DRWContextState *draw_ctx = DRW_context_state_get(); - if (e_data.actdef != draw_ctx->sl->basact->object->actdef) { - e_data.actdef = draw_ctx->sl->basact->object->actdef; + if (e_data.actdef != draw_ctx->obact->actdef) { + e_data.actdef = draw_ctx->obact->actdef; - BKE_mesh_batch_cache_dirty(draw_ctx->sl->basact->object->data, BKE_MESH_BATCH_DIRTY_PAINT); + BKE_mesh_batch_cache_dirty(draw_ctx->obact->data, BKE_MESH_BATCH_DIRTY_PAINT); } if (!e_data.weight_face_shader) { @@ -169,9 +169,8 @@ static void PAINT_WEIGHT_cache_populate(void *vedata, Object *ob) { PAINT_WEIGHT_StorageList *stl = ((PAINT_WEIGHT_Data *)vedata)->stl; const DRWContextState *draw_ctx = DRW_context_state_get(); - SceneLayer *sl = draw_ctx->sl; - if (ob->type == OB_MESH && ob == sl->basact->object) { + if ((ob->type == OB_MESH) && (ob == draw_ctx->obact)) { IDProperty *ces_mode_pw = BKE_layer_collection_engine_evaluated_get(ob, COLLECTION_MODE_PAINT_WEIGHT, ""); bool use_wire = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_wire"); char flag = ((Mesh *)ob->data)->editflag; -- cgit v1.2.3