[Bf-committers] Render API: Framework and Scene Break-Down

Jonathan Merritt j.merritt at pgrad.unimelb.edu.au
Wed Jun 6 08:02:36 CEST 2007

Hi Aaron,

IMHO, it looks very good.  I think there is a lot of detail left to work 
on in exactly how you give access to each type of data, but I think it 
will be less contentious than the overall architecture.

Also IMHO, I think you have chosen The Right (TM) approach in allowing 
Blender to act as a database and have the render plugin pick-and-choose 
the data it needs.  This is because it seems to be the most general 
approach.  If somebody wants a "Spit Out Everything" API, then it can 
easily be grafted on to your system, and could even be built on later as 
a standard interface.  At the same time, if they need it for efficiency, 
other exporters can pick-and-choose what they need.  I think the 
approach you've picked has the potential to fully satisfy both camps.

I think you've also done a fantastic job in taking on board community 
input without getting bogged down in endless debate.  Awesome! :-)

My only cautionary thought is that when you stand back and look at it, 
what you are proposing is really starting to look a whole lot like the 
Python API (+ a few exporter-defined callbacks).  I mean, the Python API 
allows you to pick and choose data from the Blender scene, and the 
script can then massage this data as required to perform export.  The 
only real difference is that you'll have a C API rather than a Python 
one.  Just to play devil's advocate... why can't we do the following:

1. Define the exporter callbacks in a Python script.  (i.e. a Python 
script or class or whatever is a valid exporter if it defines those 
2. Write the exporter as a Python script.
3. For exporters that need to use C/C++, write a Python binding (either 
in pure C or using pyrex et al.)

Then you could re-use all of the existing Python API for accessing parts 
of the Blender database, and your job is cut in half...  Your SoC 
project would then revolve around setting things up so that the render 
buttons can call a Python script, and writing a Python binding to the 
Blender renderer.  (Both of which would seriously Kick Ass IMHO! :-).  
Again, I'm just throwing this out there... mostly for a reality check... 

Jonathan Merritt.

<edited below/>
Aaron Moore wrote:
> Within the last few days I have developed a draft of my own thoughts
> in terms of a system framework and a breakdown of the API into
> sections.
> More information about both of these design subjects can be found here:
> http://wiki.blender.org/index.php/Render_API
> Aaron Moore
> mosani

More information about the Bf-committers mailing list