Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-08-22 17:00:59 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-08-22 17:07:36 +0300
commite6f3d8b3e1158ebdc89ceae1de5ce7bc5c420f51 (patch)
tree197389a2268b472a19119fa3faf1f9ab1223240a /source/blender/blenkernel/intern/material.c
parenteae9b86297876d2172681e880fe2bcc8450a01ed (diff)
Revert "Fix T68971: Copy As New Driver from Material node creates a bad reference."
This reverts commits 54fd8176d7e91, 4c5becb6b1 and 8f578150e. Those kind of commits must be reviewed and approved by project owners. That one: * Broke Collada building by not properly updating all calls to modified function. * Broke *whole* ID management by not properly updating library_query.c. And in general, I am strongly against backward ID pointers, those are *always* a serious PITA for ID management. Sometimes they cannot be avoided, but in general other ways to get that kind of info should be investigated first.
Diffstat (limited to 'source/blender/blenkernel/intern/material.c')
-rw-r--r--source/blender/blenkernel/intern/material.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 01df423d9d7..1545ae4f48f 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -183,7 +183,7 @@ void BKE_material_copy_data(Main *bmain, Material *ma_dst, const Material *ma_sr
if (ma_src->nodetree) {
/* Note: nodetree is *not* in bmain, however this specific case is handled at lower level
* (see BKE_libblock_copy_ex()). */
- BKE_nodetree_copy_owned_ex(bmain, ma_src->nodetree, &ma_dst->nodetree, &ma_dst->id, flag);
+ BKE_id_copy_ex(bmain, (ID *)ma_src->nodetree, (ID **)&ma_dst->nodetree, flag);
}
if ((flag & LIB_ID_COPY_NO_PREVIEW) == 0) {
@@ -1562,7 +1562,7 @@ void copy_matcopybuf(Main *bmain, Material *ma)
memcpy(&matcopybuf, ma, sizeof(Material));
if (ma->nodetree != NULL) {
- matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, bmain, NULL, false);
+ matcopybuf.nodetree = ntreeCopyTree_ex(ma->nodetree, bmain, false);
}
matcopybuf.preview = NULL;
@@ -1592,7 +1592,7 @@ void paste_matcopybuf(Main *bmain, Material *ma)
(ma->id) = id;
if (matcopybuf.nodetree != NULL) {
- ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, bmain, &ma->id, false);
+ ma->nodetree = ntreeCopyTree_ex(matcopybuf.nodetree, bmain, false);
}
}