GSoC 2019 Interoperability


I would like to rewrite STL and PLY import/export in C. I have some of questions!

  1. As I understand, blender build system does not support python c modules yet (, right?
  2. It seems like the gui is already fast, so gui setup should not be rewritten in C. Is that correct?
  3. Should python c modules be structured in a way that cpython does it? For example, there is a module “io_mesh_stl”. I will move all expensive io operations into “_io_mesh_stl” and import that in “io_mesh_stl”. Is that ok?
  4. I am still trying to understand cmake sorcery that is happening here (D2835). I am not sure where would the shared objects end up. It does not seem like there are any add-ons written in something other than python, so I assume that was not an issue before.
  5. Do you have tests for add-ons? Do I have to write tests for python c modules?
  6. Have you thought about compiling python modules with cython (

Thank you!

1 Like

That’s correct. The page links to the patch because it could be used by the GSoC project.


That seems reasonable, but this kind of detail is something that would be decided with the mentor after the project is accepted.

I think the idea in that patch is to put the code for the C module next to the Python file, and it will then be installed alongside it as well.

There are some tests, see the tests/ directory or run make test. If there are no tests they should be added for the add-on that is being changed.

I’m sure it’s been considered, but direct access to the Blender C data structures and API is probably still most efficient and convenient in C code.