Q: Change tool with lua?

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
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Q: Change tool with lua?

Post by rylleman »

Is there a way to change the current tool with lua?
It would be fantastic if I could make a tool that when it has executed changes to another tool, select bone tool for example.
Another thing, but i have low hopes on this one, is there a way for lua to know which tool was selected before the current one?
User avatar
rylleman
Posts: 750
Joined: Tue Feb 15, 2005 5:22 pm
Location: sweden
Contact:

Post by rylleman »

Nevermind, I figured it out!
Well sort of, you can assign tools as buttons in the _tool_list.txt which means that when they have executed Moho goes back to the tool you had selected before pushing the button.
No need to do it with lua at all.
User avatar
Rai López
Posts: 2289
Joined: Sun Aug 08, 2004 1:41 pm
Location: Spain
Contact:

Post by Rai López »

...Well, now I have Fazek tools instaled (of course) and I have lost this function that I loved, but with the original lm_translatePoints tool installed, when you copied a selected points and then pasted'em, that tool was auto selected inmediatelly, I've been searching for some line of code on it but I have found nothing to explain it... Who knows? Maybe a hard-coded function, maybe not... or maybe if you take an eye into it you could find that I haven't be able... Very probable (I hope!), so GOOD LUCK! :)
Post Reply