Notifications
Clear all

[Closed] Maxscript Detach Poly Face

 em3

Hi, I have a pretty simple script for detaching the selected face of a poly. When I run it, I get this error

>> MAXScript Rollout Handler Exception: – Unable to convert: #{5} to type: Integer <<

How do I make myPoly an integer?

Thanks!

  on _Detach02 pressed do
		(	
			myPoly = polyop.getFaceSelection	$
			$.EditablePoly.SetSelection #Face #{myPoly}
			$.EditablePoly.detachToElement #Face keepOriginal:off
		)
1 Reply
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

polyop.getFaceSelection returns bitarray, EditablePoly.SetSelection requires bitarray. So you don’t need to cast it to integer.
But I don’t understand why you reselect already selected.