diff options
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r-- | source/blender/blenkernel/intern/object.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c index 72f7d54b555..b910e11beed 100644 --- a/source/blender/blenkernel/intern/object.c +++ b/source/blender/blenkernel/intern/object.c @@ -435,6 +435,8 @@ void BKE_object_unlink(Object *ob) Scene *sce; SceneRenderLayer *srl; FreestyleLineSet *lineset; + bNodeTree *ntree; + bNode *node; Curve *cu; Tex *tex; Group *group; @@ -811,6 +813,15 @@ void BKE_object_unlink(Object *ob) } camera = camera->id.next; } + + /* nodes */ + for (ntree = bmain->nodetree.first; ntree; ntree = ntree->id.next) { + for (node = ntree->nodes.first; node; node = node->next) { + if (node->id == &ob->id) { + node->id = NULL; + } + } + } } /* actual check for internal data, not context or flags */ |