PDA

View Full Version : Attaching Objects in Element Mode


mlanser
12-18-2006, 09:56 AM
Hi everyone.

I have the following Problem:

As you know, it's possible to attach objects to other objects by going to "Edit Poly", then change to Element mode and Clicking on "Attach" and then choose the Object you want to attach to the one you've already selected.

I would like to do that in MaxScript, but the following doesn't work:

select $object1
modPanel.addModToSelection (Edit_Poly ()) ui:on
subobjectLevel = 5
$.modifiers[#Edit_Poly].Attach $object2 editPolyNode:$

Any idea, what i'm doing wrong?
Thanx

erilaz
12-18-2006, 11:27 AM
Try this:



baseObject = $object1
attachObj = $object2
editPObj = convertToPoly (baseObject) -- converts your baseObject to an editable poly
editPObj.attach attachObj editPObj -- attach the second object


Look at the attach code in the help file to get more ideas.

mlanser
12-19-2006, 10:25 AM
Yeah, that's it! Thanks Man!

CGTalk Moderation
12-19-2006, 10:25 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.