ScriptSpot

Forum topic · General Scripting

layer filter select

By dussla · 2012-09-05

Description

always thank you for good answer
i have problem also today

that is layer filter select

i have many layer
( ss-dddd , ss-see , ss-3322 dd-ewww dd-3eee)

i would like to select layer's objects having ( ss-*) layer named

can you understand ?

Comments (6)

if selection.count==1 do

fajar · 2012-09-05

if selection.count==1 do select(for i in objects where i.layer==$.layer collect i)

Hi fajar

barigazy · 2012-09-05

your method only select all object i one (selection) layer.
i think that dussla want to select all objects with "ss-*" layer name.

Try this

barigazy · 2012-09-05


select (for o in objects where matchPattern (o.layer.name) pattern:"ss-*" collect o)

kimarotta · 2012-09-05

matchPattern --- good skill.
=]

I'll start using it.

thanks.

Selecting by layer property

sicolet · 2013-01-11

I am trying to select objects in layers that have a portion of a name and only objects on the layers that are not frozen. The below script works for selecting all of the frozen objects. How do I select the unfrozen objects?

select (for o in objects where matchPattern (o.layer.name) pattern:"*SS Hor*" and (o.layer.isFrozen) collect o)

use this code

barigazy · 2013-01-11


select (for o in objects where matchPattern (o.layer.name) pattern:"*SS Hor*" and not o.isFrozen collect o)