From a75ac18638f41d8b427b7519628602b6be54d995 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Wed, 13 Feb 2019 17:19:18 +0100 Subject: Fix T59062: Keyframed node properties stay linked after shading network duplication. There is no reason not to duplicate Actions too here, especially when Materials' Actions are pretty much impossible to edit from current UI (afaik, DopeSheet editor does not has any way to change them?). --- source/blender/editors/render/render_shading.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/editors/render/render_shading.c') diff --git a/source/blender/editors/render/render_shading.c b/source/blender/editors/render/render_shading.c index 7576ca8f764..6f78b9338f5 100644 --- a/source/blender/editors/render/render_shading.c +++ b/source/blender/editors/render/render_shading.c @@ -526,7 +526,9 @@ static int new_material_exec(bContext *C, wmOperator *UNUSED(op)) /* add or copy material */ if (ma) { - ma = BKE_material_copy(bmain, ma); + Material *new_ma = NULL; + BKE_id_copy_ex(bmain, &ma->id, (ID **)&new_ma, LIB_ID_COPY_DEFAULT | LIB_ID_COPY_ACTIONS); + ma = new_ma; } else { const char *name = DATA_("Material"); -- cgit v1.2.3