Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2004-10-01 18:04:17 +0400
committerTon Roosendaal <ton@blender.org>2004-10-01 18:04:17 +0400
commit04f5baee3a8ccfbe21c3f9eed49809f24fd7fddf (patch)
tree944e6e6b5b7dbc9711d9d1a87f3c158c6a3fd137 /source/blender/blenloader
parentd818141744bff49c8c7ae6befd7ba901bd2d869f (diff)
OK. Here's the long awaited first step (V0.01!) of SoftBody. It is called
from within mesh_modifiers (kernel deform.c). It copies vertices to a temporal particle system (struct SoftBody with BodyPoint structs) to do physics tricks with it. For each frame change the delta movements (based on standard ipo anim or even other deforms (later) are applied to the physics system. How to apply and calculate satisfying results is not my thing... so here I'll commu- nicate with others for. Since it's in the modifier stack, the SoftBody code can run entirely on original data (no displists!). Right now I've implemented 2 things; - "Goal" which is a per vertex value for how much the current position should take into account (goal=1 is without physics). This is a powerful method for artists to get control over what moves and not. Right now i read the vertex color for it. - And some spring stuff, which now only works based on force moving it to the originial location. This doesnt work with 'goal'... erhm. - You can re-use physics vars from engine, used right now is (in Object) - damping - springf (spring factor) - softflag (to set types, or activate softbody for it - The SoftBody pointer in struct Object is only runtime, nothing saved in file To prevent all users going to complain it doesn't work, I've hidden the functionality. :) The buttons to set softbody 'on' only show now (psst psst) when the object has name "soft" as first 4 characters. You can find the buttons in the F7 Particle Interaction Panel (which should be renamed 'physics properties' later or so. Demo file: http://www.blender.org/bf/softbody.blend
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 406e52a1919..25147dff5e9 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -2304,7 +2304,8 @@ static void direct_link_object(FileData *fd, Object *ob)
}
ob->pd= newdataadr(fd, ob->pd);
-
+ ob->soft= NULL;
+
link_list(fd, &ob->prop);
prop= ob->prop.first;
while(prop) {