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.
This commit is contained in:
2006-06-14 13:25:01 +00:00
parent b81e5bac74
commit acd56a193b
2 changed files with 7 additions and 1 deletions

View File

@@ -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;

View File

@@ -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,