Cycles: svn merge -r41157:41182 ^/trunk/blender
[blender.git] / source / blender / blenloader / intern / writefile.c
index 8959a1ed0179f948185e9a1c567bf4fff39d3c3e..8f179bd240bc5788d2fb85fd25c40e302c0d9148 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);
                        
                }