diff options
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r-- | source/blender/blenkernel/intern/node.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c index 6a3e0353a07..c450b4624d0 100644 --- a/source/blender/blenkernel/intern/node.c +++ b/source/blender/blenkernel/intern/node.c @@ -1039,7 +1039,6 @@ static void ntreeMakeLocal_LinkNew(void *calldata, ID *owner_id, bNodeTree *ntre void ntreeMakeLocal(bNodeTree *ntree) { - Main *bmain= G.main; bNodeTreeType *treetype= ntreeGetType(ntree->type); MakeLocalCallData cd; @@ -1050,7 +1049,9 @@ void ntreeMakeLocal(bNodeTree *ntree) if(ntree->id.lib==NULL) return; if(ntree->id.us==1) { - id_clear_lib_data(&bmain->nodetree, (ID *)ntree); + ntree->id.lib= NULL; + ntree->id.flag= LIB_LOCAL; + new_id(NULL, (ID *)ntree, NULL); return; } @@ -1064,7 +1065,9 @@ void ntreeMakeLocal(bNodeTree *ntree) /* if all users are local, we simply make tree local */ if(cd.local && cd.lib==0) { - id_clear_lib_data(&bmain->nodetree, (ID *)ntree); + ntree->id.lib= NULL; + ntree->id.flag= LIB_LOCAL; + new_id(NULL, (ID *)ntree, NULL); } else if(cd.local && cd.lib) { /* this is the mixed case, we copy the tree and assign it to local users */ |