Selecting points/shapes across vector layers

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

Post Reply
mrc
Posts: 116
Joined: Wed Feb 14, 2018 10:36 am
Location: Berlin, Germany
Contact:

Selecting points/shapes across vector layers

Post by mrc »

Hello, everyone,

I'm new here, working on my first project with Moho. So this may only be the first of many questions to come:

Is it possible to select and transform points across multiple vector layers? E.g. to combine shapes from different layers into one or to make the same transformation to several elements?

I haven't found a way yet.

Marc
You don't agree with the post above? Click here.
www.tricklabor.com/en
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selecting points/shapes across vector layers

Post by Greenlaw »

Mixed answer, and not exactly what you want but maybe helpful:

Selecting any shapes or layers from the workspace is easy. Just Alt-Right Click on any part of a drawing and it's layer will get selected. Alt-Shift Right Click will select the group it belongs to...handy if it's a manually controlled Switch layer. if you're using the Select or Transform points tool, clicking a second time will select the points/vectors. If you're using the Shape Selection Tools, clicking a second time will select the shape. (It's also possible to select shapes through shapes but that's another topic.)

Now, if you're intention is to edit points in multiple vector layers at the same time, no, you can't do that. You can manipulate multiple layers at the same time but not the contents of the layers at the same time.

I usually just Alt-Right Click to quickly just between layers and edit each layer as I need to.

I often wish I could edit multiple layers at once though. If I need to edit vectors from different layers at once, I will sometimes move the shapes to one layer, edit them together, and then move them back to their original layers. This only works if the layers share the same scale and positions though.

If you plan out what you want to do, it's usually not a big deal though.

If you wish to animate several vector layers a the same time, you can possibly do that using Mesh Warping. You'll need to make sure the vectors are drawn in a way that they can deform predictably with the mesh. This usually means avoiding bezier points, and using enough points to get nice deformations where you need it. Success comes down to understanding how vectors deform in Moho and planning the effect out carefully. (Tip: Do a lot of testing with a simple scene before applying it to a complicated one. You may avoid painful surprises this way.)

That said, sometimes it's better/easier to pre-render the vectors as a still, import the image and warp that instead. I often do that for very complicated vector art. If you take this approach, make sure you render the image at a high enough resolution to support the deformation without tearing.

Hope this helps.
mrc
Posts: 116
Joined: Wed Feb 14, 2018 10:36 am
Location: Berlin, Germany
Contact:

Re: Selecting points/shapes across vector layers

Post by mrc »

Thank you for your detailed answer. Unfortunately...
Greenlaw wrote:... if you're intention is to edit points in multiple vector layers at the same time, no, you can't do that.
This was my intention indeed. Trying to reuse switch layers for mouth shapes for another character I wanted to bulk edit those layers for necessary adjustments where basic layer transformations won't suffice.

Marc
You don't agree with the post above? Click here.
www.tricklabor.com/en
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Selecting points/shapes across vector layers

Post by hayasidist »

Alexandra (A.Evseeva) wrote a multi-layer magnet tool viewtopic.php?f=12&t=19114&p=176273#p176246 -- that could probably be used as the basis of a point transform tool.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selecting points/shapes across vector layers

Post by Greenlaw »

mrc wrote:Trying to reuse switch layers for mouth shapes for another character I wanted to bulk edit those layers for necessary adjustments where basic layer transformations won't suffice.
Ugh...yeah, if we had that capability, it's one of the ways I'd use it.

However, you may have discovered that, while in a Switch Layer, you can only ever view one layer at a time though so you wouldn't be able to edit them altogether anyway.

Tip: But...it is possible to view Switch layer drawings all together the following way:

1 Create a regular Group folder above the Switch.
2. Select all the Switch layers from top to bottom and drag them into the empty Group. Now you can edit the artwork in reference with the other Switch drawings.
3. When you're done, drag the layers back to the Switch. (You can delete the empty group now.)

That might not seem like a big deal but what's cool is that Moho will remember any keyframes you may have previously set for the Switch. It will also remember any Smart Bone Actions you've set up for the Switch without breaking. Be aware that this assumes you have not added or deleted any layers while the layers were dragged out.

