Revision: 19366
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=19366
Author:   theeth
Date:     2009-03-22 22:06:08 +0100 (Sun, 22 Mar 2009)

Log Message:
-----------
only write tex plugin and envmap data to file if texture is the right type. 
This takes care of lingering errors with missing texture plugins after texture 
type is changed

Modified Paths:
--------------
    trunk/blender/source/blender/blenloader/intern/writefile.c

Modified: trunk/blender/source/blender/blenloader/intern/writefile.c
===================================================================
--- trunk/blender/source/blender/blenloader/intern/writefile.c  2009-03-22 
21:04:28 UTC (rev 19365)
+++ trunk/blender/source/blender/blenloader/intern/writefile.c  2009-03-22 
21:06:08 UTC (rev 19366)
@@ -1332,9 +1332,9 @@
                        if (tex->id.properties) 
IDP_WriteProperty(tex->id.properties, wd);
 
                        /* direct data */
-                       if(tex->plugin) writestruct(wd, DATA, "PluginTex", 1, 
tex->plugin);
+                       if(tex->type == TEX_PLUGIN && tex->plugin) 
writestruct(wd, DATA, "PluginTex", 1, tex->plugin);
                        if(tex->coba) writestruct(wd, DATA, "ColorBand", 1, 
tex->coba);
-                       if(tex->env) writestruct(wd, DATA, "EnvMap", 1, 
tex->env);
+                       if(tex->type == TEX_ENVMAP && tex->env) writestruct(wd, 
DATA, "EnvMap", 1, tex->env);
                        
                        /* nodetree is integral part of texture, no libdata */
                        if(tex->nodetree) {


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to