Notifications
Clear all
[Closed] System exception when attaching two objects
Apr 03, 2016 10:01 am
Hi. I’m a newbie at maxscript and I’ve got a newbie question. I’m trying to attach one object to another like this:
newObj = Selection[1]
oldObj = Selection[2]
Ep = Edit_Poly()
addModifier oldObj Ep
OldObj.Modifiers[1].attach newObj
And I’m getting system exception, I think it’s because after attaching Selection[2] will not exist. May be someone will kindly suggest a way around this?
2 Replies
1 Reply
Since, you want to work with Edit Poly modifeir:
(
newObj = Selection[1]
oldObj = Selection[2]
Ep = Edit_Poly()
addModifier oldObj Ep
--
select oldObj
max modify mode
--
OldObj.Modifiers[1].attach newObj
-- or use this
-- oldObj.modifiers[#Edit_Poly].SetOperation #Attach
-- oldObj.modifiers[#Edit_Poly].Attach newObj editPolyNode:oldObj
)