Tint LUA-Script

Hier können eigene Artweaver Materialien veröffentlicht und gedownloadet werden - Here you can publish custom Artweaver materials and download them.
peter
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Tint LUA-Script

Beitragvon peter » Fr Feb 09, 2007 11:19 pm

Hallo liebe Community,

ich hab noch ein weiteres kleines LUA-Skript (natürlich inklusive graphischer Oberfläche) für euch, viel Spaß damit :)

Bild

Funktion: Färbt das Bild auf der aktuelle Ebene in einer Farbe eurer Wahl ein. Die Stärke des Effekts könnt ihr mit einem Regler einstellen. Am Besten eignen sich helle Farben, sonst wird das Ergebnis schnell zu dunkel. Kleiner Tip: Wenn ihr Weiß als Farbe auswählt, bekommt ihr eine Schwarzweiß-Version eures Bildes.

Installation: Erstmal muss natürlich das LUA-Scripting-Plugin von der Artweaver-Seite installiert sein. Dann könnt ihr die ZIP-Datei einfach in das Skripte-Verzeichnis von Artweaver (üblicherweise C:\Programme\Artweaver 0.4\Standard\Lua Scripts) entpacken, dann taucht es nach dem nächsten Start von Artweaver unter Filter>Lua Sample Scripts>Tint... auf. Wenn ihr schon eine frühere Version dieses Filters habt, könnt ihr die vorhandene Datei einfach ersetzen.

Bekannte Bugs: keine

Updates:
2007-02-17 Ich habe das Skript aktualisiert, das Problem mit den Geister-Menüeinträgen ist jetzt behoben (Danke an Boris Eyrich für den Tipp)

Ich wünsch euch auf jeden Fall viel Spaß damit und würde mich über Feedback hier im Forum sehr freuen.

Peter
Dateianhänge
Tint.zip
Tint Lua Script for Artweaver

UPDATE 1: Ghost menu items are now gone
(1.36 KiB) 988-mal heruntergeladen
Zuletzt geändert von peter am Sa Feb 17, 2007 1:18 pm, insgesamt 1-mal geändert.

hinket
Beiträge: 31
Registriert: Mi Okt 11, 2006 10:39 pm
Wohnort: Canada

Beitragvon hinket » So Feb 11, 2007 12:18 am

Hi Peter,
Thanks for sharing this.

This sounds interesting, but I can only make out a few words. Could you possibly post it in English, for us language-challenged?
Also to install a Lua script, does one have to also have Borland Delphi installed, or is that only for creating a script?

I would love to be able to make Image nozzles as well, but have at present no more room on my hard drive for installing Borland Delphi.
Would be wonderful if anyone creating nozzles would also share them here.
I would certainly appreciate it!
Hin

peter
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Beitragvon peter » So Feb 11, 2007 12:38 pm

Hi hinket,

sorry for only posting in german, here is roughly what I wrote:

I have just finished creating another LUA script (including a graphical user interface of course) for you to enjoy.

Here is how to use it: The filter tints the current layer (or a selection) in a color of your choice. You can adjust the strength of the effect using the "Amount"-slider. Bright colors usually work best, otherwise the resulting image may become too dark. Extra tidbit: If you select pure white as the tint color and drag the amount-slider all the way to the right, you get a black and white rendition of your original image.

Installation: First, you have to install the free LUA-Scripting-Plugin from the Artweaver website, if you have not done so yet. Then, all you have to do is extract the ZIP-Archive into the script directory in the Artweaver directory, usually C:\Program Files\Artweaver 0.4\Standard\Lua Scrips\. If that directory does not extist, chances are you have not installed the LUA-Plugin. If you already have an older version of the script, you may safely replace the existing file. The next time you launch Artweaver, the filter appears in Artweaver's Filter-Menu. Use Filter>Lua Sample Scripts>Tint... to apply it.

Known bugs: none

Updates:
2007-02-17: An updated version is available that fixes the problem with the ghost menu items (thanks to Boris Eyrich for pointing out the solution)

---

Pertaining to your question about Borland Delphi: The short anwer is:
For Lua scripts, all you need in order for them to run is the lua scripting plugin for Artweaver, which is a very small and free download. To create scrips, a simple text editor is enough. You do not need to have Borland Delphi in either case.

Long version: With Artweaver, there are two ways to create your own filter: One is to write a plugin in Borland Delphi using the Artweaver SDK, and the other one is to write a Lua script, which only requires the Lua scripting plugin from the Artweaver website. The advantage of a plugin is that it can access more of Artweaver's builtin features. Moreover, since it is compiled to machine code, it runs a lot faster compared to a script. Lua scripts, on the other hand, can be run in other application as well (Project Dogwaffle and GIMP with the GLUAS plugin), and they are much easier and faster to write.

