Selection to new layer

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

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
User avatar
mgo
Posts: 57
Joined: Thu Dec 05, 2019 3:19 pm
Location: Earth, Solar System, Milky Way, Laniakea

Selection to new layer

Post by mgo »

Hey everyone,

As a first step I tend to draw everything on one layer, then break things apart for masking, refinement and rigging. I was hoping there is a way to speed up the breaking part – I'd love to have a function that works on any selection of points, and moves them to a new layer. Basically a shortcut / macro for

- cut selection
- create new layer
- name new layer
- paste previously cut selection

Do You know of a script that does that, or comes close to this functionality? Otherwise I'd have an excuse to have a more thorough look at Lua ;)
🚀
User avatar
MrMiracle77
Posts: 181
Joined: Mon Jun 24, 2019 2:30 am

Re: Selection to new layer

Post by MrMiracle77 »

Good ole' ctrl+x and ctrl+v work in Moho for cutting and pasting shapes (along with ctrl+c for copy). ctrl+x/v/c also works for animation marks on the timeline, which is handy for returning to earlier poses and shapes. I don't think there's a keyboard shortcut for new layers; there's quite a few layer types, and a shortcut for each would take up a lot of keyboard real-estate.

If you're looking to speed up your process, drawing directly with layers would be enormously beneficial. It would also streamline other layer options like masking.
- Dave

(As Your GM)
User avatar
mgo
Posts: 57
Joined: Thu Dec 05, 2019 3:19 pm
Location: Earth, Solar System, Milky Way, Laniakea

Re: Selection to new layer

Post by mgo »

Thanks Dave, I am aware of the regular tools. Actually the creation of each layer type can be assigned to a different shortcut, which I already have done. But even with that, creating layers tends to break my drawing flow, that's why I prefer to draw first and separate then. And since cutting - layer creating - layer naming - pasting is the same four steps every time, I'd rather have it automated.

I guess I'll look into scripting anyway, nonetheless if there is a similar to the proposed tool out there let me know.
🚀
User avatar
Greenlaw
Posts: 9269
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selection to new layer

Post by Greenlaw »

Under the Scripts menu, look for Layer Effects> RT: Break Apart Shapes. To use this script, select the points of shapes you want separated and then run the script. A group will be created with individual layers for each shape in the selection.

Points/shapes that were not selected will be deleted so you may want to run this on a duplicate layer.

There are other features in this script but the default option is the only one I've used.

Sometimes I use this script after I've drawn the main shapes of a character (head, torso, limbs), and add the details to each layer after the separation. It can save a little time when I'm focused on tracing from a character sheet.
Last edited by Greenlaw on Thu Feb 23, 2023 12:03 am, edited 2 times in total.
User avatar
mgo
Posts: 57
Joined: Thu Dec 05, 2019 3:19 pm
Location: Earth, Solar System, Milky Way, Laniakea

Re: Selection to new layer

Post by mgo »

Thanks Greenlaw, the script is working fine and comes pretty close to what I was looking for.

For the opposite cases, where I quickly want some layers recombined, I found an older script that "combines meshes". Or in other words, merge layers for Moho:

https://www.lostmarble.com/forum/viewto ... 12&t=25487
🚀
Post Reply