Is there a select layer by shape script?

General Moho topics.

Moderators: Víctor Paredes, Belgarath, slowtiger

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

Is there a select layer by shape script?

Post by DK »

Hi.
It's probably a long shot but I wondered if anyone knew if there was a script that allows you to select a layer by clicking on a shape?

Cheers
D.K
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Is there a select layer by shape script?

Post by synthsin75 »

The native Layer Selector tools does that.

Also alt+right-click.
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Is there a select layer by shape script?

Post by DK »

Hi Wes.
Thanks for that! I had no idea of that toolbut it's helped immensely.
I also found the "Click Shape To Select Properties" function :)

Cheers
D.K
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Is there a select layer by shape script?

Post by synthsin75 »

Yeah, pull and push shape properties is a lot faster than copy/paste.
User avatar
EricTheFish
Posts: 91
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Is there a select layer by shape script?

Post by EricTheFish »

Hi all,
@ DK, what do you mean by finding the "Click Shape To Select Properties" function. I've tried clicking shapes and not discovered anything new. :(
@ Wes, what exactly is "pull and push shape properties"? Could you please explain a little further?

This sound interesting!
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
User avatar
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Is there a select layer by shape script?

Post by DK »

Using select shape tool.
If you have a shape, you can change it's attributes to another shapes attributes by clicking it, hold "L" key and select the other shape. The selected shape will take on the other shapes attributes.

Cheers
D.K
Daxel
Posts: 1088
Joined: Wed Mar 27, 2019 8:34 pm

Re: Is there a select layer by shape script?

Post by Daxel »

It was a little bit confusing to me at the begginig, so this is translated from my notes:

With the select shape tool :

Hold ctrl to copy the style of any shape from any layer. The style is copied to the current style (the one shown on the style panel): if you had a shape selected, the copied style will be applied to this shape. If you had a style saved as "skin" opened on the style panel, it will be copied to that "skin" style.

Hold ctrl alt to apply the current style to shapes you click, only to shapes of the current selected layer.

With the eyedropper tool :

It's really the same, since the hold ctrl function in the Select Shape tool just temporarily calls the eyedropper.

Clicking will copy the style of any shape to the current style (a selected shape or the selected style in the style panel).

Alt click will copy the current style to the clicked shape.
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Is there a select layer by shape script?

Post by Greenlaw »

DK wrote: Thu May 26, 2022 12:51 pm If you have a shape, you can change it's attributes to another shapes attributes by clicking it, hold "L" key and select the other shape.
L is actually the short cut for the Eyedropper tool. Holding down L switches to Eyedropper temporarily until you release the key.

In fact, pressing and holding down any single-key tool shortcut activates that tool temporarily. For example, if you currently have Manipulate Bone selected, press-and-hold T will switch to Transform Bone, then releasing it will automatically switch back to Manipulate Bone. This is handy when you need to quickly edit scale but wish to keep using Manipulate Bone to edit with IK. Or vice versa: you prefer using Transform Bone but need to quickly edit with IK and wish to keep using Transform Bone, in which case Press-and-Hold Z to temporarily switch to Manipulate Bone.

Realistically, the above scenarios aren't the best practices for animating a complicated character rig because performance can be really slow while you Press-and-Hold a shortcut key. But I think these techniques illustrate the idea of using Press-and-Hold well, and they should work fine with simpler rigs.
User avatar
lucasfranca
Posts: 180
Joined: Sat Oct 07, 2017 11:47 pm

Re: Is there a select layer by shape script?

Post by lucasfranca »

Greenlaw wrote: Thu May 26, 2022 5:52 pm
DK wrote: Thu May 26, 2022 12:51 pm If you have a shape, you can change it's attributes to another shapes attributes by clicking it, hold "L" key and select the other shape.
In fact, pressing and holding down any single-key tool shortcut activates that tool temporarily. For example, if you currently have Manipulate Bone selected, press-and-hold T will switch to Transform Bone, then releasing it will automatically switch back to Manipulate Bone. This is handy when you need to quickly edit scale but wish to keep using Manipulate Bone to edit with IK. Or vice versa: you prefer using Transform Bone but need to quickly edit with IK and wish to keep using Transform Bone, in which case Press-and-Hold Z to temporarily switch to Manipulate Bone.

