Why not to make new programming in Blender ?

maybe use Lupa : https://pypi.python.org/pypi/lupa
to combine lua into python :rolleyes:

It’s definitely not an either/or situation. Most other 3D packages include multiple scripting and add-on creation APIs. Python, Lua, C/C++, and even some obscure ones like Boo can be found across the field, as well as some proprietary ones like MEL and MAXScript. They can all live side by side provided they’re maintained. IIRC some packages create their API bindings automatically. It would be very cool to see Blender embrace something like that for 2.8 to allow greater freedom to developers for things like custom modifiers. I know at least 4 C/C++ developers who have interest in creating custom modifiers for Blender, but turn away as soon as they take a look at Blender’s source (especially those interested in extending particle and hair systems).

If you are talking about custom modifiers created in scripting languages, those need to be implemented in faster languages than Python or Lua. If you consider current modifiers where you e.g. modify all vertices of a mesh, I don’t think it is realistic to expect decent performance with Python or Lua. Just to make it clear, I tried to implement something like that in Python previously and wasn’t even able to get close to acceptable performance.

Edit: If you want this kind of freedom, something like .net would be an obvious solution. If done right, it would even be possible use features implemented in one language in another one. E.g. if someone implemented some fancy features in IronPython (.net variant of Python), someone who uses a Lua variant for .net, could make use of the functionality implemented in IronPython.
However, it would be a huge amount of work and very likely not worth the effort.

Oh yeah, I’m not implying that anyone should want to write modifiers in a scripting language. I was saying it would be really nice to have a system that could automate the generation of new bindings for additional languages. Being able to create fast, threaded C/C++ scripts and modifiers without having to touch some of Blenders (regrettably) ugly source code would be a really nice feature.

Blender can generate bindings to other languages, and in fact already does so - Cycles syncs with the rest of Blender through automatically generated C++ bindings.
Afaik it’s not really practical to actually use them as an external developer, but the option is definitely there - internally, it works through the RNA system, which means that the C++ API has pretty much the same features as the Python one. I guess it would be possible to generate bindings for other languages as well, but I don’t really know that code area too well…

Right, as noted in this mail, https://lists.blender.org/pipermail/bf-committers/2009-February/022669.html

We can have data-api (RNA) bindings for another language. An initial working version can be done fairly easily,
The issue is more long-term maintenance and support for each run-time.

Seems to me if someone - a coder - has the time and inclination there is a way or ways to incorporate another language.
However there are practical issues that arise like - actually doing/completing it, the maintenance, fragmentation, documentation, user support etc.
There does need to be a real motivator however i.e. a distinct reason to pursue something - a wider benefit - and not just a coder having a mind wank about their pet language or turning up their nose at Python.
Because Blender is open I guess anyone can make what they want anyway but it might be better to nominate an official position and hence much of this sort of discussion could shift elsewhere like developers mailing list / meeting (?).
Perhaps this is an area where Ton as chairman imposes some discipline for the sake of simplicity and effectiveness.
If it can be established that there are a decent number of people interested enough to participate and own the project on an on going basis then something could proceed. I wouldn’t like to see say 4 languages started on the whim of a few individual coders only to find no one else is really interested after 3 months. Again there has to be a clear and significant gain from the language and it has to be popular/comprehensible to users/artists as well as coders. Perhaps Lua (mainly intended to assist Blender game developers in this instance as I understand??) is it, perhaps not. People who are interested in other languages need to identify the how, who ,why etc. and so quantify/qualify the proposal IMO. Perhaps it starts with a survey of interest… perhaps identify too which language is most likely to attract outside interest as well i.e. currently non Blender users who might find this useful in the adoption of Blender in their pipeline

As far as I can see… while there are people who prefer alternatives to Python, there aren’t many (any?) active developers who are interested to work on this.

While this thread is about scripting languages, one of the things we miss is the ability to dynamically define compositor-nodes, modifiers, textures - areas where scripting isn’t well suited to anyway.
So all this extra energy to add a new scripting language, which has roughly the same limits as Python, seems not all that worthwhile,
especially since Python its self has gained a lot of adoption and become very popular in areas that overlap with Blender (vfx studio pipelines, scientific computing, education… to some extent the web, robotics, even embedded computing with micropython).

