My first script :-) freehand tool options presets

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

My first script :-) freehand tool options presets

Post by capricorn33 »

Hey everybody.

I just started looking into LUA a little here. I have been doing some programming before (VB, VBA, Delphi...) so it wasn't too hard to get started. :-)


http://dl.dropbox.com/u/19247240/hl_freehand.lua

This is a MOD of LM:s original freehand tool 6.0
(Only used and tested by me on AS 6.2.)

In the Freehand options dialog there are now some extra buttons for fast choosing of presets. Handy if you have a few favorite settings that you want to be able to switch between, fast and easy.

The preset values are hardcoded inside the tool script itself, but they are easy enough to edit to your own liking... I put some helping texts inside the script too, so that you can find where to put in your own values and button texts...

I guess it shouldn't be too hard to write a script where you can set the values for the different option buttons directly from inside AS, writing the data to the settings preferences file... but, well, this works good enough for me. :)

(oh and I also changed that strong red preview stroke color to a simpler dark grey... that red color always jumps into my eyes...)


Comments?
capricorn ( - just call me "cap")
children's tv pro, character animator
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Image
Hey Cap, I thought this was pretty darn good, you didn't post an icon so I thought I'd make one and share.
If I had any criticism it would be that corner peaking doesn't seem to work.
Could you make any adjustment to implement that?
User avatar
capricorn33
Posts: 249
Joined: Sun Oct 02, 2005 9:49 am
Location: Finland
Contact:

Post by capricorn33 »

Heeey, nice icon.

Now I feel obligated to actually develop this one into something more than just an initial scripting experiment from a LUA newbie. :D

Actually I did have an idea for an alternative "peak sensing" algorithm the other day... I saw that there was discussion and development on this thing in another thread on the forum, I thought I maybe would try another route solving it.

...so, yes, Chucky, I will try and develop this embryo of a tool into something more useful, in time. With some smart corner peaking, I hope.
First I only need to learn the lua syntax and AS scripting interface a little better...

cheers
capricorn ( - just call me "cap")
children's tv pro, character animator
chucky
Posts: 4650
Joined: Sun Jan 28, 2007 4:24 am

Post by chucky »

Yaaay, and hats off for learning any scripting language, it's all beyond me.
Your alternative peak sensing is intriguing and the fact that you even know what an algorithm is, well... a bit freaky. :shock:
Post Reply