You need to install Borland Delphi only if you want to create a plugin, it is not required if you want to run a plugin.

Getting started with Lua scripting in Artweaver:
In case you have no programming experience yet, or if have never used the Lua programming language before, you should have a look at the tutorials found on http://lua.org.

Scripting support in Artweaver is based on the GLUAS plugin for GIMP. The reference of all available functions for GLUAS (minus the graphical interface stuff which is not supported in GIMP) can be found here:
http://pippin.gimp.org/image_processing/appendix_gluas.html.
You can skip the complicated installation stuff at the beginning since it is only relevant for GIMP.

A good introduction with loads of examples can be found here:
http://pippin.gimp.org/image_processing/.

More examples can be found here:
http://www.thebest3d.com/dogwaffle/lua/samples.html

If you want to create graphical user interfaces for your filters, you should check out the GUI_Server reference and examples loacated here:
http://www.thebest3d.com/dogwaffle/guiserver/reference.html
http://www.thebest3d.com/dogwaffle/guiserver/index.html

I hope this helped clarify some things, I'm really looking forward to seeing what you come up with.

Peter
Zuletzt geändert von peter am Sa Feb 17, 2007 1:22 pm, insgesamt 1-mal geändert.

hinket
Beiträge: 31
Registriert: Mi Okt 11, 2006 10:39 pm
Wohnort: Canada

Beitragvon hinket » Di Feb 13, 2007 4:24 am

Thanks so much, Peter!
I've downloaded your Tint script, and look forward to trying it out. (That is, as soon as I install the Lua Plugin and install yours).

Thanks for all the links as well as the explanations and directions.
I appreciate it.

Know nothing about programming, so far, :) so will probably keep using CorelDraw and Photopaint to create my objects for the Image Sprayer in PhotoPaint ( and just take my Artweaver paintings into PP. for images if need be).
Hin

Benutzeravatar
Boris Eyrich
Site Admin
Beiträge: 1650
Registriert: Mo Nov 01, 2004 2:59 pm
Kontaktdaten:

Beitragvon Boris Eyrich » Sa Feb 17, 2007 8:39 am

Known bugs: At least on my computer, once the filter is installed, an additional empty group appears int the Filter menu with an empty item in it, which launches the filter just like the regular item. I have no idea why that is, I guess I am doing something wrong with the RegisterMenuItem Lua command…

Will be fixed with the next version. Because you have mentioned the function RegisterMenuItem() in your comments the Lua Plug-In thought this is a valid instruction and applied it (without any data).

Troken
Beiträge: 137
Registriert: Do Dez 28, 2006 9:55 am

Beitragvon Troken » Sa Feb 17, 2007 12:12 pm

Is there a collection where we can download all lua-filters?

peter
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Beitragvon peter » Sa Feb 17, 2007 1:47 pm

Thanks so much for the info, I have removed the mentions of RegisterMenuItem() from the comments and uploaded a new version.

@Troken: There is no such thing as a collection of Lua filter scripts. But you are definitely right, it would make a lot of sense to have a central registry of GLUAS scripts for people who just want to download new filters. Right now, however, there are not that many places where one can download scripts. Here is a list of all the resources I know of:

You can go to the original GLUAS website, the Project Dogwaffle Lua scripting pages (see my post above for the corresponding links), and the Artweaver website and forum here.

The only other resource I was able to find is http://abcdugimp.free.fr/Documentations/gluas/P_atmos_lunaire.htm, where you can find one single filter called "atmosphère lunaire". The links on the page are somewhat broken, so you should click "cancel" in the dialog asking you (in french) if you want to load the corresponding frameset, otherwise you won't be able to access the page.
The script is a small part of a very good french-language introduction to GLUAS scripting, especially for people without any programming experience. The complete tutorial is here: http://abcdugimp.free.fr/Documentations/gluas/P_gluas.htm.

If you add a line

Code: Alles auswählen

RegisterMenuItem("Lua Sample Scripts", "Atmosphère lunaire")
at the beginning of the script from that page, the filter will show up in Artweaver's Filter menu, not just the Lua Browser.

hinket
Beiträge: 31
Registriert: Mi Okt 11, 2006 10:39 pm
Wohnort: Canada

Beitragvon hinket » So Feb 18, 2007 1:48 am

Thank you, Peter.

Just replaced the Tint file in Artweaver.
Hin

staigerman
Beiträge: 14
Registriert: Mi Mai 17, 2006 6:36 pm
Kontaktdaten:

Beitragvon staigerman » Mi Feb 21, 2007 10:30 pm

