From 873d7f7e14e080f75e75ed7c6c07f326e588cecb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Tue, 10 Jul 2018 14:14:55 +0200 Subject: DrawData: Change drawdata to a generic struct shared accross ID types This makes tagging much more generic and make the world updates more in line with the new tagging system (Depsgraph). --- source/blender/blenkernel/intern/world.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (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 69096ad7a08..3e1a9a4f57b 100644 --- a/source/blender/blenkernel/intern/world.c +++ b/source/blender/blenkernel/intern/world.c @@ -53,6 +53,8 @@ #include "BKE_node.h" #include "BKE_world.h" +#include "DRW_engine.h" + #include "DEG_depsgraph.h" #include "GPU_material.h" @@ -62,6 +64,8 @@ void BKE_world_free(World *wrld) { BKE_animdata_free((ID *)wrld, false); + DRW_drawdata_free((ID *)wrld); + /* is no lib link block, but world extension */ if (wrld->nodetree) { ntreeFreeTree(wrld->nodetree); @@ -119,6 +123,7 @@ void BKE_world_copy_data(Main *bmain, World *wrld_dst, const World *wrld_src, co } BLI_listbase_clear(&wrld_dst->gpumaterial); + BLI_listbase_clear((ListBase *)&wrld_dst->drawdata); if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) { BKE_previewimg_id_copy(&wrld_dst->id, &wrld_src->id); @@ -154,6 +159,7 @@ World *BKE_world_localize(World *wrld) wrldn->preview = NULL; BLI_listbase_clear(&wrldn->gpumaterial); + BLI_listbase_clear((ListBase *)&wrldn->drawdata); return wrldn; } @@ -163,10 +169,3 @@ 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 Depsgraph *depsgraph, World *world) -{ - DEG_debug_print_eval(depsgraph, __func__, world->id.name, world); - if (!BLI_listbase_is_empty(&world->gpumaterial)) { - world->update_flag = 1; - } -} -- cgit v1.2.3