-
rudinie 7 posts
I'm trying to make my first own script that chamfers all edges of all selected objects but i'm having some trouble, this is what i got so far:
modPanel.addModToSelection (Edit_Poly ()) ui:on
subobjectLevel = 2
for obj in $ do
(
obj.modifiers[#Edit_Poly].SetSelection #Edge #{}
actionMan.executeAction 0 "40021" -- Selection: Select All
obj.modifiers[#Edit_Poly].SetOperation #ChamferEdge
obj.modifiers[#Edit_Poly].chamferEdgeAmount = 0.5
obj.modifiers[#Edit_Poly].Commit ()
)
the thing is it seams like for every obj in selection the select All is selecting all edges off all objects, and so all edges get chamfered multiple times.
How do i select all edges from one single object in $ ?
Or mayby i'm doing something else wrong. If anyone could point me in the right direction that would be great.
Tnx in advance.
-
hype 2,964 posts
-
ivanisavich 4,196 posts
-
rudinie 7 posts
-
ivanisavich 4,196 posts