Skip to content

Instantly share code, notes, and snippets.

@heiths
Last active December 20, 2015 05:49
Show Gist options
  • Save heiths/6081091 to your computer and use it in GitHub Desktop.
Save heiths/6081091 to your computer and use it in GitHub Desktop.
pymel vert selection example
from pymel.core import *
ball = polySphere()[0]
bs = ball.getShape()
#Basic selection
select([i for i in bs.vtx if i.getPosition().y >= 0])
#more interesting things:
vtxList = [i.getPosition() for i in bs.vtx if i.getPosition().y >= 0 and i.getPosition().x % 3 == 0 or i.getPosition().y % 3 == 0]
curve(ep=vtxList)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment