diff options
author | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 06:23:52 +0400 |
---|---|---|
committer | Daniel Dunbar <daniel@zuster.org> | 2005-08-11 06:23:52 +0400 |
commit | ac3ed0f92a8e8fab50312c716c8cbdf3f38616d9 (patch) | |
tree | 937296e5fa6b3001b54f6bd491090b1c01ffdb59 /source/blender/blenkernel/intern/deform.c | |
parent | 2f32c8451cf3afb2fbac412a43e39a29054a3dc5 (diff) |
- switch to using softbody modifier, controls enabling but does not have
variables, these are still in same place. enable button automatically
makes/enables modifier.
- changed hook to hook modifier conversion to happen on direct link,
required to make sure we don't forget to free any memory for files
saved with 2.38 that have hooks.
- update modifier interface to enforce modifiers with the require-original-
data flag to not move beyond deforming modifiers.
- enforce only one softbody modifier allowed
NOTE: Once again, no modifier stack for lattice yet means softbody for
lattice does not work atm.
Diffstat (limited to 'source/blender/blenkernel/intern/deform.c')
-rw-r--r-- | source/blender/blenkernel/intern/deform.c | 37 |
1 files changed, 3 insertions, 34 deletions
diff --git a/source/blender/blenkernel/intern/deform.c b/source/blender/blenkernel/intern/deform.c index a1f04eaa048..e2cb842e16d 100644 --- a/source/blender/blenkernel/intern/deform.c +++ b/source/blender/blenkernel/intern/deform.c @@ -163,11 +163,6 @@ void mesh_modifier(Object *ob, float (**vertexCos_r)[3]) do_mesh_key(me); - if((ob->softflag & OB_SB_ENABLE) && !(ob->softflag & OB_SB_POSTDEF)) { - if (!vertexCos) vertexCos = mesh_getVertexCos(me, NULL); - sbObjectStep(ob, (float)G.scene->r.cfra, vertexCos); - } - if (ob->parent && me->totvert) { if(ob->parent->type==OB_CURVE && ob->partype==PARSKEL) { if (!vertexCos) vertexCos = mesh_getVertexCos(me, NULL); @@ -183,11 +178,6 @@ void mesh_modifier(Object *ob, float (**vertexCos_r)[3]) } } - if((ob->softflag & OB_SB_ENABLE) && (ob->softflag & OB_SB_POSTDEF)) { - if (!vertexCos) vertexCos = mesh_getVertexCos(me, NULL); - sbObjectStep(ob, (float)G.scene->r.cfra, vertexCos); - } - *vertexCos_r = vertexCos; } @@ -229,31 +219,10 @@ int curve_modifier(Object *ob, char mode) int lattice_modifier(Object *ob, char mode) { - static BPoint *bpoint; - Lattice *lt= ob->data; - int done= 0; - + Lattice *lt = ob->data; + do_latt_key(lt); - /* conditions if it's needed */ - if(ob->parent && ob->partype==PARSKEL); - else if((ob->softflag & OB_SB_ENABLE)); - else return 0; - - if(mode=='s') { // "start" - /* copy */ - bpoint= MEM_dupallocN(lt->def); - - if((ob->softflag & OB_SB_ENABLE)) { - sbObjectStep(ob, (float)G.scene->r.cfra, NULL); - } - } - else { // end - MEM_freeN(lt->def); - lt->def= bpoint; - bpoint= NULL; - } - - return done; + return 0; } |