From e750478ce3ed4427a468ec77513a60916b9cf9e4 Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Sat, 26 Jun 2004 18:18:11 +0000 Subject: The revised patch from Leon for new particle effects. New is that objects can have a force field, and Meshes can even deflect (collide) particles. This is in a new sub-menu in Object buttons F7 The full instructions where on the web, Leon mailed it me and I will put it in CMS tomorrow. For those who like to play with it now, here are demo files: http://download.blender.org/demo/test/ Quite some changes where in the integration though... so previous created particle deflectors will not work. Changes to mention now are: - gravity is renamed to 'force field' - force field and deflector options are in Object now, not in Mesh - the options also have its own struct, doesnt add to Object by default - force fields are possible for all object types, but only work on center. So empty objects are typical for it. Work to do: - add draw method in 3d win to denote forcefield objects - check on the UI (panel with different size?) - add 'recalc' button in deflector panel --- source/blender/blenloader/intern/readfile.c | 2 +- source/blender/blenloader/intern/writefile.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'source/blender/blenloader') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 11c65f783bc..0723b8175fc 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -2204,7 +2204,7 @@ static void direct_link_object(FileData *fd, Object *ob) paf= paf->next; } - link_list(fd, &ob->network); + ob->pd= newdataadr(fd, ob->pd); link_list(fd, &ob->prop); prop= ob->prop.first; diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 5b49f952140..32249c1c46b 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -649,6 +649,8 @@ static void write_objects(WriteData *wd, ListBase *idbase) write_constraints(wd, &ob->constraints); write_constraint_channels(wd, &ob->constraintChannels); write_nlastrips(wd, &ob->nlastrips); + + writestruct(wd, DATA, "PartDeflect", 1, ob->pd); } ob= ob->id.next; } -- cgit v1.2.3