Curvature tool with numerical display.

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
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Curvature tool with numerical display.

Post by 7feet »

AcouSvnt asked for it, and it's a handy thing, so here it is. I added a numerical display to the tool to let you know exactly what the curvature is on any point. Even if you have multiple points selected, you can find the curvature of any particular point by clicking near it. Also, you can modify the curvature by entering the value in the number box. This works for single and multiple points. While dragging will still progressively add or subtract curvature from each selected point, entering a number will set all selected points to the same curvature.

There were a few other things I did. First, I upped the maximum amount of curvature that you could give a point while dragging. It was set to .667, but I kicked it up to 3.0. If you go really high with the number, curves will start curling around themselves and doing all sorts of strange things, but it might be handy for some special purposes. When you enter a number, you can make it any ol' thing you want, and things can get really wierd. Your choice. For that matter, you can enter negative curvature values if you felt like it, but that goes south immediately and I won't guarantee that it won't crash Moho, or make you're file unreadable, or any other sort of evil.

Also, <ALT> clicking will deselect all points if you had multiple points selected. <CTRL> click will select all points on the layer. The point group dropdown works as usual.

I made up 2 files. The first:
SF_Curvature.zip
is to use as a separate tool.

the second:
lm_curvature.lua
is for using as a straight replacement for the default Curvature tool script. It seems just as stable as you'd like, but I'd still make a backup of the original.

--Brian
User avatar
AcouSvnt
Posts: 190
Joined: Wed Aug 04, 2004 4:14 am
Location: Rochester, NY
Contact:

Post by AcouSvnt »

Man, you rock! Thanks!
-Keith
User avatar
sherlock
Posts: 48
Joined: Fri Nov 05, 2004 1:31 am
Contact:

Post by sherlock »

Thanks a million, Brian.
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

:shock: ...HEY! I NEVER said you THANK YOU for this?? :? I can't belive it...
User avatar
Rasheed
Posts: 2008
Joined: Tue May 17, 2005 8:30 am
Location: The Netherlands

Post by Rasheed »

Yes, thanks a million.

It isn't like the usual handles as in most "draw" programs, but at least you now have a more exact measure what you are doing, even if you only use the numerical input as a visual cue. I think I understand why LM hasn't incorporated visible handles in the program, but this is the next best thing.

Including scripts in Moho is probably one of the best choices LM has ever made. I hope that some of the scripts will be included in the next release of Moho, so new users don't have to search the script forum or encounter seemingly limitations that were already lifted by these nifty scripts.
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

I agree with you Rasheed. And I've already given LM my permission to use anything I've done in anyway he sees fit, including putting any of my scripts in the distribution. Maybe I should send him an actual letter to that effect. I'd actually really like some of these neat things being there out of the box. As more people start writing scripts, there's more and more ridiculously useful scripts around.

And I'm sorta surprised some of y'all never noticed this one. I put it up over a year ago, fer cryin' out loud ;)
User avatar
bupaje
Posts: 1175
Joined: Fri Nov 12, 2004 5:44 pm
Location: California
Contact:

Post by bupaje »

Thanks Brian. It works great.
[url=http://burtabreu.animationblogspot.com:2gityfdw]My AnimationBlogSpot[/url:2gityfdw]
User avatar
Rai López
Posts: 2243
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

HEY! I use it since the first day and all the days :)
Post Reply