My Nudge Keys Toolset... Finally!!!!

Moho allows users to write new tools and plugins. Discuss scripting ideas and problems here.

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
Lukas
Posts: 1295
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by Lukas »

Thanks Wes, I implemented your code and it works great!
Should note that it doesn't work for individual bones that have split dimensions, but ehh.. don't use those :)

Code: Select all

-- Version History:
--==================
-- Version 1.3.1 (by Lukas Krepel, Frame Order)
  -- Support for channels split dimensions (not for individual bones) (thanks to synthsyn75)
Download link: rt_key_tool_v1.3.1.zip
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: My Nudge Keys Toolset... Finally!!!!

Post by Maestral »

:lol:
Good to know
Still, many thanks for sharing the script.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by synthsin75 »

I'm glad it help, Lukas.
User avatar
Penny
Posts: 51
Joined: Sun Dec 02, 2018 3:56 pm
Location: Italy

Re: My Nudge Keys Toolset... Finally!!!!

Post by Penny »

Oh, thanks a lot for this, Lukas.
I always loved this script, probably the most I used in all these years. Cool to have it back!
Even with the head in the clouds You can touch the ground

https://www.facebook.com/santiago.penny
https://www.behance.net/pennysantiago
User avatar
Trizul96
Posts: 25
Joined: Sat May 16, 2020 7:12 pm

Re: My Nudge Keys Toolset... Finally!!!!

Post by Trizul96 »

Rudiger wrote: Tue Jul 14, 2009 3:53 pm *****************************
UPDATE (29-June-2011)
*****************************
On a request from Selgin, I have added the extra channels from AS7 and AS8 rt_key_tool_v1.2.zip.

*****************************
UPDATE (27-April-2011)
*****************************
Wow, is has it really been a year and a half :shock:? Anyway, here is a long overdue update rt_key_tool_v1.1.zip.

Apart from a bunch of bug fixes, tidying up, and support for AS7, there is now has an overwrite mode which lets you delete keys without shifting. It also now uses new scripting features for checking whether layers are visible or selected instead of the hacks that it used previously, but that means that it now requires AS6.2 or above.

By the way, I used Ramón López's idea of putting all of the button icons in their own folder inside ScriptResources, so you might want to clear that folder out of icons related to rt_key_tool before reinstalling.

*****************************
UPDATE (01-Nov-2009)
*****************************
A new version of these tools has been released in the form of a single new tool called KeyTool! It has a lot of new options and bug fixes since the initial version. It can be downloaded from here:
rt_key_tool_v1.0.zip

For those that still prefer having the separate tools, I have also written a set of button tool wrappers that call the same core functions that are used by the new KeyTool. These tools can be downloaded from here.
rt_nudge_keys_buttons_v0.1.zip

*****************************
Original Post (14-Jul-2009)
*****************************
OK, I think I'm finally prepared to release a version of my "nudge keys" set of tools. As well as making them work with the new features of ver 6.0, I've been busy added some extra options as well as optimizing everything to be much more responsive. In particular, the Menu script which creates a consolidated timeline for a set of layers used to take up to a minute to run, but is now pretty much instant.

By the way, the tools should work for both versions 5.6 and 6.0, except for version 5.6, the interpolation mode will be overwritten and also, the layer ordering keys will not be shifted.

You can download the full set of tools and scripts from here...
rt_nudge_keys_v0.1.zip

The toolset consists of the following button tools:
rt_nudge_keys_left ,
rt_nudge_keys_right .
rt_global_nudge_keys_left <
rt_global_nudge_keys_right >
rt_prev_keyframe -
rt_next_keyframe +

the following menu script:
rt_create_consolidated_timeline_layer.lua
and the following utilities script, that contains some common functions:
rt_utilities.lua
I've also included a file, _tool_list_fragment.txt, that shows my recommended key assignments.

I admit that the the icons are pretty poor, so if anyone wants to volunteer to make better ones, please go right ahead.

So hopefully it's pretty self explanatory, but here's a brief description on how to use it.

1. In any layer, press ',' and all of the keys at or to the right of the cursor will be nudged 1 place to the left. Press '.' and the keys will be nudged 1 place to the right. If the current layer has children then all layers below it will also be affected. If there is a key to the immediate left of the cursor, then a left nudge won't be performed.

2. In any layer, hold down shift when you press ',' or '.' and all keys in the document, including the camera keys will be nudged. The document's endframe will also be automatically adjusted.

3. In any layer, run the rt_create_consolidated_timeline_layer script and all keys in parent (if exists) and sibling layers (if exists) will consolidated into a special non-rendering layer which placed alongside the original layer. Whenever you nudge left or right in this layer its parent and the parent's children are automatically affected. This script can also be run at the top level as well and is useful for monitoring global nudges.

4. There are a number of option variables at the bottom of the rt_nudge_keys_left.lua file, which I plan to implement as options one day using a separate set option script. I'm too tired to explain them all now, but an interesting one is "enable_fake_curvature_channel". The thing is that the curvature channel for each point is not currently available in the script interface, but I worked out a fairly robust way to fake it by assuming that each curvature key has a corresponding point position key. Where it gets a bit hacky is that it uses an action with a single curvature key at a high frame to blank the current curvature channel. This is why it's disabled by default.

Anyway, what I love about Anime Studio is that it's so much fun to use. I just hope this tool makes tweaking the timing as fun as everything else!

Of course it goes without saying, if anyone finds any bugs or has any suggestions for making it better, I would love to hear them.


Please brother, give me tutorial on video since I'm not expert in english
Phazor
Posts: 22
Joined: Tue Oct 06, 2020 9:48 pm

Re: My Nudge Keys Toolset... Finally!!!!

Post by Phazor »

Noob question: How do I install this script? I opened the script folder of the download you posted here and downloaded it into the Tools Folder in the Custom Folder.

