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:
authorCampbell Barton <ideasman42@gmail.com>2017-05-17 09:08:36 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-05-17 09:08:36 +0300
commit9995bd8532332fb58216c4df66ebd80c9d0f3912 (patch)
tree9787b06f19b25d4c2bcc4f695686b402f8a98516 /source/blender/draw/modes/paint_weight_mode.c
parent741a4cfc0beeee69d60273d536e1224e3684c7c2 (diff)
DWM: use DRWContextState.obact
Diffstat (limited to 'source/blender/draw/modes/paint_weight_mode.c')
-rw-r--r--source/blender/draw/modes/paint_weight_mode.c9
1 files changed, 4 insertions, 5 deletions
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;