From e6f3d8b3e1158ebdc89ceae1de5ce7bc5c420f51 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Thu, 22 Aug 2019 16:00:59 +0200 Subject: 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. --- source/blender/blenkernel/intern/linestyle.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/blenkernel/intern/linestyle.c') diff --git a/source/blender/blenkernel/intern/linestyle.c b/source/blender/blenkernel/intern/linestyle.c index b682e4265ad..7bfe5a7c8ff 100644 --- a/source/blender/blenkernel/intern/linestyle.c +++ b/source/blender/blenkernel/intern/linestyle.c @@ -178,8 +178,7 @@ void BKE_linestyle_copy_data(struct Main *bmain, if (linestyle_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, linestyle_src->nodetree, &linestyle_dst->nodetree, &linestyle_dst->id, flag); + BKE_id_copy_ex(bmain, (ID *)linestyle_src->nodetree, (ID **)&linestyle_dst->nodetree, flag); } LineStyleModifier *m; @@ -1457,7 +1456,7 @@ void BKE_linestyle_default_shader(const bContext *C, FreestyleLineStyle *linesty BLI_assert(linestyle->nodetree == NULL); - ntree = ntreeAddTree(NULL, "stroke_shader", "ShaderNodeTree", &linestyle->id); + ntree = ntreeAddTree(NULL, "stroke_shader", "ShaderNodeTree"); linestyle->nodetree = ntree; -- cgit v1.2.3