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/blenkernel/intern/lamp.c
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/blenkernel/intern/lamp.c')
-rw-r--r--source/blender/blenkernel/intern/lamp.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/lamp.c b/source/blender/blenkernel/intern/lamp.c
index 903b032e080..1f381a1a2c2 100644
--- a/source/blender/blenkernel/intern/lamp.c
+++ b/source/blender/blenkernel/intern/lamp.c
@@ -172,6 +172,9 @@ void BKE_lamp_make_local(Lamp *la)
if (la->id.lib == NULL) return;
if (la->id.us == 1) {
id_clear_lib_data(bmain, &la->id);
+ /* nodetree uses same lib */
+ if (la->nodetree)
+ la->nodetree->id.lib = NULL;
return;
}
@@ -186,6 +189,9 @@ void BKE_lamp_make_local(Lamp *la)
if (is_local && is_lib == FALSE) {
id_clear_lib_data(bmain, &la->id);
+ /* nodetree uses same lib */
+ if (la->nodetree)
+ la->nodetree->id.lib = NULL;
}
else if (is_local && is_lib) {
Lamp *la_new = BKE_lamp_copy(la);