@Hayasidist, thanks for the tip about Alexandra's Magnet tool. I'll check out script out. It sounds like it can be very useful and, yeah, it sounds like it could be a foundation for other multi-layer tools. (But being a novice scripter, I'll probably have to leave that to the experts.) :)
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Selecting points/shapes across vector layers

Post by hayasidist »

Greenlaw wrote:thanks for the tip about Alexandra's Magnet tool. I'll check out script out. It sounds like it can be very useful and, yeah, it sounds like it could be a foundation for other multi-layer tools. (But being a novice scripter, I'll probably have to leave that to the experts.)


Could be something that Alexandra might like to consider by way of enhancement! I can see a clear use for such as move/scale all / or other logical groupings that exist across layers. Not so clear to me the ergonomics of (say) needing to select the points in each target layer before doing a "consolidated transform".

For a switch group - the tool could easily access every (vector) child layer irrespective of whether it's the active one or not - but if the switch children are groups that would make life a bit more difficult. The challenge in any event is visualising what's happened on the non-active children.

Thinking out loud maybe a "do the last operation again on the now selected item" might be useful?????
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selecting points/shapes across vector layers

Post by Greenlaw »

Re: Switch layer, what I really want is a way to disable a Switch layer so it temporarily behaves as a regular layer. This would make it easier to edit, say, various mouth shapes in a Switch layer in relation to each other. Then, when I'm done editing, I can re-enable the Switch layer.

I've made this request to the devs a couple of times over the years because it's something I'd use all the time. In the meantime, I do the drag-to-an-empty-group-edit-and-the-go-back trick described earlier, but that: a. is clunky, b. has some technical limitations and, c. has potential to really mess up a Smart Bones Action or existing animations if I'm not careful.

It would be great if there was a Right-Click menu option for the Switch layer to disable 'Switch Mode'. So much simpler and less chance of breaking things.
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Selecting points/shapes across vector layers

Post by synthsin75 »

Greenlaw wrote:Re: Switch layer, what I really want is a way to disable a Switch layer so it temporarily behaves as a regular layer. This would make it easier to edit, say, various mouth shapes in a Switch layer in relation to each other. Then, when I'm done editing, I can re-enable the Switch layer.

I've made this request to the devs a couple of times over the years because it's something I'd use all the time. In the meantime, I do the drag-to-an-empty-group-edit-and-the-go-back trick described earlier, but that: a. is clunky, b. has some technical limitations and, c. has potential to really mess up a Smart Bones Action or existing animations if I'm not careful.

It would be great if there was a Right-Click menu option for the Switch layer to disable 'Switch Mode'. So much simpler and less chance of breaking things.
A script could do all that for you, to help avoid any user error. Create group and move layers, and then restore layers to the switch and delete the group.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selecting points/shapes across vector layers

Post by Greenlaw »

Thanks for the suggestion, Wes.

Do you recommend Autohotkey or Lua for that? If AH, that might be a good second project for me to retain what I've been learning. If Lua, maybe a good first project for me?

D.
mrc
Posts: 116
Joined: Wed Feb 14, 2018 10:36 am
Location: Berlin, Germany
Contact:

Re: Selecting points/shapes across vector layers

Post by mrc »

hayasidist wrote: Thinking out loud maybe a "do the last operation again on the now selected item" might be useful?????
Yes, that would be very helpful. Would be a case for a script, right?

Marc
You don't agree with the post above? Click here.
www.tricklabor.com/en
User avatar
synthsin75
Posts: 9935
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Selecting points/shapes across vector layers

Post by synthsin75 »

Greenlaw wrote:Thanks for the suggestion, Wes.

Do you recommend Autohotkey or Lua for that? If AH, that might be a good second project for me to retain what I've been learning. If Lua, maybe a good first project for me?

D.
Lua can do all that. No need for anything external. It would probably be about as straight forward a Lua script as you could ask for to start learning. Just let me know if you need pointers to which Moho scripting commands would be needed, or even some pseudo-code.
User avatar
Greenlaw
Posts: 9192
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Selecting points/shapes across vector layers

Post by Greenlaw »

Thanks! I'll take you up on the offer. :)
User avatar
hayasidist
Posts: 3492
Joined: Wed Feb 16, 2011 8:12 pm
Location: Kent, England

Re: Selecting points/shapes across vector layers

Post by hayasidist »

Greenlaw wrote:Re: Switch layer, what I really want is a way to disable a Switch layer so it temporarily behaves as a regular layer.
It's just occurred to me that a switch layer on FRAME 0 could behave not as a switch but as a Group - i.e. child layer selection only occurs in the timeline? I think it would need a way to edit just one layer with a mechanism to keep all the others invisible (e.g. in the same way that PS allows show/hide all other layers)?

IOW - frame 0: switch layer has all child layers visible and (e.g.) right click a child to get options to: make all child layers visible; make this visible and all other not visible. (That could actually be useful in any group !?) If there's support I'll log it as an enhancement request.
Post Reply