diff options
author | Ton Roosendaal <ton@blender.org> | 2005-11-17 14:40:57 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2005-11-17 14:40:57 +0300 |
commit | ec477f7a638b4d048c288e347ae6b467f4675576 (patch) | |
tree | b21009c0fedee765b9b39831b13bacde66ba5030 /source/blender/blenkernel/intern/displist.c | |
parent | 96221a5331bc8652083ff4c1bc1c7086a4b71a5f (diff) |
Another Orange sneak-in feature: SoftBody support for Curves & Surfaces.
Well, it already worked a bit, but without weight options or edge
stiffness. You now can set the weights using the "Properties" Panel in
the 3D Window (allows multiple selections too) or with Wkey in Edit Mode.
Bezier curves have this too.
NOTE: Lattice SoftBody Goal created yesterday won't work anymore!
I've had to recode weight support for Nurbs Points, using a new weight
variable... this because the existing W variable was in use for Nurbs
already. Also Lattices have this new Weight variable, so the code is nice
uniform. Sorry for the artists who already created complex Lattices... :)
NOTE2: Surface Objects don't support edge stiffness yet
NOTE3: I've removed ancient screen coordinates from the Bezier struct,
which makes - even with added weight and padding - the struct smaller!
Demo file:
http://download.blender.org/demo/test/2.40/softbody_curve_lattice.blend
Diffstat (limited to 'source/blender/blenkernel/intern/displist.c')
-rw-r--r-- | source/blender/blenkernel/intern/displist.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index f668aa507b4..34500bfeea9 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1429,7 +1429,7 @@ static ModifierData *curve_get_tesselate_point(Object *ob, int forRender, int ed if (editmode && !(md->mode&eModifierMode_Editmode)) continue; if (mti->isDisabled && mti->isDisabled(md)) continue; - if (md->type==eModifierType_Hook) { + if (md->type==eModifierType_Hook || md->type==eModifierType_Softbody) { preTesselatePoint = md; } } @@ -1464,6 +1464,7 @@ void curve_calc_modifiers_pre(Object *ob, ListBase *nurb, int forRender, float ( deformedVerts = curve_getVertexCos(ob->data, nurb, &numVerts); originalVerts = MEM_dupallocN(deformedVerts); } + mti->deformVerts(md, ob, NULL, deformedVerts, numVerts); if (md==preTesselatePoint) |