diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 14:22:54 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2016-07-08 19:11:20 +0300 |
commit | 71f5df9f44dd6dfd125d6ea7f7f6542e6f9e7faa (patch) | |
tree | 448e56ec454f01fbde8ef9837fe89e4e8485ec1e /source/blender/editors | |
parent | 3b7bce42d7096d840c4cbdb6c4b98310cfe551ef (diff) |
Refactor remapping's pre/post process of special cases.
Main issue was that BKE_libblock_relink_ex was pretty much ignoring all those...
Also, unlinking of objects was not handling correctly indirect-related flags.
Refactored code into helper functions to avoid too much duplicated code.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 132c3fa5438..76d0143e898 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -864,7 +864,7 @@ static void shader_preview_free(void *customdata) /* get rid of copied world */ BLI_remlink(&pr_main->world, sp->worldcopy); /* T32865 - we need to unlink the texture copies, unlike for materials */ - BKE_libblock_relink_ex(sp->worldcopy, NULL, NULL, true); + BKE_libblock_relink_ex(pr_main, sp->worldcopy, NULL, NULL, true); BKE_world_free(sp->worldcopy); properties = IDP_GetProperties((ID *)sp->worldcopy, false); @@ -881,7 +881,7 @@ static void shader_preview_free(void *customdata) /* get rid of copied lamp */ BLI_remlink(&pr_main->lamp, sp->lampcopy); - BKE_libblock_relink_ex(sp->lampcopy, NULL, NULL, true); + BKE_libblock_relink_ex(pr_main, sp->lampcopy, NULL, NULL, true); BKE_lamp_free(sp->lampcopy); properties = IDP_GetProperties((ID *)sp->lampcopy, false); |