PDA

View Full Version : Using deletemesh modifier


Gibbz
01-13-2009, 04:25 AM
Having a little trouble getting the deletemesh modifier to work on my selection.

My current code bellow is working if i comment out the deletemodifier it selects my mDeleteList fine but when i add the delete modifier it deletes all faces in the mesh.

Any ideas to get around this?


-- add a meshselect modifier and select faces to be deleted
max modify mode
mModifier = mesh_select()
addModifier mOptimiseMesh mModifier
select mOptimiseMesh
setFaceSelection mOptimiseMesh mModifier mDeleteList
subobjectlevel = 3

-- then add a editable mesh modifier and delete faces
mDelModifier = deletemesh()
addModifier mOptimiseMesh mDelModifier

ZeBoxx2
01-13-2009, 12:31 PM
presumably, you'll want to use this:

modPanel.addModToSelection <modifier>

Applies a modifier to the current selection opened in the Modify panel. It should be used in place of addModifier() in places where the target is a selection or group or where you have the stack open at a particular place in the Modify panel with a sub-object selection active and you want the modifier applied to that selection. addModifier() adds the modifier separately to each object in the selection or group and does not honor the current active sub-object selection in all cases. The Modify panel must be open on the selection you want to apply the modifier to, otherwise the function does nothing.

Gibbz
01-13-2009, 11:10 PM
Cheers! that worked :)

CGTalk Moderation
01-13-2009, 11:10 PM
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.