Thank you so much! It worked! On Wednesday, December 19, 2018 at 2:05:37 PM UTC-8, Michael Boon wrote: > > polyColorPerVertex returns a value, so you need to compare that to 0.5. > You'll want something like: > for v in vertexList: > if cmds.polyColorPerVertex(v, q=True, r=True) == [0.5]: > cmds.select(v, add=True) > > Also, polyColorPerVertex gives a RuntimeError sometimes, I think when the > vertex has no color, so you'll want to handle that too. > > On Thursday, 20 December 2018 06:36:25 UTC+11, James Kim wrote: >> >> Hi there, >> I'm trying to figure out how to select a vertex based off its color value. >> so far this is what i have but >> >> vNum = cmds.polyEvaluate(v=True) >> vertexList = cmds.ls('pCube1.vtx[:]',flatten=True) >> >> >> for i in vertexList: >> if cmds.polyColorPerVertex(r=0.5): >> cmds.select(i) >> >> any suggestions? Thank you >> >
-- You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group. To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_maya+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/872ab3d0-20ca-4643-89ab-55264de6b539%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.