I'm trying to delete selected vertices on a patch model using maxscript. This is a sample of the code I'm using:
subObjectLevel = 1
$Mesh.selectedVerts = #(2, 3, 4, 5, 6, 7)
subObjectLevel = 0
When I open this file in max and choose "evaluate", it works and deletes the selected vertices. However, the problem I'm having is that when I "run" this script (IE I run it without opening & choosing evaluate), the patchOp.delete does not work.
I think the reason is that the patchOp operation returns twice (once when the button is pressed and another before the action is complete). Thus, the patchop is not deleting anything because after the first return, it simply goes to the next line. Is there a way around this?
Is there a way to make max wait for the patchOp to finish before moving onto the next line?