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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-06-14 17:25:01 +0400
committerTon Roosendaal <ton@blender.org>2006-06-14 17:25:01 +0400
commitacd56a193b2eb8ded58146de1b59682e7f01c66a (patch)
tree1a3df0fe16ff59d7b23c2012ea507f18147d638f /source
parentb81e5bac741fca9e6938d4608d343a08c5e9d6cc (diff)
Bug fix:
Files saved with new cloth modifier patch crash in cvs blender. (#define for cloth is 13 even!). This was caused by lack of upward compatibility for non existing modifiers. Also added giant warning in code for the ENUM for modifier types.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c6
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h2
2 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index d63374d472d..7f802b95f14 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2421,7 +2421,11 @@ static void direct_link_modifiers(FileData *fd, ListBase *lb)
for (md=lb->first; md; md=md->next) {
md->error = NULL;
-
+
+ /* if modifiers disappear, or for upward compatibility */
+ if(NULL==modifierType_getInfo(md->type))
+ md->type= eModifierType_None;
+
if (md->type==eModifierType_Subsurf) {
SubsurfModifierData *smd = (SubsurfModifierData*) md;
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index 5bc4015eb96..24400996831 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -5,6 +5,8 @@
#ifndef DNA_MODIFIER_TYPES_H
#define DNA_MODIFIER_TYPES_H
+/* WARNING ALERT! TYPEDEF VALUES ARE WRITTEN IN FILES! SO DO NOT CHANGE! */
+
typedef enum ModifierType {
eModifierType_None = 0,
eModifierType_Subsurf,