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:
authorMartin Poirier <theeth@yahoo.com>2009-03-23 00:06:08 +0300
committerMartin Poirier <theeth@yahoo.com>2009-03-23 00:06:08 +0300
commitfa765a554c6883364dc24c286dd5b630ce5dcfe6 (patch)
tree0601bd5bf1e583e09fa15e160509389440aabe15
parent1914ed72b25cd856c7be3e341e87f9bfa8966275 (diff)
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
-rw-r--r--source/blender/blenloader/intern/writefile.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index 92d847d4782..cf8109fe9b3 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -1332,9 +1332,9 @@ static void write_textures(WriteData *wd, ListBase *idbase)
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) {