setFaceSelection in a multi object modifier instance?

setFaceSelection in a multi object modifier instance?

remainz
Advocate Advocate
462 Views
1 Reply
Message 1 of 2

setFaceSelection in a multi object modifier instance?

remainz
Advocate
Advocate

HI Im stuck trying to apply a modifer to faces by index. Im sure its simple but all the documentation assumes I only have one object selected.

 

I have 320 objects with a mesh select applied. I need to select all face #1 in this modifier so I can add more modifier only to the first face. I can of course easily but painfully so it by hand.

 

thanks remainz 

0 Likes
463 Views
1 Reply
Reply (1)
Message 2 of 2

Swordslayer
Advisor
Advisor

You have to set it for each object separately:

 

(
	local boxes = for i = 1 to 5 collect box prefix:#test width:10 length:10 height:10 pos:[i*15,0,0]
	local meshSelectMod = MeshSelect()
	addModifier boxes meshSelectMod
	for obj in boxes where isKindOf obj Editable_mesh do setFaceSelection obj meshSelectMod #{1}
	setCommandPanelTaskMode #modify
	select boxes
	subObjectLevel = 4
)
0 Likes