*UPDATED 3/1/19* Layer Shortcuts tool

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: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by synthsin75 »

Greenlaw wrote:I didn't get to work on it at lunch but here's a little more info about my earlier test for anybody using Layer Shortcuts 2.4.

When I created the new buttons, they appeared in a new Shortcuts group, but I was able to move the layers to the Shortcuts groups that already existed for each character. Seemed to work fine.

Wes, can you confirm that moving the layers to the older groups is okay to do? Is there something I should be aware of when doing this?
That should be fine, as the shortcut group only exists to collect and compact the note layers, and I didn't change the group name the tool looks for to find that group.
Probably easier to just delete the old shortcut group.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

synthsin75 wrote:Probably easier to just delete the old shortcut group.
Makes sense. I'll get back on this tonight and let you know how it goes. :)
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Oh, I have one question. In the earlier version, I had a popup message whenever I created a new project while a project with Layer Shortcuts was open. Here's the message:

Image

This was puzzling because there are no referenced layers in the project. At the time, I figured the project might have been bugged because I didn't really know how the tool was supposed to work and I probably broke something.

But I just tried with a new project created from scratch using 2.4 and I'm still seeing the popup when I make a new project. Any idea why?

The message doesn't seem to hurt anything, just annoying and apparently incorrect. Just thought you should know.

I'll try this on a different computer tonight and see if this behavior is reproducible there.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Additional info:

If I close the project using Layer Shortcuts before creating a new blank project, I do not get the popup after creating the new project. This only happens when a project with Layer Shortcuts is open.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

More curious behavior:

If I create a new project while the Layer Shortcuts project is active, I get the popup, and if I create a second new project while first new project is active, I do not get the popup. But when I make the Layer Shortcuts project active again, and create a new project, then the popup appears again.

After closing all these projects and then reopening the Layer Shortcuts project, the popup appears for the Layer Shortcuts project. But if I close the Layer Shortcuts project again and re-open it, I don't get the popup.

I'll test this further after I get home tonight.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by synthsin75 »

I have only seen that very sporadically, so it was a bit hard to troubleshoot. Shouldn't cause any problems, but like you say, it can get annoying.
I can't seem to get that warning again.

I've made some small changes that won't effect any functionality in v2.5:
https://sites.google.com/site/synthsin/ ... ects=0&d=1
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Ok, thanks. I'll let you know if I notice a reproducible trigger for the popup. I know I can probably disable the popup by checking the box in the corner but will leave it alone for the time being.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Ran a quick test using 2.5 and I'm not seeing the popup. Will keep an eye on this and let you know if it's fixed for good here.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Used the latest version last night and this morning. Working great so far and no unexpected popups!

Great work on the new features, Wes! Thanks for improving it and making it even more production-friendly.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by synthsin75 »

Thanks for putting it through its paces, Dennis. I'm probably also posting an automated version of my dock layers script (Windows only) sometime today. That will make non-local buttons way more useful, by always keeping them docked to the workspace window...without the user having to constantly hammer its shortcut. It uses AutoHotkey, and I'll provide instruction for those who want to run the AHK script instead of the EXE.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Hi Wes,

I have a couple of questions about Layer Shortcuts.

Is there a way to make existing Layer Shortcuts buttons work with a duplicate of a character? I was sure I tried that before but I couldn't get it to work this morning.

To be clear, if I make new Layer Shortcuts buttons for a duplicate of a character or second different character, the tool works fine. But if I make a duplicate of a character that already has its own Layer Shortcuts, the buttons for both character link only to the layers in the original character. It makes sense why this happens (the duplicate buttons are set to reference the original layer IDs) but is that expected behavior? Just checking to be sure.

Is there a workaround you can think of?

BTW, this is not a problem I'm having at the moment so there's no urgency. I'm just wondering in case I ever have to animate many copies of the same character.

Thanks in advance for any info or opinion.

D.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

Just an FYI: I skeptically wondered if importing a second copy of the character to a project would matter. It doesn't.

ATM, I think this is just something the user needs to be aware of: Each character in a project can have its own Layer Shortcuts, even if the layers and shortcuts have the same names. But if you duplicate a character to use in the same project as the original character, you will need to recreate the Layer Shortcuts for the duplicate.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by synthsin75 »

Hi Dennis,

If you plan on having multiple characters, or duplicates, that are going to need shortcuts for layers with the same names, I would suggest using the Scope>Universal and non-Local (unchecked) options. Universal will make the same shortcuts work for that layer name in whatever current group you are in (top level group or one you've assigned using Set/Remove Group). If the character has several layers with that name, it will cycle through them. And non-Local will place the shortcut outside of the character, so it isn't needlessly duplicated...since universal shortcuts work for any group that has a layer with that name.
User avatar
synthsin75
Posts: 9934
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by synthsin75 »

Another benefit to non-Local shortcuts is that they work well with my script to auto-dock layers to the workspace window:
viewtopic.php?f=12&t=32740
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: *UPDATED 3/1/19* Layer Shortcuts tool

Post by Greenlaw »

synthsin75 wrote:If you plan on having multiple characters, or duplicates...
Ok, thanks...I'll give that a try with multiple characters tonight, dupes of chars and different chars in the same project, and maybe even with some actual animation.

I'd love to get your tool cleared for use at work, but before I can do that I need to anticipate situations like this beforehand. I hope we can use it here...it's pretty awesome. :)
Post Reply