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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-06-05 23:06:27 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-06-05 23:06:27 +0400
commit4c2a51e1f9691522d083d035b8d6b707bf1e4450 (patch)
tree1e7cf578a71b0c25018bfc4ab9b2c94c77629630 /source/blender/blenloader
parentf18fad668f67428698f4a87d08ded5858be3f018 (diff)
Fix #35640, part 1. Set the id.lib pointer for nested bNodeTree data blocks inside material, scene, etc. on lib_link, so that the UI buttons get disabled when editing linked node trees. Thanks to Brecht
van Lommel for suggesting this fix.
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7f1f00431d3..e3d4acef644 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2967,8 +2967,10 @@ static void lib_link_lamp(FileData *fd, Main *main)
la->ipo = newlibadr_us(fd, la->id.lib, la->ipo); // XXX deprecated - old animation system
- if (la->nodetree)
+ if (la->nodetree) {
lib_link_ntree(fd, &la->id, la->nodetree);
+ la->nodetree->id.lib = la->id.lib;
+ }
la->id.flag -= LIB_NEED_LINK;
}
@@ -3140,8 +3142,10 @@ static void lib_link_world(FileData *fd, Main *main)
}
}
- if (wrld->nodetree)
+ if (wrld->nodetree) {
lib_link_ntree(fd, &wrld->id, wrld->nodetree);
+ wrld->nodetree->id.lib = wrld->id.lib;
+ }
wrld->id.flag -= LIB_NEED_LINK;
}
@@ -3429,8 +3433,10 @@ static void lib_link_texture(FileData *fd, Main *main)
if (tex->ot)
tex->ot->object = newlibadr(fd, tex->id.lib, tex->ot->object);
- if (tex->nodetree)
+ if (tex->nodetree) {
lib_link_ntree(fd, &tex->id, tex->nodetree);
+ tex->nodetree->id.lib = tex->id.lib;
+ }
tex->id.flag -= LIB_NEED_LINK;
}
@@ -3511,8 +3517,10 @@ static void lib_link_material(FileData *fd, Main *main)
}
}
- if (ma->nodetree)
+ if (ma->nodetree) {
lib_link_ntree(fd, &ma->id, ma->nodetree);
+ ma->nodetree->id.lib = ma->id.lib;
+ }
ma->id.flag -= LIB_NEED_LINK;
}
@@ -5160,6 +5168,7 @@ static void lib_link_scene(FileData *fd, Main *main)
if (sce->nodetree) {
lib_link_ntree(fd, &sce->id, sce->nodetree);
+ sce->nodetree->id.lib = sce->id.lib;
composite_patch(sce->nodetree, sce);
}