[Bf-taskforce25] data api proposal

Campbell Barton ideasman42 at gmail.com
Mon Sep 29 09:05:12 CEST 2008


- Read over the doc, nothing jumps out at me as WRONG, using C instead
of inline py seems ok, agree a bit wordy but still fine.

- IPO's Proxy, Notifiers are out of my depth. what you have written ok
but I think we might need to have a part working api to test this
better before making good decisions is possible.

- Agree with theeth, passing a pointer to the getter is better then
returning a value. not 100% sure about auto allocating idea - char
*BDP_propStringValue(p, NULL); // Allocate and return pointer to
string.
 Id keep this option open but only impliment if it looked like it was needed.

No mention has been made of warnings/exceptions,
could be good to be able to set an exception in the context, this can
be parsed to the python api or displayed as an error in the user
interface.
eg. Set an image path -> warning this path dosnt exist.  Setting a
bone size -> warning zero length bone will be removed,  Add a material
-> warning over 16..... etc

Another thing that crossed my mind was that it could be good to have a
way to delay updates (from the python api too), The context would
accumulate flags of update types and then you could manually update,
this should be off by default but in some cases where your setting
many object transformation settings, you wouldnt want it to
recalculate the worldspace location and constraints every time.

My approach to start this would be...
* to write the C auto generated api
* Generate a python api too.
* generate a user interface automatically. (using min/max tooltips, groups etc)
* implement notifiers, so changing values updates blender correctly.

Then I think we'd be in a better position to deciede on the trickier
stuff. experement getting IPO's using the api and make decisions as to
how this works.

Brecht, let us know if you start this yourself, if you could use some
help. I have a bit of free time now were in bcon4 :-/ so would not
mind writing up a c api as you have documented.

-- 
- Campbell


More information about the Bf-taskforce25 mailing list