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/python/BPY_extern.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/python/BPY_extern.h')
-rw-r--r-- | source/blender/python/BPY_extern.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index ffb5f258d8d..cc187ea3a0d 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -37,6 +37,8 @@ extern char bprogname[]; /* holds a copy of argv[0], from creator.c */ struct Text; /* defined in DNA_text_types.h */ struct ID; /* DNA_ID.h */ +struct Object; /* DNA_object_types.h */ +struct IpoDriver; /* DNA_curve_types.h */ struct ScriptLink; /* DNA_scriptlink_types.h */ struct ListBase; /* DNA_listBase.h */ struct SpaceText; /* DNA_space_types.h */ @@ -79,6 +81,9 @@ extern "C" { int BPY_do_spacehandlers(struct ScrArea *sa, unsigned short event, unsigned short space_event); + float BPY_pydriver_eval(struct IpoDriver *driver); + struct Object **BPY_pydriver_get_objects(struct IpoDriver *driver); + /* format importer hook */ int BPY_call_importloader( char *name ); |