diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 07:31:33 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 07:31:33 +0400 |
commit | 75bcb4cd9805d58d4f79d5668860f47bf6f17194 (patch) | |
tree | 2ffccd1ed22d02e6706957077e3c782d39e46907 /source/blender/src/editmesh.c | |
parent | ac3ed0f92a8e8fab50312c716c8cbdf3f38616d9 (diff) |
- added modifiers_getVirtualModifierList, returns pointer to first modifier
but including "virtual" modifiers (for example, an object skel-parented
to a lattice has a virtual first lattice modifier)
- removed mesh_modifier(), all functionality has been incorporated into
modifier stack (well, keys still don't exist as a modifier, but I am
not sure if they should).
- added interface option to convert a virtual modifier into a real modifier
- added option to parent to lattice object or lattice with deform
- bug fix, patch of hook indices patched all hooks (oops) not just ones
for edited mesh
NOTE: Files saved with 2.38 that include an object parented to a lattice
will not load correctly, because it will look like the object is parented
only to the object (i.e. without deform). Can be simply fixed by reparenting
or adding a lattice modifier. Older files are handled automatically.
Diffstat (limited to 'source/blender/src/editmesh.c')
-rw-r--r-- | source/blender/src/editmesh.c | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/source/blender/src/editmesh.c b/source/blender/src/editmesh.c index 54a298a54ed..a27f9af7c7e 100644 --- a/source/blender/src/editmesh.c +++ b/source/blender/src/editmesh.c @@ -1203,28 +1203,30 @@ void load_editMesh(void) int i,j; for (ob=G.main->object.first; ob; ob=ob->id.next) { - for (md=ob->modifiers.first; md; md=md->next) { - if (md->type==eModifierType_Hook) { - HookModifierData *hmd = (HookModifierData*) md; + if (ob->data==me) { + for (md=ob->modifiers.first; md; md=md->next) { + if (md->type==eModifierType_Hook) { + HookModifierData *hmd = (HookModifierData*) md; - if (!vertMap) { - vertMap = MEM_callocN(sizeof(*vertMap)*ototvert, "vertMap"); + if (!vertMap) { + vertMap = MEM_callocN(sizeof(*vertMap)*ototvert, "vertMap"); - for (eve=em->verts.first; eve; eve=eve->next) { - if (eve->keyindex!=-1) - vertMap[eve->keyindex] = eve; + for (eve=em->verts.first; eve; eve=eve->next) { + if (eve->keyindex!=-1) + vertMap[eve->keyindex] = eve; + } } - } - - for (i=j=0; i<hmd->totindex; i++) { - eve = vertMap[hmd->indexar[i]]; - if (eve) { - hmd->indexar[j++] = (long) eve->vn; + for (i=j=0; i<hmd->totindex; i++) { + eve = vertMap[hmd->indexar[i]]; + + if (eve) { + hmd->indexar[j++] = (long) eve->vn; + } } - } - hmd->totindex = j; + hmd->totindex = j; + } } } } |