[Bf-blender-cvs] [ab83695711b] greasepencil-object: Updating the hacky eval_ctx construction to use more official functions

Joshua Leung noreply at git.blender.org
Wed Nov 8 01:24:20 CET 2017


Commit: ab83695711bbfdf6471e2714b74d179154b36a7a
Author: Joshua Leung
Date:   Wed Nov 8 13:22:54 2017 +1300
Branches: greasepencil-object
https://developer.blender.org/rBab83695711bbfdf6471e2714b74d179154b36a7a

Updating the hacky eval_ctx construction to use more official functions

===================================================================

M	source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c

===================================================================

diff --git a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
index a47565316e2..eecf8b244ae 100644
--- a/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
+++ b/source/blender/draw/engines/gpencil/gpencil_draw_cache_impl.c
@@ -663,11 +663,9 @@ static void gpencil_draw_onion_strokes(GpencilBatchCache *cache, GPENCIL_e_data
 static void gpencil_init_evalctx_from_drawctx(const DRWContextState *draw_ctx, EvaluationContext *eval_ctx)
 {
 	Scene *scene = draw_ctx->scene;
-	if (scene) {
-		eval_ctx->depsgraph = scene->depsgraph_legacy;
-		eval_ctx->ctime = BKE_scene_frame_get(scene);
-	}
-
+	
+	eval_ctx->depsgraph = BKE_scene_get_depsgraph(scene, draw_ctx->scene_layer);
+	eval_ctx->ctime = BKE_scene_frame_get(scene);
 	eval_ctx->scene_layer = draw_ctx->scene_layer;
 	eval_ctx->engine = draw_ctx->engine;
 }



More information about the Bf-blender-cvs mailing list