Notifications
Clear all

[Closed] Attaching with Editable Poly modifier

Hi, guys! I’m trying to attach via script one object to another, but this does not seem to work if the command is used inside a function. Here’s a little code…


 fn testAttach uno dos = 
 (
 	if uno.modifiers[1].name == "Edit Poly" do uno.modifiers[1].attach dos 	   
 )
 testAttach selection[1] selection[2]

If I execute the ‘attach’ order with the actual nodes (not inside a function) it works fine, but when scripting this inside a function, it causes a system exception.

Any help on this? Thanks!

1 Reply

Ops, it was obvious! The system exception comes because when attaching… there is not going to be any selection[2] element…

p.s.: I should get some holidays, hehehehe