Merged changes in the trunk up to revision 26260.
[blender-staging.git] / source / blender / blenloader / intern / writefile.c
index d8bb140186c33c2febff8c3434ef0f7ce1f8e250..84c5cab48c6a027d5e46d1b47811edb22f246c57 100644 (file)
@@ -486,7 +486,7 @@ static void write_nodetree(WriteData *wd, bNodeTree *ntree)
                        /* could be handlerized at some point, now only 1 exception still */
                        if(ntree->type==NTREE_SHADER && (node->type==SH_NODE_CURVE_VEC || node->type==SH_NODE_CURVE_RGB))
                                write_curvemapping(wd, node->storage);
-                       else if(ntree->type==NTREE_COMPOSIT && (node->type==CMP_NODE_TIME || node->type==CMP_NODE_CURVE_VEC || node->type==CMP_NODE_CURVE_RGB))
+                       else if(ntree->type==NTREE_COMPOSIT && ELEM4(node->type, CMP_NODE_TIME, CMP_NODE_CURVE_VEC, CMP_NODE_CURVE_RGB, CMP_NODE_HUECORRECT))
                                write_curvemapping(wd, node->storage);
                        else if(ntree->type==NTREE_TEXTURE && (node->type==TEX_NODE_CURVE_RGB || node->type==TEX_NODE_CURVE_TIME) )
                                write_curvemapping(wd, node->storage);
@@ -935,15 +935,8 @@ static void write_fcurves(WriteData *wd, ListBase *fcurves)
                        ChannelDriver *driver= fcu->driver;
                        DriverVar *dvar;
                        
-                       /* don't save compiled python bytecode */
-                       void *expr_comp= driver->expr_comp;
-                       driver->expr_comp= NULL;
-                       
                        writestruct(wd, DATA, "ChannelDriver", 1, driver);
                        
-                       driver->expr_comp= expr_comp; /* restore */
-                       
-                       
                        /* variables */
                        for (dvar= driver->variables.first; dvar; dvar= dvar->next) {
                                writestruct(wd, DATA, "DriverVar", 1, dvar);
@@ -2042,8 +2035,10 @@ static void write_screens(WriteData *wd, ListBase *scrbase)
                                
                                if(sl->spacetype==SPACE_VIEW3D) {
                                        View3D *v3d= (View3D *) sl;
+                                       BGpic *bgpic;
                                        writestruct(wd, DATA, "View3D", 1, v3d);
-                                       if(v3d->bgpic) writestruct(wd, DATA, "BGpic", 1, v3d->bgpic);
+                                       for (bgpic= v3d->bgpicbase.first; bgpic; bgpic= bgpic->next)
+                                       writestruct(wd, DATA, "BGpic", 1, bgpic);
                                        if(v3d->localvd) writestruct(wd, DATA, "View3D", 1, v3d->localvd);
                                }
                                else if(sl->spacetype==SPACE_IPO) {
@@ -2336,6 +2331,8 @@ static void write_brushes(WriteData *wd, ListBase *idbase)
                        writestruct(wd, ID_BR, "Brush", 1, brush);
                        if (brush->id.properties) IDP_WriteProperty(brush->id.properties, wd);
                        
+                       writestruct(wd, DATA, "MTex", 1, &brush->mtex);
+                       
                        if(brush->curve)
                                write_curvemapping(wd, brush->curve);
                }