It doesn't seem to work and I know I must be doing it wrong...
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by Greenlaw »

General info:

Installing custom scripts in your program's scripts folder isn't recommended. You should install custom scripts in your Custom Content Folder.

You can see a typical installation process in this video (scrub to 1:42): https://vimeo.com/331818695

This video isn't specifically about installing scripts but it does show an example of how to install a script. Some scripts may require you to place them into certain categories like Menu or Tool, so be sure you know what type of script you have. Some authors will provide their scripts already in their correct folder structure; if this is the case with your download, just put the files in the matching folders in the Custom Contents Folder. Some scripts have files that need to go into multiple folders, so pay attention to that.

If the script didn't come with documentation, check the script file itself...sometimes the author will write the instructions for installation and use there. Otherwise, there should be info in the thread you downloaded it from. (Earlier in this thread, for example.)

I'll make a video about general script installation later, but for now, I'm pretty sure somebody else has made one already. A search on YouTube should turn up at least one.

Good luck, and I hope this helps!
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by Greenlaw »

A little more info: The reason you don't want to install scripts to the program's scripts folder is because you risk overwriting existing scripts or breaking something. If you install the files to your Custom Content Folder and something goes wrong, simply removing the files will set things back to normal. Also, using the Custom Content Folder makes it a little easier to migrate your custom mods and scripts to a later version of Moho whenever you decided to upgrade.
User avatar
Lukas
Posts: 1295
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by Lukas »

I've updated Rudiger's key tool for Moho 13.5 because I needed it for Vitruvian bones and once again learned life on earth would be impossible without Rudiger's key tool. It also supports wind channels (with a wind-checkbox in the toolbar).

Image

Let me know if something doesn't work for you. Note that it might not work on older Moho versions like 12.5 and 13.

Download link:

Code: Select all

-- Version History:
--==================
-- Version 1.3.2 (by Lukas Krepel, Frame Order)
	-- Moho 13.5 support -- Tick!
	-- Added Vitruvian bones channels -- Tick!
	-- Added Wind channels -- Tick!
	-- Added Wind checkbox -- Tick!
	-- Modified shortcuts to match other tools -- Tick!
	-- Fixed some toolbar icons -- Tick!
	-- Support for userscripts MohoMode.lua and LK_PaintKeys.lua (not required) -- Tick!
-- Version 1.3.1 (by Lukas Krepel, Frame Order)
	-- Support for channels split dimensions (not for individual bones) (thanks to synthsyn75) -- Tick!
-- Version 1.3 (by Lukas Krepel, Frame Order)
	-- Added all channels up to Moho 12 -- Tick!
	-- New icons that support the new color schemes and higher resolutions -- Tick!
	-- Reformatted the toolbar layout to be more user friendly -- Tick !
	-- Added shortcuts to tool description -- Tick!
	-- Disable 'selected points/bones/shapes' buttons if 'points/bones/shapes' buttons are off. -- Tick!
	-- Hopefully I haven't destroyed any functionality... -- Tick!/code]
User avatar
Hoptoad
Posts: 572
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: My Nudge Keys Toolset... Finally!!!!

Post by Hoptoad »

Lukas wrote: Tue May 11, 2021 9:29 am Let me know if something doesn't work for you. Note that it might not work on older Moho versions like 12.5 and 13.
I'm using Moho 12.5 on a Mac. I installed the script. I can see all the buttons at the top (Nudge Keys Right (.), etc.), so I must've installed it correctly.

The only thing that happens, however, when I try to nudge a key is a Lua Console message appears saying something about a nil value. So, unless I'm doing something wrong, it looks like the script doesn't work with Moho 12.5.

If I'm wrong and it should work with 12.5 on a Mac, somebody please let me know. Nudging keys with a (,) and a (.) seems really handy.
User avatar
pihms
Posts: 188
Joined: Sat Apr 18, 2009 9:52 pm

Re: My Nudge Keys Toolset... Finally!!!!

Post by pihms »

Another tool that would be great to have in the next version of Moho. It's these little things (great things) that makes Moho that much better.
Thanks!
User avatar
Hoptoad
Posts: 572
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: My Nudge Keys Toolset... Finally!!!!

Post by Hoptoad »

Lukas wrote: Tue May 11, 2021 9:29 am I've updated Rudiger's key tool for Moho 13.5 because I needed it for Vitruvian bones...
One of the main reasons I updated to 13.5 was so that I could use this updated script. It's going to save me a lot of time. Thanks for working on it, Lukas.
User avatar
Lukas
Posts: 1295
Joined: Fri Apr 09, 2010 9:00 am
Location: Netherlands
Contact:

Re: My Nudge Keys Toolset... Finally!!!!

Post by Lukas »

Image

I've uploaded the latest version here:
User avatar
lucasfranca
Posts: 127
Joined: Sat Oct 07, 2017 11:47 pm

Re: My Nudge Keys Toolset... Finally!!!!

Post by lucasfranca »

Lukas wrote: Mon May 22, 2023 3:16 pm Image

I've uploaded the latest version here:
Some icons don't show up for me.
Image
Image
An old guy [since 1983] who was raised in front of the TV.
Passionate about animation, after getting old, he decides to make it his hobby.

I share tutorials, reviews, tips and tricks from this vast world of animation on my channel.

https://youtube.com/animai2D
User avatar
Maestral
Posts: 531
Joined: Tue Jan 27, 2009 5:44 pm
Location: Belgrade, Serbia

Re: My Nudge Keys Toolset... Finally!!!!

Post by Maestral »

These icons should be placed/found in the Script Resources folder.

I've updated the previous installation so I have FO_icons folder there, in which you'll find these icons.
All of these, in my case, are in Custom folder.
Post Reply