ScriptSpot

Forum topic · General Scripting

Break connection between vertices help

By alexmbr · 2012-04-21

Description

Hi.

I have a road mesh that loops and I need to break the connection between the two last vertices and the two first ones.

I am using this to try to do that:

subobjectLevel = 1
$.EditablePoly.SetSelection #Vertex #{1..2}
$.EditablePoly.breakVerts ()

But it is giving me this error:

-- Error occurred in anonymous codeblock; filename:file.ms; position: 3880; line: 151
-- Argument count error: breakVerts wanted 1, got 0

If I use max interface to selecte those vertices and click on the Break button it will work fine. But I need to do that with script.

Any ideas?

Thanks.

Comments (3)

alexmbr · 2012-04-21

Thanks.

Break Verts

barigazy · 2012-04-21

When you using break operation you must specify
the index of selected vert
Try this also
vc = $.numverts
$.EditablePoly.SetSelection #Vertex #{1,2,(vc-1),vc}
for v in #{1,2,(vc-1),vc} do $.EditablePoly.breakVerts v

miauu · 2012-04-21

Try with:


$.EditablePoly.breakVerts 1