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:
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r--source/blender/blenkernel/intern/node.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index cb1f52a6265..6a3e0353a07 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -1,6 +1,4 @@
/*
- * $Id$
- *
* ***** BEGIN GPL LICENSE BLOCK *****
*
* This program is free software; you can redistribute it and/or
@@ -1041,6 +1039,7 @@ 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;
@@ -1051,9 +1050,7 @@ void ntreeMakeLocal(bNodeTree *ntree)
if(ntree->id.lib==NULL) return;
if(ntree->id.us==1) {
- ntree->id.lib= NULL;
- ntree->id.flag= LIB_LOCAL;
- new_id(NULL, (ID *)ntree, NULL);
+ id_clear_lib_data(&bmain->nodetree, (ID *)ntree);
return;
}
@@ -1067,9 +1064,7 @@ void ntreeMakeLocal(bNodeTree *ntree)
/* if all users are local, we simply make tree local */
if(cd.local && cd.lib==0) {
- ntree->id.lib= NULL;
- ntree->id.flag= LIB_LOCAL;
- new_id(NULL, (ID *)ntree, NULL);
+ id_clear_lib_data(&bmain->nodetree, (ID *)ntree);
}
else if(cd.local && cd.lib) {
/* this is the mixed case, we copy the tree and assign it to local users */