interesting compiler

i just saw this interesting python to c++ compiler at:

i wonder if in the future it could develop into something that we could use with blender.

I’ve already talked with the author, basically you need to do a wrapper around each native function that you plan to use (ie for each function in NMesh, etc.)

I plan to email the python list our discussion later,


This could actually be a really good thing!! Other visualisation packages
such as VTK (Visualisation Tool Kit) has had scripting language support
for a very long time. Essentially, they use tools such as SWIG to
automatically generate the interfaces between C/C++ code and scripting
languages such as Python, TCL, and Java. All you have to do is provide a
very simply interface file that maps the C/C++ function/classes to
python/TCL/Java function/classes, and the compiler will do the rest.

The result is that you pretty much get all the scripting facilities for free,
and whatever change you make in the C/C++ code will be automatically
reflected in the scripting language.

I wish blender developers would do the same.

excuse me for being naive : does this mean a possibility to compile crossplatform blender scripted plugins - like you can compile crossplatform coffee plugins in cinema4d (from within the app)?

that would be cool …

Right, but that is not the signifigant advantage…
The compilation of the ascii to byte code is handled by python at runtime. D’ja ever notice that there is a new file in your directory after you run your .py called .pyc. That’s the compiled bytecode.

I use Pyrex (in place of SWIG) to generate C code, for robotics and that is generally what I use as well to make modules to call in my personal Blender build as well. If you like to keep things C++ i.e for a Visual Studio build this will be nice, but it’s not all there yet… You will have a lot of typing to extend things unique to Blender.

Does anyone else here Build Windows Blender with GCC CYGWin?

afaik bellorum makes cygwin builds.