ScriptSpot

Forum topic · Scripts Wanted

Select object by name

By satzshqipe · 2019-02-07

Description

Hi everyone. I need a script to select an object with keyword. If Obj1, Obj2, Obj3,Obj39, Mesh2, Mesh2, Pace1, pace2

I need to select object which has only with Obj and mesh (User needs to enter)

kindly help me in this regards

Sample I used

d = ($'*obj*')

for n in d collect n.name

select d

but I need to add multiple keywords

Comments (1)

.

miauu · 2019-02-16


(
	strArr = #("obj*", "mesh*")
	objsToSelArr = #()
	for str in strArr do
	(
		for o in objects where matchPattern o.name pattern:str do 
			append objsToSelArr o			
	)
	select objsToSelArr
)