Community
3ds Max Programming
Welcome to Autodesk’s 3ds Max Forums. Share your knowledge, ask questions, and explore popular 3ds Max SDK, Maxscript and Python topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Multi Selection with interval

1 REPLY 1
SOLVED
Reply
Message 1 of 2
yewanshangdahai
374 Views, 1 Reply

Multi Selection with interval

Hi, I want to select many edges with a fixed interval instead of 1, how do I do this? I certainly don't want type them all. Thank you so much!\

i.e.

$.EditablePoly.SetSelection #Edge #{1437, 1439, 1441, 1443}

But instead of typing them all, I want something like this:

$.EditablePoly.SetSelection #Edge #{1437..2..1443}

But I don't know how to write it in the right way.

1 REPLY 1
Message 2 of 2

I don't think the built in "ranges" can deal with that - you would probably have to deal with it manually. Assuming the object is an Editbale Poly then
(
edgeSel = $.getSelection #Edge
for i = 1437 to 1443 by 2 do edgeSel[i] = true
$.setSelection #Edge edgeSel
)
Not necessarily the best way to do it, but probably the easiest to understand. If you need to do this a lot then turn it into a function which you can call with different parameters.

Max 2016 (SP1/EXT1)
Win7Pro x64 (SP1). i5-3570K @ 4.4GHz, 8Gb Ram, DX11.
nVidia GTX760 (2GB) (Driver 430.86).

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report