diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-05-17 04:03:09 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-05-17 04:03:09 +0300 |
commit | 2f6bc538742da1147619a60c6245d6697bd4d057 (patch) | |
tree | 6c6d02a628465f8528bc4d1e504facae3b32e108 /source/blender/draw/modes/sculpt_mode.c | |
parent | 8adec78ca574f09242aa4588ad04f498f1e074aa (diff) |
DWM: Add obact for convenience
Modes often need to check if the object is the active one.
Diffstat (limited to 'source/blender/draw/modes/sculpt_mode.c')
-rw-r--r-- | source/blender/draw/modes/sculpt_mode.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/source/blender/draw/modes/sculpt_mode.c b/source/blender/draw/modes/sculpt_mode.c index ba9f530ae40..a3f29b5bb8f 100644 --- a/source/blender/draw/modes/sculpt_mode.c +++ b/source/blender/draw/modes/sculpt_mode.c @@ -191,9 +191,8 @@ static void SCULPT_cache_populate(void *vedata, Object *ob) if (ob->type == OB_MESH) { const DRWContextState *draw_ctx = DRW_context_state_get(); - SceneLayer *sl = draw_ctx->sl; - if (ob->sculpt && ob == OBACT_NEW) { + if (ob->sculpt && (ob == draw_ctx->obact)) { /* XXX, needed for dyntopo-undo (which clears). * probably depsgraph should handlle? in 2.7x getting derived-mesh does this (mesh_build_data) */ |