Wooow! Wooow! I did not know that! This is really cool and practical for me.
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
DK
Posts: 2896
Joined: Mon Aug 09, 2004 6:06 am
Location: Australia

Re: Is there a select layer by shape script?

Post by DK »

Greenlaw.If I have three objects on screen on the one layer. I select
the "Select Shape" tool, select a shape and press "L" and I get this:
EDIT: Sorry yes this is the eyedropper tool. I am currently exploring
shortcuts for a project and it is an eye opening experience.

Image

D.K
User avatar
synthsin75
Posts: 10280
Joined: Mon Jan 14, 2008 11:20 pm
Location: Oklahoma
Contact:

Re: Is there a select layer by shape script?

Post by synthsin75 »

Daxel explained it, but here's the push/pull terminology:

If you have a shape selected and hold ctrl to click another, you're pulling the style from that shape to the selected one.
If you have a shape selected and hold ctrl+alt to click another one, you're pushing the selected shape's style to the other one.
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Is there a select layer by shape script?

Post by Greenlaw »

I was just about to write what Wes wrote but he beat me to it...again. 😸

Oh well, here's a suggestion anyway: try disabling Checker Selection in the Style Window. For me, Checker Selection makes it difficult to tell which color I've applied. When this is switched off, I can see my chosen color on the shape and I can still tell which shape is selected by its red bounding box.
Last edited by Greenlaw on Fri May 27, 2022 4:11 pm, edited 1 time in total.
User avatar
EricTheFish
Posts: 91
Joined: Thu Jun 15, 2017 4:37 pm
Location: Lymm, UK

Re: Is there a select layer by shape script?

Post by EricTheFish »

Wow, every day's a school day! I hadn't quite realised these various style copy/apply methods.
During experimentation, I noticed that whilst fill and stroke properties get copied between shapes, if the target shape has fill or stroke disabled, this condition does not change.
Unless I missed something, you need to manually enable them on the target shape if desired.

Thanks all for the great advice.
EricTheFish
Artist, musician, animator, coder and dabbler in stuff
www.tech-nique.co.uk
Daxel
Posts: 1088
Joined: Wed Mar 27, 2019 8:34 pm

Re: Is there a select layer by shape script?

Post by Daxel »

EricTheFish wrote: Fri May 27, 2022 12:57 pm Wow, every day's a school day! I hadn't quite realised these various style copy/apply methods.
During experimentation, I noticed that whilst fill and stroke properties get copied between shapes, if the target shape has fill or stroke disabled, this condition does not change.
Unless I missed something, you need to manually enable them on the target shape if desired.

Thanks all for the great advice.
That's correct. I think this is intended, as you may want to apply a style to a bunch of different shapes, some of them strokes, some only fills, some with fills and strokes, without changing the shapes but only their colors and effects. It's like the presence of a fill or a stroke is something more relative to the shape creation process than its styling, and it's only present in the style panel for convenience. Some shapes can't even have a fill once created anyway, if their points are not closed.
User avatar
Greenlaw
Posts: 10466
Joined: Mon Jun 19, 2006 5:45 pm
Location: Los Angeles
Contact:

Re: Is there a select layer by shape script?

Post by Greenlaw »

EricTheFish wrote: Fri May 27, 2022 12:57 pm During experimentation, I noticed that whilst fill and stroke properties get copied between shapes, if the target shape has fill or stroke disabled, this condition does not change.
Unless I missed something, you need to manually enable them on the target shape if desired.
No, that property doesn't copy over, and it's probably because Stroke shapes and Fill shapes are not actually properties but are separately created objects. In fact, a curve can have multiple stacked stroke shapes and fill shapes...or only fill shapes or only stroke shapes...or no shapes at all.

For example, if a shape doesn't have a stroke, it's because it hasn't been created yet. You can't paste a color or texture into something that doesn't exist yet. Once it's been created, you can hide it and unhide it of course.
Post Reply