more of a small feature implementation

(This forum has been closed. Please use the General Moho Discussion forum.)

Moderators: Víctor Paredes, slowtiger

Locked
twistedanimator
Posts: 3
Joined: Sun Sep 05, 2004 2:57 pm

more of a small feature implementation

Post by twistedanimator »

I know the shortcuts for selecting points and moving/translating them are close together on the keyboard, but I do find it quite frustrating sometimes when i`m tracing or drawing a character in moho to change to a selection tool when I was in the move tool to select the new points (or add more points to a selection) and then go back to the move tool to make my adjustments and then change tool to select and on and on.

What I would like to see is the translate tool to take on some functions from the selection tool. For example middle mouse button working as a select point tool (either MMB clicking on a point or rectangle box selection) and shift and middle mouse button toggle point selection instead of the middle mouse button doing the same as the left which would be translate points.

Now I know it may sound a bit lazy as we all do like keyboard shortcuts and with version 4.6 I found one hand was constantly on the keyboard when drawing in moho. I just think with the tools already in moho that make it really easy and simple to draw detailed vector objects a simple implementation of something like this would make it even more intuitive. Maybe even use MMB over a line and left/up or right/down drag could straighten or curve the line.

What do others think, would something like this be of use to you. I myself would love to see this and had I known version 5 was in the works would have suggested it a long time ago. Also i`m not for one minute suggesting that tools are removed and implemented under mouse shortcuts but this added as another way of doing the same thing possibly quicker for people. I`m also aware that not all mac users have 3buttoned mice but these will most definatly be more common on desktop pcs (linux/windows).

Anyway that was my first initial thing with my 1/2 hour play.

Thanks for updating the software

Chris
User avatar
spasmodic_cheese
Posts: 330
Joined: Wed Aug 04, 2004 2:02 am

Post by spasmodic_cheese »

well thats the great thing about the LUA scripting, you can change that yourself.
twistedanimator
Posts: 3
Joined: Sun Sep 05, 2004 2:57 pm

Post by twistedanimator »

Really thats fantastic, I guess the scripting is maybe similar to maya in that the whole of moho and its interface is just running a bunch of scripts. So when I click the move tool moho runs a the translate script.

Is there any documentation available from previous beta versions or is this still being worked on.

This upgrade is sounding like it will be very special and a massive leap forward cant wait to really spend some time using it.
User avatar
tknaps
Posts: 27
Joined: Fri Aug 06, 2004 2:31 pm
Location: Trondheim, Norway

Post by tknaps »

The scripting docs [quote=Lost Marble]"(...) will be coming sometime after the manual, and most likely after version 5 is released."[/quote]

See this thread:
http://www.lostmarble.com/forum/viewtopic.php?t=195

If you want to get started right away, check out Myles modification to the Lua Script API: http://www.lostmarble.com/forum/viewtopic.php?t=198
and check out the existing scripts in the scripts/ subdirectory.
Tarjei
User avatar
7feet
Posts: 840
Joined: Wed Aug 04, 2004 5:45 am
Location: L.I., New Yawk.
Contact:

Post by 7feet »

There are great opportunities for messing with the scripts, since LM was nice enough to make all the tools Lua. Even though I've broken a few things along the way, I've had fun diddling with the code in the tools while I'm trying to wrap my head around the scripting language. So far, the only tweak I've done that i really use is in the "curvature" tool, and it's dead simple. The tool uses a number to describe how sharp or rounded a point's arc is, e.g. .001 for a sharply angled point, and .3 for the standard rounded point. The standard maximum in the curvature tool is set to "2/3" ( in the "LM_Curvature:OnMouseMoved(moho, mouseEvent)" function of the tool, specifically the line "c = LM.Clamp(c, MOHO.PEAKED, 2/3)". I had done a bit of hand rearrangement of the text in .MOHO files in 4.6 and found some interesting results with using larger numbers, so I changed the line to "c = LM.Clamp(c, MOHO.PEAKED, 5 )". Sometimes setting the point curvature really high will give you some interesting results. Not quite a proper bezier adjustment, but handy for some things. I think it's just pretty dang spiffy that you can now customize to tools to your hearts content, and I suspect I'll be doing lot's of it once I'm up to speed in LUA. Kinda hard to find things to do since most of the tools seem to be pretty well written, but I am giving a shot at makiing the center point for the "rotate points" toll adjustable.

--Brian
myles
Posts: 821
Joined: Sat Aug 21, 2004 3:32 am
Location: Australia, Victoria, Morwell
Contact:

Post by myles »

Well, I'm not sure it's possible with the middle mouse button, but it should be possible to make e.g. Alt-LeftMouseButton toggle-select points while using the Translate tool. This would seem to be possible within the scripting API, and what's more, would work whether or not you have a 3-button mouse.

However, you're then back to using the keyboard again for the Alt key - unless you have a mouse driver that allows you to assign Alt-LMB to the middle button, which some do.

Would an Alt-LMB arrangement be a useful enough compromise ?

Regards, Myles.
twistedanimator
Posts: 3
Joined: Sun Sep 05, 2004 2:57 pm

Post by twistedanimator »

The thought of being able to use the ALT key to allow me to toggle selections whilst in the translation tool would be great. I dont mind being on the keyboard just that I found it kinda strange that I would have to constantly change tools for something that could be implemented in the move tool. LUA seems to hold all the answers which is great, and the forum seems really buzzing with people who are willing to help and put in suggestions so i`m sure eventully I will have moho working exactly how I would like it. I think I will wait a while though with my experimenting until I understand LUA a bit better and for the official release with documents.

Chris
myles
Posts: 821
Joined: Sat Aug 21, 2004 3:32 am
Location: Australia, Victoria, Morwell
Contact:

Post by myles »

twistedanimator wrote:The thought of being able to use the ALT key to allow me to toggle selections whilst in the translation tool would be great.
Hi Chris,

I've put up a modified version of the Translate tool's Lua script at
http://www-personal.monash.edu.au/~myle ... index.html
wherein Alt+LMB select-toggles individual points. No box selection or anything fancy.

Note: the last selected point cannot be de-selected in this version - use the Enter key for deselecting everything.

Warning: this hasn't had much testing or review, use at your own risk - back up your existing translate script before overwriting it with this one.
Only tested with a Windows version of beta 3.

Regards, Myles.
Locked