if cmds.polyColorPerVertex(i, q=True, r=True)==[.456]:
I suspect a precision problem, where e.g. [0.4560001] == [0.4560002] would
return False. Try clamping it before comparing.
if map(round, cmds.polyColorPerVertex(i, q=True, r=True), [2]) ==
map(round, [0.456], [2]):
This’d compare the two val
Thats what i thought so i used the actual query value before but it still
wouldnt work. I'll try your method as well and see the results.
--
You received this message because you are subscribed to the Google Groups
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group an
I'm off work for a couple of weeks so can't verify anything, but you can do
some checks to find out the cause.
Each time through your loop, instead of using polyColorPerVertex in the if
statement, assign its result to a variable, then print it out, then use it
in the if statement. Something like:
So i've come across an interesting problem.
it seems maya can only select vertexes with color index 1.0 or 0.0. i
cannot seem to get the code to select from any ranges inbetween. I've tried
the other flags on the polyColorPerVertex and nothing seems to work.
as an example
import maya.cmds as c