Integration stage of Softbody project

User level notes are in Wiki here;
http://wiki.blender.org/bin/view.pl/Blenderdev/Softbodies
And will be added in blender3d.org CMS later.

Tech level notes are still pending, but here's the most relevant ones;

- made ob->soft struct SoftBody to hold all settings, and read/save in
  files
- added (temporal!) conversion for the old settings. So: read old files
  with softbody experiments now, and save over!
- cleaned API calls for softbody, which are only 5 of them now:
  sbNew()
  sbFree()
  sbObjectStep()          (animation steps)
  sbObjectToSoftbody()    (full re-initialize data)
  sbObjectReset()         (only reset motion)
- API calls accepts time in frames now, within softbody.c it converts

Further, internally code was cleaned some (missing tabs etc). Also tried
to keep a well defined structure with hints how to add support for more
objects. Can write notes about that...
This commit is contained in:
2005-04-02 13:57:23 +00:00
parent 02d3ad0b34
commit bdb86d7c67
13 changed files with 559 additions and 496 deletions

View File

@@ -1537,13 +1537,8 @@ void exit_editmode(int freedata) /* freedata==0 at render, 1= freedata, 2= do un
/* displist make is different in editmode */
if(freedata) G.obedit= NULL;
// need to be here since
// makeDispList(ob); calls
// int mesh_modifier(Object *ob, char mode)..
// calling object_softbody_step(ob, ctime);
// needs a valid *up to date* softbody object or NULL pointer at "soft" member
// anyhow *new* dependacy graph should take care for that :)
if(ob->softflag & 0x01) object_to_softbody(ob,1.0f);
/* total remake of softbody data */
if(ob->softflag & OB_SB_ENABLE) sbObjectToSoftbody(ob);
makeDispList(ob);
@@ -1582,8 +1577,6 @@ void exit_editmode(int freedata) /* freedata==0 at render, 1= freedata, 2= do un
allqueue(REDRAWOOPS, 0);
}
scrarea_queue_headredraw(curarea);
// faaaaar to late
// if(ob->softflag & 0x01) object_to_softbody(ob);
if(G.obedit==NULL && freedata==2)
BIF_undo_push("Editmode");