This is a huge pet peeve of mine. Nim and Python are very different languages! 
There is some similarity in the syntax, but that is where it ends. Nim is much 
closer to Ada or Pascal.... :-P

I looked into adding Nim support to Blender a long time ago. Here is what I 
found:

TLDR; It would be **extremely difficult**

It is a lot of work, and requires extensive knowledge of Nim, C++, and Blender, 
and you won't get a lot of help. It's definitely not a good beginner project.

1\. Blender embeds a full Python fork inside itself. They don't just use your 
system python. They have a custom python that has hooks all over the internal 
C++ code. (It was a big deal for them to migrate from Python 2 to Python3 for 
this reason)

2\. They don't have a published C++ api, and have **explicitly said** that they 
do not plan on publishing any documentation for their C++ api because it 
changes often and they like it that way. (They don't want to support backwards 
compatibility in their external C++ api)

3\. Related to point 2, the Blender programmer community is against adding 
other languages. Go look in their forums. Several people have asked for various 
languages (Lua for example). The answer is always, "it's open source, do what 
you want, but we will not support it in any way or accept any PR's for this"

I want to point out: I don't disagree with the Blender people. Blender is a 
very complicated piece of software, and they only have so much developer 
resources. They don't want to worry about having to maintain several language 
bindings. It's hard enough to maintain "Professional quality CG software".

The other side of the coin, it is technically possible. (Here be dragons.) 
There is a C++ api for Blender. People make C++ addons for Blender all the time.

You could make Nim bindings for the Blender C++ api. Nim is really good at 
binding to C code, but:

  * the api doesn't have good documentation
  * is not officially supported
  * may change with no notice



You will spend a lot of time figuring out how the Blender C++ api works, then 
getting Nim to talk to it, and then making sure it is kept up to date, and you 
probably won't get much help from the Blender people.

Reply via email to