Speaking about compositor nodes. It’s my impression that these image processing functions are duplicated across Blender, for example in texture nodes. It would be more sensible to have one image processing library and then apply it to different areas. Python API would also not be a bad idea. The ability to chain image processing using a script can be very useful in various situations. Take a look at Substance Designer. Blender has nodes, Blender has the image processing functionality, Blender does not have the ability to combine the two through scripting.

Little bit of [perhaps pedantic] inaccuracy here. Blender’s nodes themselves don’t do any processing at all. It’s best to think of them as a series of instructions that describes the processing you want to occur. Then that node graph is ingested by whatever backend (image processor, renderer, mesh generator, etc.) is applicable. You can do Python nodes, but again, no processing happens there. Python is just the mechanism by which the nodes are defined and drawn. The processing happens elsewhere.

Possibly @threedslider has enough replies to form an answer as to why another language other than Python seems unlikely.
If he is especially interested in using Lua in relation to a game he has in development then he best get around it presently on a one-off-as-needed-basis with Lupa or such. If he wants to see Lua incorporated into Blender I suppose it would be up to him to establish the effort is viable and also to find the participants and organise it.

I already said this under certain condition Lua is better than Python in terms speed, lightweight, multi-threaded, etc … very handy for games. It is rather a proposal and nothing official so Blender does not have prohibited as several scripting languages (someone agree to it). If I was developer I would like happy to make it but from now i am not to time being. Thus having more choice is good for us and meanwhile it attracts developers from Lua too, they can share their knowledge in same way for Python user.

Edit : I could very well say so why not C # programming for that matter such as being compatible with Unity for games, that’s also a good idea? But that’s a lot stuff.

The code is usually very specific for Blender and as such in most cases not compatible with other environments that support identical languages. Even if Blender would support C#, it would usually not be that useful for Unity.

Yes you are right but maybe in the future there will be better integration as “Visual Studio C # Integration” While this is not 100% integrated, it is a beautiful example of communicating with unity. Like that the developers unity for their work if possible they can make an API or other thing to interface between many software.

So your primary interest is in the API for the BGE. Most of the discussion here has been about the general usecase for Python throughout all of Blender. And it’s worth noting that if you’re using an external game engine (that is, anything other than the BGE), then the scripting language used in Blender is almost completely irrelevant. Even with Lua, C#, or Javascript bindings, those scripts would only work in Blender; they’d be pretty useless in another game engine’s API.

While developer tools is important. Its quite an active area - this would be basing a long term decisions on some tools that happen to work nicely now (on only one of our three supported platforms).

Yes speaking the game engine in the other is a little off topic I should not say this because I was talking about integration but I’m more interested in about scripting in the blender and extend over possibility . Sorry

This is just an interface between an application to an IDE, like Unity to Visual Studio. If Blender had something like that to Visual Studio, it wouldn’t make Blender and Unity compatible as you mentioned it in your previous post.

There are also cross platform IDEs that can be tightly integrated, like MonoDevelop or Visual Studio Code. Both are open source and I am especially impressed by Visual Studio Code. It is very actively developed and is very nicely extensible. But discussing the pros and cons doesn’t really make sense, because I haven’t seen any signs that there is interest from you or other developers to integrate some kind of .net framework into Blender.

Yes, there is always the potential to integrate tools (for any language/runtime).
@threedslider was just referring to a spesific combination as being some reason to use mono (I assume, since this is what unity3d uses).

Python is king. Max, Maya and Nuke are using it, I see zero need to change. Also, please keep the .NET piece of crap as far away from Blender as possible. The entire 3ds Max is littered with it and it’s gross. What a horrible platform.

Yes, it’s very high-level and super easy to code in, however, in practice, it’s slow as shit and while it’s awesome for developers, the end users are taking a hit.

I know nothing about Lua, but I do know that Python is everywhere and the majority of Blender users and developers alike would prefer to keep it that way. Python was chosen for a reason.