Previous Thread  Next Thread

chat icon Lua and Blender = BLU

jesterKing

Posted: Mon Sep 19, 2005 9:29 am
Joined: 18 Oct 2002
Posts: 1851
The "scriptkiddies" among us may be happy to learn about BLU, an attempt to bring Lua scripting into Blender. Real scripting, like with Python is not yet possible, as there is no way yet to use Texts as Lua scripts, or load lua scripts from the UI, but there are already some modules implemented (partly), and test.lua (in the same dir as the blender executable, for now) uses that functionality.

I use BPy as a guide to BLU (kudos to the BPy team!), so it shouldn't be to difficult to take up Lua scripting when it is in a usable state (some undetermined moment in the future)

Anyway, I thought you'd like to know.

/Nathan
_________________
Planet Blender | BlenderStorm | #blender.fi | Letwory Interactive
Reply with quote


ideasman

Posted: Sat Sep 24, 2005 9:15 am
Joined: 25 Feb 2003
Posts: 998
Hi, From using Gimp Its interesting to see how different scripting Languales can CoExist in the same application.

- Gimp has a C API thats wrapped by many different languages and I *think* much of the work is autogenerated.

If a new language is added into Blender it seems like we should be carefull and think about how it will co-exist with python.

Somthing that could be added into Blender is a Macro language that just hooks around existing UI functions, theres HEAPS of functions Blender/Python cant do that would be simple with a macro wrapper.
- Mabe rendered UI elements could be registered with LUA and lua could accsess them by the events system.

If somthing could be largely autogeneraged then its going to be heaps less work to maintain. - BPython alredy suffers from lack of development and much of whats needed is simply hack work, so it would be bad to have another API for LUA that is not that well maintained.

Im just not sure how usefull having an API that replicates python is. Python versioning is an issue but IMHO not a good enough resion to add another language alone.

- Cam
Reply with quote


stiv

Posted: Sat Sep 24, 2005 3:10 pm
Joined: 05 Aug 2003
Posts: 3645
Personally, I think this is cool, but then I have a fascination with languages both computer and human. This is an experimental project so it is a little early to be trembing in fear about its long term effects.

Autogenerating scripting interface wrappers from Blender's C API is a totally genius idea. The one fatal drawback is that Blender has no C API to wrap.

The first phase of the bpy project was provide access to Blender's database. The second phase is to provide access to functionality available thru the GUI - to Blender's commands, if you will. The new SpaceHandlers are one step along the way.

Note that as Blender becomes more 'wrappable' thru changes needed for Bpy, it becomes easier to add wrappers and interfaces for other languages like LUA. Perl, Python and Scheme co-exist in GIMP; no reason why they can not do so in Blender.

I have read interesting things about Lua and look forward to playing with it. Let the Babel begin!
Reply with quote


jesterKing

Posted: Tue Sep 27, 2005 11:33 am
Joined: 18 Oct 2002
Posts: 1851
ideasman wrote:
If a new language is added into Blender it seems like we should be carefull and think about how it will co-exist with python.


This is one of the questions I posed on the BLU page.

ideasman wrote:

Somthing that could be added into Blender is a Macro language that just hooks around existing UI functions, theres HEAPS of functions Blender/Python cant do that would be simple with a macro wrapper.
- Mabe rendered UI elements could be registered with LUA and lua could accsess them by the events system.


That indeed would be interesting to investigate.

ideasman wrote:

Im just not sure how usefull having an API that replicates python is. Python versioning is an issue but IMHO not a good enough resion to add another language alone.


It is not the only reason, and I'm well aware that I'll probably using it alone (perhaps stivs too) for quite a while.

There are several more reasons either implicitly on the page, or not mentioned at all. Some reasons are personal, like "because I can", but I want also to investigate some processes in doing projects.

I've been looking for requirement software that could be used in OSS development. I've found now DRES (http://dres.sourceforge.net), which looks like a good candidate to start with. I'm interested to see how such a tool could help during the development and during testing. As a nice extra it could give some valuable documentation for old and new developers.

So apart from trying to interface with Lua there's some extra things I'm considering during this project (yes, I know, I could've also just picked up DbBlender and such, but I've put that a little later for possible integration with BLU).

Now you can see I tried starting a Use Case document, but doing it this way is not optimal - hence the search for tools that can assist. From there to requirement specification etc.

stivs wrote:
no reason why they can not do so in Blender.

exactly Wink

stivs wrote:
I have read interesting things about Lua and look forward to playing with it. Let the Babel begin!

rockrock.

/Nathan
_________________
Planet Blender | BlenderStorm | #blender.fi | Letwory Interactive
Reply with quote


greatwolf

Posted: Wed Jan 02, 2013 3:20 pm
Joined: 04 Dec 2012
Posts: 3
So I'm wondering whatever happened to this project? I'm very interested in seeing Lua scripting support in blender.
Reply with quote


stiv

Posted: Wed Jan 02, 2013 4:48 pm
Joined: 05 Aug 2003
Posts: 3645
Quote:
So I'm wondering whatever happened to this project?


Not a whole lot. An interesting experiment, but given the original implementation of blender python, it would have been a huge amount of manual work.

With the new python implementation using Blender's DNA/RNA, a lot of the work of creating bindings can be automated. But you still have to write a whole lot of code to interface with Blender's internals.
Reply with quote


dertom

Posted: Wed Jan 16, 2013 11:07 pm
Joined: 28 Sep 2009
Posts: 3
At least they just added lua-highlighting!

@devs: Thx, a lot for that!
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group