Page 1 of 2

Is there a select layer by shape script?

Posted: Wed May 25, 2022 2:03 am
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

Re: Is there a select layer by shape script?

Posted: Wed May 25, 2022 2:07 am
by synthsin75
The native Layer Selector tools does that.

Also alt+right-click.

Re: Is there a select layer by shape script?

Posted: Wed May 25, 2022 2:10 am
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

Re: Is there a select layer by shape script?

Posted: Wed May 25, 2022 2:40 am
by synthsin75
Yeah, pull and push shape properties is a lot faster than copy/paste.

Re: Is there a select layer by shape script?

Posted: Thu May 26, 2022 12:32 pm
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!

Re: Is there a select layer by shape script?

Posted: Thu May 26, 2022 12:51 pm
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

Re: Is there a select layer by shape script?

Posted: Thu May 26, 2022 3:11 pm
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.

Re: Is there a select layer by shape script?

Posted: Thu May 26, 2022 5:52 pm
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.

Re: Is there a select layer by shape script?

Posted: Thu May 26, 2022 8:24 pm
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.

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 12:38 am
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

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 2:12 am
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.

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 2:31 am
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.

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 12:57 pm
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.

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 4:14 pm
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.

Re: Is there a select layer by shape script?

Posted: Fri May 27, 2022 4:19 pm
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.