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.
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user