diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-17 09:08:36 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-17 09:08:36 +0300 |
commit | 9995bd8532332fb58216c4df66ebd80c9d0f3912 (patch) | |
tree | 9787b06f19b25d4c2bcc4f695686b402f8a98516 /source/blender/draw | |
parent | 741a4cfc0beeee69d60273d536e1224e3684c7c2 (diff) |
DWM: use DRWContextState.obact
Diffstat (limited to 'source/blender/draw')
-rw-r--r-- | source/blender/draw/modes/paint_vertex_mode.c | 3 | ||||
-rw-r--r-- | source/blender/draw/modes/paint_weight_mode.c | 9 |
2 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/draw/modes/paint_vertex_mode.c b/source/blender/draw/modes/paint_vertex_mode.c index 6098b37b3db..1853ff4c877 100644 --- a/source/blender/draw/modes/paint_vertex_mode.c +++ b/source/blender/draw/modes/paint_vertex_mode.c @@ -141,9 +141,8 @@ static void PAINT_VERTEX_cache_populate(void *vedata, Object *ob) { PAINT_VERTEX_StorageList *stl = ((PAINT_VERTEX_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_VERTEX, ""); bool use_wire = BKE_collection_engine_property_value_get_bool(ces_mode_pw, "use_wire"); char flag = ((Mesh *)ob->data)->editflag; 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; |