[Bf-cycles] Render API

Paulo Perbone pauloperbone at yahoo.com
Fri Mar 14 02:54:38 CET 2014


Hi Brecht,

I need some help. After some time digging through the Blender code I think I know how things  works to the point I can start designing some API and modifications to the current Cycles integration. But for this to happens I need some clarifications and some advises.

Here are the topics I need to know better.

Blender's SDK

I'm assuming we need to support a real set of tools and API/SPI for developers to allow them to integrate and extend Blender using C++. In special for the Renderer we need a plug-in interface for shared library, with loaders, factories etc. This SDK should not depend on Blender's source code and should be ABI/API compatible with the matching version of its
 release and Blender's.

Internal features used outside Blender's blob

Cycles make use of lots of internal types and some times it uses its own with similar purpose. Concepts like Scene, Camera, Mesh etc exists inside Blender and they are the source of data for the Renderer. The way a SDK should work we should not have dependencies of internal types like this for the plug-in to compile and build. I can't think another way other than redefining all this concepts again into the SDK so that Blender can manage the translation of its internal state to a more public representation through the API/SPI interfaces.

How to deal with Python initialization vs C++ plug-in initialization

The way things works now is pretty straightforward. The module's Python code gain access to all sort of internal state and relay them to the C++ code. Once we separate the C++ to its own blob with its own roles things can become more evolved and complex. We could use a thin glue of Python for each plug-in but I'm not sure if I like this approach. Not to mention we need performance here so Python much probably would be in your way.

Events

  
We
need a way to expose internal events to the outside so the plug-in
can connect and consume event signals. The
same way we need to be able to fire events inside the plug-in into
Blender for any target
consumer.

  
I do
realize I'm kind of purist here with all this engineering way of thinking but, I can't
help myself.
If you can think some simple/better way to tackle this problem please
let me know your thoughts. If
all this make sense I can starting coding more seriously...
 
I
think that is it for now. Please mentor me so I can continue with
this project.
Thanks for your time.
Paulo Perbone
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-cycles/attachments/20140313/4e19de81/attachment.htm 


More information about the Bf-cycles mailing list