View Full Version : Question about patchOp

09 September 2003, 04:26 AM
Hey guys,

I'm trying to delete selected vertices on a patch model using maxscript. This is a sample of the code I'm using:

modPanel.setCurrentObject $Mesh
subObjectLevel = 1
$Mesh.selectedVerts = #(2, 3, 4, 5, 6, 7)
patchOps.delete $Mesh
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?

CGTalk Moderation
01 January 2006, 04:00 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.