About Rewriting the 2.4x BPython API

hi folk,

some documentations:

You can try it ( is WIP of course):
daily compilations:http://www.zoo-logique.org/3D.Blender/index.php3?zoo=com
branch pyapi_dev:http://www.zoo-logique.org/3D.Blender/compilations/win32pyapi2209.zip
last apiDoc:http://www.zoo-logique.org/3D.Blender/scripts_python/API/

thank you Jms for compiling and updating doc to Zoo Server.

There will be bpy instead of “Blender” module. The Blender module will be erased. So all scripts wrote since 1999 shouldn’t work!

What do you think about this ?

I’m just reading through it now, but it looks very nice. It looks like it will be more straightforward to use, more pythony :slight_smile:

If you are serious about getting feedback then should the published latest API doc in Windows only form?


What I think, small pain for huge gain.
It shouldn’t be too hard to rescue old scripts to work with the new api.
most changes are slowly filtering through.
then there are some much better scripts being built, more integration.
Most of the math is still the same, it’s just a matter of fixing a couple of lines in most cases.
expected integer got float, is a tricky one.
whrandom to random, is easy.
The Python console (black box) gives you most errors, then go through & fix.
Even fixing small errors that appear now helps for later.
Most pre 1999 scripts don’t work now, nor have they for some time.
If they are really needed their either included in Blender by now or have been updated to some degree.
For non maintained scripts the story is different but then you need to weigh up functionality of the script vs increased functionality of Blender that often leaves the old script obsolete anyway.
It sure is a pain putting a script in the not working box but things like old sculpt scripts, old sss scripts, most of Cambo’s old scripts, ect., are either hardcoded into blender or other tools make them no longer needed.
I have just finished testing lots of scripts for Blender 2.45,
160 still working object/mesh/spacehandler orientated scripts,
400+ more scripts to test or fix if I like them/can.
Few disappointments so far.
Anyway I digress, the benefits far outweigh the losses.

I didn’t understand why you say that.

But I found the error:the url to doc was bad. So I edited the original post.

For all --> http://www.zoo-logique.org/3D.Blender/scripts_python/API/

Thanks Marco. :slight_smile:


If somebody is serious enough about porting old to new scripts, it would be beyond awsome if some generous and ingenious wizard could knock a module with a bank of regexes containing most common constructs in BPy scripts for half-automated subing from old to new sintax … a translator so to speak.

I think it would be easier to do it on the fly, parallel to api rewrite, but otoh I also reckon this would be a little bit much to ask.

Worth mentioning though …

Direct link to the bpy part :

Note that the pyapi_devel branch does not compile under windows with msvc 8.0 so i had to make a lot of corrections. The patch may be asked on :