- added eModifierTypeFlag_RequiresOriginalData for modifiers that
can only follow deform (for example, they store mesh vertex indices) - added ModifierType.foreachObjectLink for iterating over Object links inside modifier data (used for file load, relinking, etc) - switched various modifiers_ functions to take object argument instead of ListBase - added user editable name field to modifiers - bug fix, duplicate and make single user didn't relink object pointers in modifier data - added modifiers to outliner, needs icon - added armature, hook, and softbody modifiers (softbody doesn't do anything atm). added conversion of old hooks to modifiers. NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files so if you have saved stuff with a cvs blender you will see blank names. NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh objects, hooks for lattices and curves are broken. Don't updated if you actually, say, *use* Blender. NOTE-THE-THIRD: Old hooks used a quirky weighting system during deformation which can't be extended to modifiers. On the upside, I doubt anyone relied on the old quirky system and the new system makes much more sense. (Although the way falloff works is still quite stupid I think).
This commit is contained in:
@@ -664,13 +664,18 @@ static void write_modifiers(WriteData *wd, ListBase *modbase)
|
||||
ModifierTypeInfo *mti = modifierType_getInfo(md->type);
|
||||
|
||||
writestruct(wd, DATA, mti->structName, 1, md);
|
||||
|
||||
if (md->type==eModifierType_Hook) {
|
||||
HookModifierData *hmd = (HookModifierData*) md;
|
||||
|
||||
writedata(wd, DATA, sizeof(int)*hmd->totindex, hmd->indexar);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static void write_objects(WriteData *wd, ListBase *idbase)
|
||||
{
|
||||
Object *ob;
|
||||
ObHook *hook;
|
||||
int a;
|
||||
|
||||
ob= idbase->first;
|
||||
@@ -705,11 +710,6 @@ static void write_objects(WriteData *wd, ListBase *idbase)
|
||||
}
|
||||
}
|
||||
|
||||
for(hook= ob->hooks.first; hook; hook= hook->next) {
|
||||
writestruct(wd, DATA, "ObHook", 1, hook);
|
||||
writedata(wd, DATA, sizeof(int)*hook->totindex, hook->indexar);
|
||||
}
|
||||
|
||||
write_modifiers(wd, &ob->modifiers);
|
||||
}
|
||||
ob= ob->id.next;
|
||||
|
||||
Reference in New Issue
Block a user