*NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

*NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

This tool keeps layers docked to the workspace, so they are always in view while navigating the workspace.
Very useful to anchor animatics to the workspace or with my Layer Shortcuts script.

Mac: https://drive.google.com/uc?export=down ... CWCV66TqYw
Windows (auto-docking): (Password: synthsin75) https://drive.google.com/uc?export=down ... 3vdBGpOf_q

Directions:
  • Mac:
    1. At frame zero, position and scale one or more layers where you want them docked relative to the workspace window. If you're doing one at a time, you can position/scale it with either layer transforms or workspace navigation, otherwise just use layer transforms to position multiple layers at once.
    2. At frame zero, hit the button and select "Add" to dock all selected layers.
    3. At any frame other than zero, hit the button to restore all docked layers...like after navigation.
    • Tips:
      • Assign this button a shortcut. I used zero.
        Frame zero to add or remove docked layers. You can just hit the first letter of a button, so adding with my shortcut is zero then "a", and removing would be zero then "r".
    Windows (auto-docking):
    1. Assign a shortcut to the "SYN: Dock Layers Use" button. (Necessary for auto-docking.)
    2. At frame zero, position and scale one or more layers where you want them docked relative to the workspace window. If you're doing one at a time, you can position/scale it with either layer transforms or workspace navigation, otherwise just use layer transforms to position multiple layers at once.
    3. At frame zero, hit the "SYN: Dock Layers Set" button (icon with gear) and select "Add" to dock all selected layers or "Remove" to undock all selected layers.
    4. Set layers will now auto-dock on frames other than zero whenever you:
      • Use right-click & drag to pan the workspace.
      • Use mouse wheel scroll to zoom the workspace.
        • This might not work with touchpad or touch screen zoom gestures, but you can simply right-click after zooming to auto-dock.
      • Use Shift+right-click & drag to zoom workspace.
      • Use Home to reset the view.
      • Use Home+Shift to zoom layer contents.
      • Use Home+Alt to zoom selected points.
    • Tips:
      • Assign "SYN: Dock Layers Use" button a shortcut, but you'll never need to use it, so it can be any available key.
        All the auto-docking only works if you release the key/s, like right-click & drag, within the workspace. This is so the automation doesn't affect anything else in Moho that may use the same key/s.
      AutoHotkey script:
      • If you have AutoHotkey installed and wish to use the uncompiled AHK script instead of the compiled exe:
        • With Moho closed, open "syn_dock_layers_set.lua" in a text editor, like Notepad.
          Under "Recurring values", change the value of "Syn_DockLayersSet.exe" from 1 to 0.
          Open Moho, and when you go to dock a layer, it will ask you to find your AutoHotkeyU64.exe
Last edited by synthsin75 on Sat Aug 28, 2021 3:10 am, edited 4 times in total.
User avatar
lucasfranca
Posts: 127
Joined: Sat Oct 07, 2017 11:47 pm

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by lucasfranca »

Link off?
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
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

lucasfranca wrote: Thu Aug 12, 2021 4:13 pm Link off?
Links fixed.
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by gilcartunista »

synthsin75 wrote: Thu Aug 12, 2021 4:35 pm
lucasfranca wrote: Thu Aug 12, 2021 4:13 pm Link off?
Links fixed.
Link off...
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

gilcartunista wrote: Thu Aug 12, 2021 4:40 pm Link off...
They work here. Don't know what to tell ya.
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by gilcartunista »

synthsin75 wrote: Thu Aug 12, 2021 4:44 pm
gilcartunista wrote: Thu Aug 12, 2021 4:40 pm Link off...
They work here. Don't know what to tell ya.
This is the message that appears to me...https://ibb.co/svmW738
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by Greenlaw »

I just tried in Chrome and, yeah, I'm seeing the same error page for both links, Mac or Win.

In Firefox, I get a screen asking me to sign-in to Google Drive.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

Okay, try them now.
Google Sites migrated to Google Drive, and I had found something that said I could still make them hotlinks, but apparently that doesn't work.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by Greenlaw »

Hi Wes,

Now I'm seeing (in Chrome) the same sign-in screen I'm seeing with the Layer Shortcuts link. (viewtopic.php?f=12&t=32641&start=120#p198719)
synthsin75 wrote: Thu Aug 12, 2021 5:31 pm Google Sites migrated to Google Drive...
Ugh...hate when that stuff happens.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by Greenlaw »

Seems all good now...tested both Mac and Win links. 👍
User avatar
gilcartunista
Posts: 55
Joined: Mon Mar 14, 2016 7:13 pm
Location: https://www.facebook.com/gil.cartunista
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by gilcartunista »

gilcartunista wrote: Thu Aug 12, 2021 4:49 pm
synthsin75 wrote: Thu Aug 12, 2021 4:44 pm
gilcartunista wrote: Thu Aug 12, 2021 4:40 pm Link off...
They work here. Don't know what to tell ya.
This is the message that appears to me...https://ibb.co/svmW738
Seems all good now...tested Win link. 👍
User avatar
lucasfranca
Posts: 127
Joined: Sat Oct 07, 2017 11:47 pm

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by lucasfranca »

Image

The link now works, thanks! But I have a problem in version 13.5: This problem appears :(

I duplicated the folder and renamed it to Micro smith, problem 2 appeared.
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
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

lucasfranca wrote: Fri Aug 13, 2021 11:01 am The link now works, thanks! But I have a problem in version 13.5: This problem appears :(

I duplicated the folder and renamed it to Micro smith, problem 2 appeared.
Okay, I've updated it for v13.5.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by Greenlaw »

Cool! Thank you Wes. Funny, I remember you releasing this tool a while back but I somehow missed trying out.

Will definitely install and try it this weekend.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *NEW-ish* Dock Layers to workspace (Auto-dock on Windows)

Post by synthsin75 »

Greenlaw wrote: Fri Aug 13, 2021 6:33 pm Cool! Thank you Wes. Funny, I remember you releasing this tool a while back but I somehow missed trying out.

Will definitely install and try it this weekend.
Just noticed I forgot to comment out a print call. Updated again.
Post Reply