how to run a lua script in moho?

Wondering how to accomplish a certain animation task? Ask here.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
Ty505
Posts: 38
Joined: Thu Sep 30, 2021 2:20 pm

how to run a lua script in moho?

Post by Ty505 »

I'm trying to cleanup a rig that is slowing down by using the syn_negative_keys.lua script (https://lostmarble.com/forum/viewtopic.php?f=12&t=32714)

I can't figure out how to run it, and it's just a single lua file
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: how to run a lua script in moho?

Post by Greenlaw »

Assuming you set your Custom Content Folder...

1. Go to File > Open Custom Content Folder. The folder will open.

2. Open Scripts > Menu. Now you need to decide where you want to install the script. I suggest creating a folder called something like '+Special' or '+Custom'. You can name it whatever you like and the plus sign forces it to the top of the to make it easier to find. Now open this folder.

3. Drag your menu script (i.e., syn_negative_keys.lua) to this folder. You can close this folder now.

4. Back in Moho press Ctrl+Shift+Alt+L. This loads any new scripts you added.

5. Under the Scripts menu you'll see a new sub-menu named after the folder you created, and inside that you'll find the command SYN Negative Keys. Choose that.

The tool is more or less self-explanatory from there.

If you haven't set your Custom Content Folder yet, you can do that from the Preferences window. This can be created anywhere so long as the location is always accessible to Moho.

Hope this helps.
Ty505
Posts: 38
Joined: Thu Sep 30, 2021 2:20 pm

Re: how to run a lua script in moho?

Post by Ty505 »

Greenlaw wrote: Fri Mar 10, 2023 2:49 am Assuming you set your Custom Content Folder...

1. Go to File > Open Custom Content Folder. The folder will open.

2. Open Scripts > Menu. Now you need to decide where you want to install the script. I suggest creating a folder called something like '+Special' or '+Custom'. You can name it whatever you like and the plus sign forces it to the top of the to make it easier to find. Now open this folder.

3. Drag your menu script (i.e., syn_negative_keys.lua) to this folder. You can close this folder now.

4. Back in Moho press Ctrl+Shift+Alt+L. This loads any new scripts you added.

5. Under the Scripts menu you'll see a new sub-menu named after the folder you created, and inside that you'll find the command SYN Negative Keys. Choose that.

The tool is more or less self-explanatory from there.

If you haven't set your Custom Content Folder yet, you can do that from the Preferences window. This can be created anywhere so long as the location is always accessible to Moho.

Hope this helps.
So I set the custom content folder location, and made a +InstalledScripts folder inside of that directory, and put the .lua file in there - I then used that shortcut key, and even restarted moho, but no new sub-menu seems to be present under Scripts
User avatar
hayasidist
Posts: 3526
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: how to run a lua script in moho?

Post by hayasidist »

Ty505 wrote: Sun Mar 12, 2023 5:36 pm So I set the custom content folder location, and made a +InstalledScripts folder inside of that directory, and put the .lua file in there - I then used that shortcut key, and even restarted moho, but no new sub-menu seems to be present under Scripts
nope..
Inside the custom folder there's a "Scripts" folder...
Inside the Scripts folder is a "Menu" folder...
Inside that is where to put an (e.g.) "+Custom" folder...
And in there is where to put syn_negative_keys.lua
Ty505
Posts: 38
Joined: Thu Sep 30, 2021 2:20 pm

Re: how to run a lua script in moho?

Post by Ty505 »

hayasidist wrote: Sun Mar 12, 2023 7:50 pm
Ty505 wrote: Sun Mar 12, 2023 5:36 pm So I set the custom content folder location, and made a +InstalledScripts folder inside of that directory, and put the .lua file in there - I then used that shortcut key, and even restarted moho, but no new sub-menu seems to be present under Scripts
nope..
Inside the custom folder there's a "Scripts" folder...
Inside the Scripts folder is a "Menu" folder...
Inside that is where to put an (e.g.) "+Custom" folder...
And in there is where to put syn_negative_keys.lua
Thanks for the clarification, must've misread the initial response above - it worked perfect, thanks again!
Post Reply