diff options
author | Willian Padovani Germano <wpgermano@gmail.com> | 2006-04-30 20:22:31 +0400 |
---|---|---|
committer | Willian Padovani Germano <wpgermano@gmail.com> | 2006-04-30 20:22:31 +0400 |
commit | 89dab4397d9eb2b9970ba28edeaf95c578dcaab4 (patch) | |
tree | 267c2faf6a9f2475630df2894a5e24832bc9ace4 /source/blender/blenkernel/BKE_bad_level_calls.h | |
parent | 3b84767824d4f9666dfc5eea1fcf134d7643fb27 (diff) |
Pydrivers: Ipo Drivers controlled by Python expressions
wiki with info: http://mediawiki.blender.org/index.php/BlenderDev/PyDrivers
(there are two sample .blends in the patch tracker entry, last link in
the wiki page)
Notes:
In usiblender.c I just made Python exit before the main library gets
freed. I found a situation with pydrivers where py's gc tried to del
objects on exit and their ID's were not valid anymore (so sigsegv).
Ton needs to check the depsgraph part.
For now pydrivers can reference their own object, something normal
ipodrivers can't. This seems to work fine and is quite useful, but if
tests prove the restriction is necessary, we just need to uncomment a
piece of code in EXPP_interface.c, marked with "XXX".
Thanks Ton for the ipodrivers code and adding the hooks for the py part
and Martin for the "Button Python Evaluation" patch from which I started
this one.
Anyone interested, please check the wiki, the .blends (they have
README's) and tell me about any issue.
Diffstat (limited to 'source/blender/blenkernel/BKE_bad_level_calls.h')
-rw-r--r-- | source/blender/blenkernel/BKE_bad_level_calls.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_bad_level_calls.h b/source/blender/blenkernel/BKE_bad_level_calls.h index f261f786dd4..10248fad220 100644 --- a/source/blender/blenkernel/BKE_bad_level_calls.h +++ b/source/blender/blenkernel/BKE_bad_level_calls.h @@ -57,13 +57,20 @@ struct Sequence; struct ListBase; void build_seqar(struct ListBase *seqbase, struct Sequence ***seqar, int *totseq); +/* BPython API */ struct ID; struct Script; struct Text; +struct IpoDriver; /* DNA_curve_types.h */ +struct Object; void BPY_do_pyscript (struct ID *id, short int event); void BPY_clear_script (struct Script *script); void BPY_free_compiled_text (struct Text *text); void BPY_free_screen_spacehandlers (struct bScreen *sc); +/* ipo.c: */ +float BPY_pydriver_eval(struct IpoDriver *driver); +/* depsgraph.c: */ +struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); /* writefile.c */ struct Oops; |