How to I lock a layer?

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

Moderators: Víctor Paredes, Belgarath, slowtiger

User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: How to I lock a layer?

Post by DK »

Double clicking to unlock was the first thing I tried when I installed it. It felt like it was the natural thing to do to unlock it.

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

Re: How to I lock a layer?

Post by Greenlaw »

BTW, the text editor I used was Notepad++, and when I checked the Encoding menu setting it was indeed set to UTF-8.

So, good to know if you're editing a Moho script. :)
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

Greenlaw wrote: Sun Jun 27, 2021 2:13 am BTW, the text editor I used was Notepad++, with default settings. (I only added the handy Compare plugin.) I checked the Encoding menu setting and, indeed, it's set to UTF-8.
Yeah, I set Notepad2 to default to UTF-8 after learning about this.
DK wrote: Sun Jun 27, 2021 2:12 am Double clicking to unlock was the first thing I tried when I installed it. It felt like it was the natural thing to do to unlock it.
The problem with double-clicking a layer is that it will also open the layer settings.
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: How to I lock a layer?

Post by DK »

No probs. I guess adding an "unlock Layer" to the right click drop down menu would be a bit too hard.
D.K
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

DK wrote: Sun Jun 27, 2021 3:19 am No probs. I guess adding an "unlock Layer" to the right click drop down menu would be a bit too hard.
There's zero scripting access to context menus.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

Greenlaw wrote: Sun Jun 27, 2021 2:13 am BTW, the text editor I used was Notepad++, and when I checked the Encoding menu setting it was indeed set to UTF-8.
Dennis, beware encoding in UTF-8 for AutoHotkey. I just spent hours trying to figure out why hotkeys I use to use weren't working. Turns out AHK only likes UTF-8-BOM or UTF-16-BOM.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to I lock a layer?

Post by Greenlaw »

That's good to know! Thanks for the alert Wes.

While I do use Notepad++ for day to day stuff, I've been using SciTE4AutoHotkey for AutoHotkey scripting. But I'll be mindful of the potential issue because I'm sure I occasionally jump into Notepad++ when it's convenient.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

DK wrote: Sun Jun 27, 2021 2:12 am Double clicking to unlock was the first thing I tried when I installed it. It felt like it was the natural thing to do to unlock it.
Removed link. Replaced by: http://www.lostmarble.com/forum/viewtop ... 15#p201415
This version might work for you. Couldn't do double-click on the layer, but you can do this instead:
1. Turn off the eyes on a layer
2. Click the layer.

This will automatically restore visibility and toggle the layer lock. It's still installed to the Tools folder, but there's no tool to interact with (no PNG icon needed).

It also still keeps locked layers from being selected on frames other than zero. On frames greater than zero, you can lock and unlock until you change layers with it locked. Then you have to go to frame zero to unlock.

Unless someone speaks up saying they like the former version better, I'll eventually depreciate the other link.
Last edited by synthsin75 on Sat Dec 04, 2021 7:03 am, edited 3 times in total.
User avatar
DK
Posts: 2854
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: How to I lock a layer?

Post by DK »

Hi Wes.
For some reason I can't get this to work anymore?
I placed it in my custom folder under Menu/Layer Effects.
it appears but does not do anything when invoked?
D.K
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

DK wrote: Thu Jul 08, 2021 9:40 am Hi Wes.
For some reason I can't get this to work anymore?
I placed it in my custom folder under Menu/Layer Effects.
it appears but does not do anything when invoked?
D.K
It still needs to go in your Tools folder, it just won't show up in the toolbar. It's using a part of the tool that gets evaluated even when the tool isn't shown. That doesn't get evaluated for menu scripts.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to I lock a layer?

Post by Greenlaw »

Quick question: If I set Notepad++ to UTF-8 BOM, will Moho lua scripts still be able to use the unicode 'emojis'?

I imagine it works but I can't check right now, and I was wondering if anybody here already knows the answer.
User avatar
synthsin75
Posts: 9981
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: How to I lock a layer?

Post by synthsin75 »

Greenlaw wrote: Thu Jul 08, 2021 7:13 pm Quick question: If I set Notepad++ to UTF-8 BOM, will Moho lua scripts still be able to use the unicode 'emojis'?

I imagine it works but I can't check right now, and I was wondering if anybody here already knows the answer.
My preferred text editor, Notepad2, only has UTF-16-BOM, but Moho doesn't like that. So I have to make sure I use that for AHK and UTF-8 for Moho.
To be fair, both would probably play nice with ANSI, but then no unicode symbols.
User avatar
Greenlaw
Posts: 9270
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: How to I lock a layer?

Post by Greenlaw »

Thanks Wes! If I get a chance later today, I'll post info for what I find here.
Albo
Posts: 28
Joined: Wed Jul 04, 2018 1:44 pm

Re: How to I lock a layer?

Post by Albo »

Very happy to have this post.
I'm still on the Moho 13.5 demo.
So I need to install this in the tools folder.
I couldn't find the Tools folder.

On Mac:
Moho Pro folder-->Extras folder --> Optional Scripts (is this the one?)

There is also a Script folder --> Tool folder (or is this the one ?)

Thanks.
User avatar
Hoptoad
Posts: 623
Joined: Sun Jan 03, 2016 4:19 pm
Location: Florida

Re: How to I lock a layer?

Post by Hoptoad »

I use a Mac. Put your Tool scripts here, in the "Custom Content" folder (not the actual Moho folder with the app; leave that alone):

Moho Pro > Scripts > Tool
Post Reply