Mod of freehand drawing tool

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
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 2:32 am
Location: kingston NY
Contact:

Mod of freehand drawing tool

Post by dueyftw »

How hard would it be to modified the free hand drawing tool to lay down two parallel lines, that become larger apart with pen pressure, and closed at both ends to form a shape?

Dale
User avatar
Víctor Paredes
Site Admin
Posts: 5826
Joined: Tue Jan 25, 2005 3:18 pm
Location: Barcelona/Chile
Contact:

Post by Víctor Paredes »

Rudiger's freehand tool makes that work
viewtopic.php?t=13737
(select the stroke-fill option)
Image Image Image Image Image Image
Moho co-owner

Previously Rigged animation supervisor: My father's dragon, Wolfwalkers & Star Wars Visions "Screecher's Reach"
My personal Youtube Channel
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 2:32 am
Location: kingston NY
Contact:

Post by dueyftw »

Ok I haven't modified As in a long time where do I put the files? The Draw file is not showing up in the drop down menu.
User avatar
neeters_guy
Posts: 1626
Joined: Mon Sep 14, 2009 11:33 am
Contact:

Post by neeters_guy »

Wow, this is a great script! Thanks Selgin and Rudiger for bringing this back to our attention.
sbtamu
Posts: 1915
Joined: Mon Dec 14, 2009 8:05 pm
Location: Texas
Contact:

Post by sbtamu »

dueyftw wrote:Ok I haven't modified As in a long time where do I put the files? The Draw file is not showing up in the drop down menu.
Did you restart AS?
Sorry for bad animation

http://www.youtube.com/user/sbtamu
User avatar
dueyftw
Posts: 2184
Joined: Thu Sep 14, 2006 2:32 am
Location: kingston NY
Contact:

Post by dueyftw »

I have 7.1 I placed the two files into the script folders. Draw and tool. Nothing happens.

Dale
User avatar
neeters_guy
Posts: 1626
Joined: Mon Sep 14, 2009 11:33 am
Contact:

Post by neeters_guy »

Works in 6.2, but I get lua errors in versions 5.6 and 7.1.
Rudiger
Posts: 786
Joined: Sat Dec 17, 2005 5:25 pm

Post by Rudiger »

neeters_guy wrote:Works in 6.2, but I get lua errors in versions 5.6 and 7.1.
I have put up the latest version of my modified freehand tool and updated the links in the original thread Minor tweak to ASP6's freehand tool.

I'm not sure why the previous version gave errors in AS 7.1, but I have tested this version and it works fine. The only thing is, the new way AS calculates curves can sometimes cause some unsightly loops in the expanded stroke, so it's probably a good idea to use legacy curves when using the stroke-fill option.

Also, you might notice a few new features since I last updated it.

Now, if you hold down the <Ctrl> key you can click out a polygon. To terminate the polygon just release the <Ctrl> key before the last click. If you want to terminate without adding another point, press <Ctrl>-c. If you want the polygon to have sharp corners, make sure the Sharp Corners checkbox is checked. This also turns on the sharp corners feature for freehand drawing that was introduced in AS 7.

Also, the width of the filled stroke is now controlled by a separate parameter instead of the style settings. This means you can draw filled strokes with an outline, which is kind of cool.

I'm still working on the feature to add and subtract strokes from previous shapes. The basic concept is there, but there's a bit of a bug infestation going on at the moment :).
Post Reply