Cycles: svn merge -r41182:41205 ^/trunk/blender
[blender-staging.git] / source / blender / blenloader / intern / writefile.c
index 752677d047df459f26a01e7c0e2952a2ce395f54..10cc5e85f9dd98ac9aa619a8f7d206847c6ca23d 100644 (file)
@@ -1859,6 +1859,12 @@ static void write_worlds(WriteData *wd, ListBase *idbase)
                        for(a=0; a<MAX_MTEX; a++) {
                                if(wrld->mtex[a]) writestruct(wd, DATA, "MTex", 1, wrld->mtex[a]);
                        }
+
+                       /* nodetree is integral part of lamps, no libdata */
+                       if(wrld->nodetree) {
+                               writestruct(wd, DATA, "bNodeTree", 1, wrld->nodetree);
+                               write_nodetree(wd, wrld->nodetree);
+                       }
                        
                        write_previews(wd, wrld->preview);
                }
@@ -1888,6 +1894,12 @@ static void write_lamps(WriteData *wd, ListBase *idbase)
                        if(la->curfalloff)
                                write_curvemapping(wd, la->curfalloff); 
                        
+                       /* nodetree is integral part of lamps, no libdata */
+                       if(la->nodetree) {
+                               writestruct(wd, DATA, "bNodeTree", 1, la->nodetree);
+                               write_nodetree(wd, la->nodetree);
+                       }
+
                        write_previews(wd, la->preview);
                        
                }