diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-13 19:19:18 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2019-02-13 19:20:49 +0300 |
commit | a75ac18638f41d8b427b7519628602b6be54d995 (patch) | |
tree | 1a0aaec6925b0c29b82b98b38c3ce2b4832449a3 /source/blender/editors/render/render_shading.c | |
parent | 46c871b4aee88e43ce6677bafdea63839abf242a (diff) |
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?).
Diffstat (limited to 'source/blender/editors/render/render_shading.c')
-rw-r--r-- | source/blender/editors/render/render_shading.c | 4 |
1 files changed, 3 insertions, 1 deletions
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"); |