cmds.polySelectConstraint(mode=3, type=0x0001, random=True,
randomratio=0.7)


On Mar 20, 4:51 pm, Ling <[email protected]> wrote:
> Hey guys:
>
>   Need some algorithm help if possible..
>
>   Say I have 1000 points in a sorted list, and I want to select a
> given portion of the points in the list, for example, 70% of it. Don't
> need to be perfectly accurate, but the 70% have to be pretty much
> evenly distributed among the 1000 points.
>
>   I am doing a step selection right now, which is something like:
>
> selectedList = []
> remain = 0
> while i < 1000:
>     step = int(1/0.7 + remain)
>     remain = 1/0.7 + remain - step
>     selectedList.append(pointsList[i])
>     i += step
>
> the step selection works, but just wonder if there is any better/
> faster solution I can borrow from you guys.
>
>   Any suggestions would be really appreciated.
>
> -ling

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to