layer filter select

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

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
fajar's picture

if selection.count==1 do

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

barigazy's picture

Hi fajar

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

barigazy

barigazy's picture

Try this


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

barigazy

kimarotta's picture

matchPattern --- good

matchPattern --- good skill.
=]

I'll start using it.

thanks.

kimarotta.com.br
3d Artist  

sicolet's picture

Selecting by layer property

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)

barigazy's picture

use this code

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

barigazy

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.