diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 02:05:52 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 02:05:52 +0400 |
commit | 9030e5f686e81ab1137e0b845962298f01f6739c (patch) | |
tree | cf962f103b674b6aa4802bc0833225319adce578 /source/blender/blenloader/intern/writefile.c | |
parent | eb64e304b4f7882e6922cbf1fe3e33e07664135a (diff) |
- 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).
Diffstat (limited to 'source/blender/blenloader/intern/writefile.c')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index fe6b0c56629..920d4ed634a 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -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; |