From dfcb568c165913a15679f6b55b0b76e49a747a2e Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 20 Jul 2017 16:13:08 +0200 Subject: Fix T51925: Eevee: Animated Eevee values slowdown Move material update from RNA callback to dependency graph. --- source/blender/blenkernel/intern/world.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'source/blender/blenkernel/intern/world.c') diff --git a/source/blender/blenkernel/intern/world.c b/source/blender/blenkernel/intern/world.c index 363c36e644d..2adbdc83a36 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -175,3 +175,14 @@ void BKE_world_make_local(Main *bmain, World *wrld, const bool lib_local) { BKE_id_make_local_generic(bmain, &wrld->id, true, lib_local); } + +void BKE_world_eval(struct EvaluationContext *UNUSED(eval_ctx), World *world) +{ + if (G.debug & G_DEBUG_DEPSGRAPH) { + printf("%s on %s (%p)\n", __func__, world->id.name, world); + } + if (!BLI_listbase_is_empty(&world->gpumaterial)) { + world->update_flag = 1; + GPU_material_uniform_buffer_tag_dirty(&world->gpumaterial); + } +} -- cgit v1.2.3