diff options
Diffstat (limited to 'source/blender/editors/render')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 4 | ||||
-rw-r--r-- | source/blender/editors/render/render_shading.c | 6 |
2 files changed, 5 insertions, 5 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); diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 5d1d26a411f..bd5fd6b060a 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -463,7 +463,7 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) /* add or copy material */ if (ma) { - ma = BKE_material_copy(ma); + ma = BKE_material_copy(bmain, ma); } else { ma = BKE_material_add(bmain, DATA_("Material")); @@ -517,7 +517,7 @@ static int new_texture_exec(bContext *C, wmOperator *UNUSED(op)) /* add or copy texture */ if (tex) { - tex = BKE_texture_copy(tex); + tex = BKE_texture_copy(bmain, tex); } else { tex = BKE_texture_add(bmain, DATA_("Texture")); @@ -575,7 +575,7 @@ static int new_world_exec(bContext *C, wmOperator *UNUSED(op)) /* add or copy world */ if (wo) { - wo = BKE_world_copy(wo); + wo = BKE_world_copy(bmain, wo); } else { wo = add_world(bmain, DATA_("World")); |