Replacing standard tools - code fix

Have you come up with a good Moho trick? Need help solving an animation problem? Come on in.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
arfa
Posts: 244
Joined: Tue Dec 23, 2008 8:15 pm
Location: New Zealand

Replacing standard tools - code fix

Post by arfa »

I am impressed with Fazek's tools and am replacing most of the standard tools with them. However, I am getting some lua console errors.

I have replaced lm_select_points.
Click the oval or rectangle tool and (other) tools - no problem.
Use the shortcut key - L, E, ... and I get an error.

"...scripts\tool\lm_oval.lua:207: attempt to index global 'LM_SelectPoints' (a nil value)"

I suspect I just need to change a code value somewhere but... where?

I poked about - as I was making sure that my report here was accurate :))
and found,
Line 207 of lm_oval.lua has:
function LM_Oval:OnKeyDown(moho, keyEvent)
LM_SelectPoints:OnKeyDown(moho, keyEvent)
so I changed 'LM' to 'FA' (after having first tried 'fa')

I have fixed the problem but, having done the typing, I thought it might be worth putting this up for anyone else who makes this switch.

I rest my (upper)case - arfa
User avatar
synthsin75
Posts: 10267
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Post by synthsin75 »

Yeah, if you want to get rid of the LM tools altogether there are probably many of these references you'll need to change. Making sure you check all of the tools' modified key functions, as these are usually what calls the other tools. Or just search each for 'LM'.

If you get them all working independent of the LM tools, you might post them for those not so brave as to go editing them.

:wink:
arfa
Posts: 244
Joined: Tue Dec 23, 2008 8:15 pm
Location: New Zealand

Post by arfa »

I putter along with these things as time permits so - a day or two and I should be done. It occurred to me that this might better be posted in 'scripts' - so I will put up a zip there.

They sure do work a lot more intuitively than the originals. Great.

> arfa
arfa
Posts: 244
Joined: Tue Dec 23, 2008 8:15 pm
Location: New Zealand

Post by arfa »

I have worked on just replacing the 14 tools that Fazek modified - the remaining LM tools work just fine.

I have posted a kit-download in the 'script' forum.

cheers - arfa
Post Reply