Lua scripting since which version?

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
staigerman
Posts: 18
Joined: Sat May 06, 2006 2:43 am
Location: San Diego, California
Contact:

Lua scripting since which version?

Post by staigerman »

Hi Lua-mohoer's, I am gathering info regarding LUA and the use of it across various applications. I am interested in knowing if LUA scripting is in Moho 5.3 too or only recent AnimeStudio 6, and the Debut or only Pro edition?

We use LUA scripting like in the GIMP and other imaging tools to make special FX filters, not for general script automation. Our subset is called gluas, not sure what it stands for but probably Gimp LUA Scripting or Graphics LUA subset or somthing alike.

If you're interested or know other apps that use LUA scripting like DOgwaffle, Gimp, Pixarra Twistedbrush and Artweaver, please let us know or check the 'others' at http://www.thebest3d.com/dogwaffle/lua

or post your other apps here for me to add. Thanks!

-Philip
beyond digital painting
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

staigerman wrote: Hi Lua-mohoer's, I am gathering info regarding LUA and the use of it across various applications. I am interested in knowing if LUA scripting is in Moho 5.3 too or only recent AnimeStudio 6, and the Debut or only Pro edition?
As far as I know, the first version to come with LUA and use it for tools and menu scripts was Moho 5 back in 2004. Since Anime Studio's tools are still implemented in LUA, both Standard/Debut and Pro versions fully support it, but only the Pro version supports and comes with menu scripts.
staigerman
Posts: 18
Joined: Sat May 06, 2006 2:43 am
Location: San Diego, California
Contact:

Post by staigerman »

Rudiger wrote:
staigerman wrote: Hi Lua-mohoer's, I am gathering info regarding LUA and the use of it across various applications. I am interested in knowing if LUA scripting is in Moho 5.3 too or only recent AnimeStudio 6, and the Debut or only Pro edition?
As far as I know, the first version to come with LUA and use it for tools and menu scripts was Moho 5 back in 2004. Since Anime Studio's tools are still implemented in LUA, both Standard/Debut and Pro versions fully support it, but only the Pro version supports and comes with menu scripts.
Nice, thanks so much forb the input. One more question then: do you know if there are pre-defined variables or other ways in the context of Lua scripting inside MoHo-5/A.S. to address the viewable image? In GIMP/Dogwaffle/Artweaver/Twistedbrush (GDAT), the LUA subset offers a few (half a dozen?) of functions to get or set a pixel's RGB or other values. And built-in variables 'width' and 'height' representing the image dimensions. So, it's focused on allowing you, the LUA programmer, to make special FX filters or anything you can imaging doing through reaching the pixels in your image..... does M5/A.S. have that ability in the same (or other) way? I'm trying to see if there's a way to easily re-use code of some special effects done in G/D/A/T for use in M5/A.S. We have a collection of a bunch of LUA (gluas) scripts at www.dogwaffle.info/dogwaffle/lua that could be useful. Similar ones at Artweaver.de and other places. Some will use extensions (like the GUI server or T.B.'s variables from their interface extensions) but some of the code might easily be repurposed even then.

-Philip


-Philip
Genete
Posts: 3483
Joined: Tue Oct 17, 2006 3:27 pm
Location: España / Spain

Post by Genete »

to make special FX filters or anything you can imaging doing through reaching the pixels in your image..... does M5/A.S. have that ability in the same (or other) way?
AFAIK there is not script interface for rendered image access. You can only interact with the image once it is rendered (using external applications) and the renderer is not available in scripting interface.
-G
Last edited by Genete on Mon Sep 28, 2009 8:25 pm, edited 1 time in total.
Rudiger
Posts: 786
Joined: Sun Dec 18, 2005 2:25 am

Post by Rudiger »

Being able to write custom effects using Lua script has long been a request of mine. Doubly so, now you are telling that there are libraries of effects already out there that we could adapt. Mike must already have a library of image filtering functions that the standard effects call internally, so I don't think it would be a huge stretch to make these functions accessible from a LUA script. If the effect script also had access to the frame number you could do some nuts animated effects as well.
staigerman
Posts: 18
Joined: Sat May 06, 2006 2:43 am
Location: San Diego, California
Contact:

Post by staigerman »

Rudiger wrote:Being able to write custom effects using Lua script has long been a request of mine. Doubly so, now you are telling that there are libraries of effects already out there that we could adapt. Mike must already have a library of image filtering functions that the standard effects call internally, so I don't think it would be a huge stretch to make these functions accessible from a LUA script. If the effect script also had access to the frame number you could do some nuts animated effects as well.
Indeed, we do that in Project Dogwaffle Pro. (not surprisingly, when Moho was known as Moho (before A.S.), they had a link back to Dogwaffle as a cool and fitting raster imaging/animation tool.

Some of the Lua scripts we have can be applied over an image seuqnce from the current animation in PD Pro. Lua doesn't really 'know' of the existence of the frames, it just gets invoked once per frame, progressively.

Well, at least off the top of my head that's what comes to mind.

What we do is based on gluas, plugin made for the GIMP, so chances are that it's open source.

Boris at ArtWeaver has implemented it too, with a few extensions, and with the addition of our opensource Guiserver.

Ken at Pixarra (Twistedbrush) also has added Lua/gluas, and its own extensions.

The minimal thing would be to get access to the rendered image's pixels through the same functions, as listed in www.thebest3d.com/dogwaffle/lua

And a pre-defined built-in variable 'width' and 'height' to point to its dimensions in pixels. If these variables were already used for other stuff it would be easy enough to use variations, to allow changing just a line or two of code to reassign the variables.

Or to write the code in a way that makes it more portable.

It sure would be sh-weeet to have a way to use similar tools across various apps through a common scripting interface.
Post Reply