diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2008-01-30 02:13:31 +0300 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2008-01-30 02:13:31 +0300 |
commit | 7a7a52226f52952534c93832c3e7b0492ec0ad30 (patch) | |
tree | eef652aeff416bc8a3857172984d786c76861666 /source/blender/blenkernel/intern/implicit.c | |
parent | 2e697f3b9395eb0eb1649997588f3e73a4e1ba8b (diff) |
makes bullet independant from gameengine for cmake, introduces esc-key during sim, disables collisions when no bullet there
Diffstat (limited to 'source/blender/blenkernel/intern/implicit.c')
-rw-r--r-- | source/blender/blenkernel/intern/implicit.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/implicit.c b/source/blender/blenkernel/intern/implicit.c index f56b94c97ce..72edef1766b 100644 --- a/source/blender/blenkernel/intern/implicit.c +++ b/source/blender/blenkernel/intern/implicit.c @@ -110,6 +110,10 @@ double itval() return t2-t1; } #endif + +/* callbacks for errors and interrupts and some goo */ +static int (*CT_localInterruptCallBack)(void) = NULL; + /* #define C99 #ifdef C99 @@ -1525,6 +1529,10 @@ int implicit_solver (Object *ob, float frame, ClothModifierData *clmd, ListBase step += dt; if(effectors) pdEndEffectors(effectors); + + /* ask for user break */ + if (CT_localInterruptCallBack && CT_localInterruptCallBack()) + return 0; } for(i = 0; i < numverts; i++) @@ -1569,3 +1577,9 @@ void implicit_set_positions (ClothModifierData *clmd) if(G.rt > 0) printf("implicit_set_positions\n"); } + +/* Cloth global visible functions */ +void clmdSetInterruptCallBack(int (*f)(void)) +{ + CT_localInterruptCallBack = f; +} |