Interested in the history of Blender's relationship with Python...

This isn’t a cry for help on how to program blender with python, but instead I’m very interested in the background history of the two. I honestly could not find the answers I was looking for, despite a thorough search, so I thought I would ask here. I suppose it would make for an interesting discussion if nothing else…

I remember about…five years ago Blender having Python as its primary scripting language, which I don’t believe any other package had at the time. When did Blender receive Python support, and was it the first 3D package to have it?

Another thing that caught my attention was the number of people over on GameDev.net showing a lot of interest in not only Python but in Blender as well. It makes me wonder, with the rise in the number of very small development teams for the iPad and Android platforms, if Blender works well with Python - perhaps more so than other 3D packages, due to Python being its primary(only?) scripting language?

I was going to learn Maya, as it has Mel, Python and C++ support, but Blender seems to be well integrated with Python. Max is obviously the tool of choice with major games companies, but that once again seems to be trying to replace its ageing MaxScript language, and I get the feeling that Python support is just bolted on as a “me too”.

From my point of view, I can see Blender becoming a standard in the games scene and industry, but I would like to know the thoughts of others before letting my mind run away with the fairies, so to speak. I’ve been away from the 3D scene since 2009 to finish a Computing degree so any guidance here would be welcome.

Blender also has C++ support but the only one that uses it (to the best of my knowledge) is cycles.

One of these days I’ll get around to finishing up my blender->renderman external renderer addon that also uses the C++ api but I always seem to get distracted by some flashy new thing every time I start working on it…

As to the history of python in blender, dunno? It had it before my time and got a complete rewrite during the 2.5x series, some api breaking improvements during 2.6x and is (mostly) complete/stable now. I say ‘mostly’ because there are still a few missing bits here and there and small changes break scripts on nearly every release.

I can only answer a very few things, but maybe it’s however relevent:

Blender works quite well with python, it wouldn’t actually work without since half of the interface is done with python scripts. So the connection between C/C++ and Python is really tight. Nonetheless, there are limitations, like python scripts being executed blocking (Blender waits until py script finishes). Threading can be used, but may crash Blender (likely). A general python drawback to mention is the GIL (global interpreter lock), which means that your code will run on a single virtual core only unless multiprocessing module is used (on my core i5 cpu, blender python never uses more than 25% of my processor power).

Python is a great language IMO, quite different from other languages in its syntax, logic etc., but very nice to look at and type. It’s pretty popular nowadays and freely available with diverse implementations for various platforms.

Python is Blender’s only scripting language, there was a plugin system in earlier versions, but there is none in current series. That means, if you can’t get something done with Python, then you need to write something that can be compiled into the blender binary (not limited to C/C++ actually). Modifiers are also hardcoded, although it would be nice if we could do simple ones with python or at least as DLLs or something that doesn’t require a custom build.

I see. So what about python in other packages like Max or Maya? How well do they work with Python?

Oh, thanks for replying so soon! :slight_smile: