Converting Python Scripts to C/C++ code

Hi all,

Was wondering if it might be time to convert some Python scripts into equivalent C/C++ code, to increase performance of certain tasks. Was just watching a Youtube video about why Blender isn’t very popular professionally, and speed when dealing with big and complex meshes was one thing. Thanks for your time,

-David

1 Like

Addons are written in python, some addons use it only to bridge between blender and some other application, blender itself is written in C and C++.

Also python (mostly interpreted) and C (compiled) are so different it depends on the algorithm and data used…

When compiled even python can be faster see second algorithm knucleotide :

And: people on youtube people earn there money with making videos how bad something is, why they switches something, how one sinple thing changed all their live, why something is obsolete or why some crash will come and the end is near.

And aliens. :wink:

And another one: on polycount.com/forum you can find lots of questions regarding problems of other professional applicatiosn too.

You may have to elaborate this to get a more suited answer.

2 Likes

Most Python scripts bundled with Blender, are mainly interfaces between UI/UX and internal C/C++ functions. And from time to time, some function that is written in Python gets converted to C/C++ (as for example the node search functions in later version of Blender).
Also, Addons and stuff, normally use libraries that are also written in C/C++ (i.e. numpy, molecular, etc).

In terms of Blender not being ‘very popular professionally’… I don’t believe that has anything to do with Python scripts vs C/C++… Blender is an open source project, and any big studio that needs something heavier, can just download the source code, add more stuff to it and compile (and this has happened and it still happens).

:rofl:

1 Like