<html><body><div style="color:#000; background-color:#fff; font-family:HelveticaNeue, Helvetica Neue, Helvetica, Arial, Lucida Grande, sans-serif;font-size:12pt"><div id="yiv4509665682"><div><div style="color: rgb(0, 0, 0); background-color: rgb(255, 255, 255); font-size: 12pt; font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;"><font size="4">Hi Brecht,<br><br>I need some help. After some time digging through the Blender code I think I know how things&nbsp; 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.<br><br>Here are the topics I need to know better.<br><br><span id="yiv4509665682yui_3_13_0_ym1_7_1394760546877_22" style="font-weight:bold;">Blender's SDK</span><br><br>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.<br><br><span id="yiv4509665682yui_3_13_0_ym1_7_1394760546877_30" style="font-weight:bold;">Internal features used outside Blender's blob</span><br><br>Cycles make use of lots of internal types and some times it uses its own with similar purpose. Concepts like <span id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_5744" style="font-style:italic;">Scene</span>, <span id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_5745" style="font-style:italic;">Camera</span>, <span id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_5746" style="font-style:italic;">Mesh</span> 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.<br><br><span id="yiv4509665682yui_3_13_0_ym1_7_1394760546877_33" style="font-weight:bold;">How to deal with Python initialization vs C++ plug-in initialization</span><br><br>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.<br><br><span id="yiv4509665682yui_3_13_0_ym1_7_1394760546877_27" style="font-weight:bold;">Events</span><br><br></font>


        
        
        
        <style type="text/css">#yiv4509665682 P {margin-bottom:0.21cm;}#yiv4509665682 P.yiv4509665682western {font-family:"Open Sans", sans-serif;}#yiv4509665682 P.yiv4509665682cjk {}#yiv4509665682 P.yiv4509665682ctl {}</style>


<div id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_7619" class="yiv4509665682western" style="margin-bottom:0cm;"><font size="4"><span id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_7618" style="font-style:normal;">We
need a way to expose internal events to the outside so the plug-in
can connect and consume event signals. </span><span id="yiv4509665682yui_3_13_0_ym1_1_1394760546877_7621" style="font-style:normal;">The
same way we need to be able to fire events inside the plug-in into
Blender </span><span id="yiv4509665682yui_3_13_0_ym1_7_1394760546877_54" style="font-style:normal;">for any target
consumer.</span></font></div>

<font size="4"><br><br></font>


        
        
        
        <style type="text/css">#yiv4509665682 P {margin-bottom:0.21cm;}#yiv4509665682 P.yiv4509665682western {font-family:"Open Sans", sans-serif;}#yiv4509665682 P.yiv4509665682cjk {}#yiv4509665682 P.yiv4509665682ctl {}</style><font size="4">


        
        
        
        </font><style type="text/css">P { margin-bottom: 0.21cm; }P.western { font-family: "Open Sans",sans-serif; }P.cjk {  }P.ctl {  }</style>


<div class="western" style="margin-bottom: 0cm" lang="zxx"><span style="font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;"><span><font size="4"><span lang="en-US"><span style="font-style: normal">I
</span></span><span lang="en-US"><span style="font-style: normal">do
realize I'm kind of purist here with all this </span></span><span style="font-style: normal">engineering
</span><span style="font-style: normal">way of thinking but, I can't
help myself</span><span lang="en-US"><span style="font-style: normal">.
If you can think some simple/better way to tackle this problem please
let me know your thoughts. </span></span><span lang="en-US"><span style="font-style: normal">I</span></span><span lang="en-US"><span style="font-style: normal">f
all this make sense I can starting coding more seriously...</span></span></font></span></span></div>
<div class="western" style="margin-bottom: 0cm"><span style="font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;"><font size="4"><br></font></span>
</div>
<div class="western" style="margin-bottom: 0cm"><span style="font-family: HelveticaNeue,Helvetica Neue,Helvetica,Arial,Lucida Grande,sans-serif;"><font size="4"><span style="font-style: normal">I
think that is it for now. Please mentor me so I can continue with
this project.</span></font></span></div>

<font size="4"><br>Thanks for your time.<br>Paulo Perbone</font></div></div></div></div></body></html>