Troken hat geschrieben:Is there a collection where we can download all lua-filters?



Here are many additional plugins:

http://www.thebest3d.com/dogwaffle/lua

They should work on Artweaver's Lua system too, since Boris did implement the Guiserver and I think other extensions too. Boris, any comments if there are things found in Dogwaffle's Lua system not supported in Artweaver's, and vice-versa?

staigerman
Beiträge: 14
Registriert: Mi Mai 17, 2006 6:36 pm
Kontaktdaten:

Re: Tint LUA-Script

Beitragvon staigerman » Mi Feb 21, 2007 10:33 pm

peter hat geschrieben:Hallo liebe Community,

ich hab noch ein weiteres kleines LUA-Skript (natürlich inklusive graphischer Oberfläche) für euch, viel Spaß damit :) ... (snip)


Peter, eine Frage: ist dies ein Screenshot von einem Mac?

Artweaver auf Mac? oder GIMP?

peter
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Beitragvon peter » Do Feb 22, 2007 4:56 pm

ist dies ein Screenshot von einem Mac?


Leider nicht, es handelt sich dabei nur um einen Skin für Windows XP, den gibt's unter http://www.flyakiteosx.com/ kostenlos zum Download.

Für eine Mac-Version von Artweaver müsste Borland (oder jemand mit viel Zeit) die Delphi-VCL nach MacOS portieren, und es sieht im Moment absolut nicht danach aus, als würde das in naher Zukunft geschehen.

Soviel ich weiß gibt es aber eine funktionierende Mac-Version von Lazarus (http://www.lazarus.freepascal.org/), aber wie praktikabel es ist, Artweaver damit zu portieren, und ob sich der Aufwand lohnt, das kann nur Boris entscheiden.

Man könnte allerdings mal versuchen, ob Artweaver mit Crossover Mac (http://www.codeweavers.com/products/cxmac/) kompatibel ist.

staigerman
Beiträge: 14
Registriert: Mi Mai 17, 2006 6:36 pm
Kontaktdaten:

Beitragvon staigerman » Do Feb 22, 2007 6:40 pm

peter hat geschrieben:
ist dies ein Screenshot von einem Mac?


Leider nicht, es handelt sich dabei nur um einen Skin für Windows XP, den gibt's unter http://www.flyakiteosx.com/ kostenlos zum Download.



Now that's funny! Faszinierend.


By-the-way, I'm encouraged that Project Dogwaffle was mentioned a little bit above, and I want to re-iterate that we're interested in feedback especially if there are problems running Lua scripts coming from PD and trying them on Artweaver, and vice-versa if you have a Lua script found or developed on Artweaver or GIMP and you find it to fail on Dogwaffle. Your feedback is crucial and very much appreciated, as we all have an interest in making sure that such scripts are cross-application compatible.

Unfortunately, the GIMP lua/gluas plugin doesn't support our Guiserver (yet :-), but there's always hope that with increasing demand this might move the developer there to make it so.

-Philip

peter
Beiträge: 15
Registriert: Do Feb 08, 2007 2:07 pm

Beitragvon peter » Sa Mär 10, 2007 11:25 am

I think there is one feature in GIMP-GLUAS that is at not supported (at least by Artweaver). I don't know about Project Dogwaffle, but chances are it is not there either since it is not in the official documentation.

There is a function called "print" which basically just displays a string you supply in a message box. I have no idea as to why it is not in the GLUAS reference manual. However, it was definitely there in the GLUAS C source code last time I chekced. I'd imagine it would be quite useful for debugging, diplaying error messages, or just adding an "About…" button to a setup dialog that displays a simple about box.

Anyway, I don't recall any of the available scripts ever using this function, but I may be wrong.

Currently what I think we need most is a GLUAS-compatible plugin for Adobe Photoshop, that would give us tons of new scripts, but alas, someone would have to write it…

Benutzeravatar
Boris Eyrich
Site Admin
Beiträge: 1650
Registriert: Mo Nov 01, 2004 2:59 pm
Kontaktdaten:

Beitragvon Boris Eyrich » Sa Mär 10, 2007 4:42 pm

There is a function called "print" which basically just displays a string you supply in a message box. I have no idea as to why it is not in the GLUAS reference manual. However, it was definitely there in the GLUAS C source code last time I chekced. I'd imagine it would be quite useful for debugging, diplaying error messages, or just adding an "About…" button to a setup dialog that displays a simple about box.

You're right this function is missing. I'll add it to the next release of the Lua Plug-In.

Edit:
The print function is already implemented but doesn't show a message dialog. Instead the message will be displayed in the status label under the editor. Anyway I'll change it to display a message dialog.


Zurück zu „Artweaver user materials“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 1 Gast