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-04-25 17:35:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-04-25 17:35:08 +0300
commitacf07e73666a4a3edaeeb36489902b9373a9779d (patch)
treebe9893c779d1fcbda25e688e3dc6da0f4cadc627 /source/blender/draw/modes/edit_lattice_mode.c
parent75a759ea5e9a4b4a52900e6383d67c81b7cbdabe (diff)
Draw Manager: store context vars per draw
Was performing context access per object for scene, region etc. While not very slow they don't change during drawing so cache in a struct. This also makes it possible to draw in views besides the current context.
Diffstat (limited to 'source/blender/draw/modes/edit_lattice_mode.c')
-rw-r--r--source/blender/draw/modes/edit_lattice_mode.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/draw/modes/edit_lattice_mode.c b/source/blender/draw/modes/edit_lattice_mode.c
index 0f2df60bc64..61c01fb3f48 100644
--- a/source/blender/draw/modes/edit_lattice_mode.c
+++ b/source/blender/draw/modes/edit_lattice_mode.c
@@ -185,8 +185,8 @@ static void EDIT_LATTICE_cache_populate(void *vedata, Object *ob)
{
EDIT_LATTICE_PassList *psl = ((EDIT_LATTICE_Data *)vedata)->psl;
EDIT_LATTICE_StorageList *stl = ((EDIT_LATTICE_Data *)vedata)->stl;
- const struct bContext *C = DRW_get_context();
- Scene *scene = CTX_data_scene(C);
+ const DRWContextState *draw_ctx = DRW_context_state_get();
+ Scene *scene = draw_ctx->scene;
Object *obedit = scene->obedit;
UNUSED_VARS(psl);