Hello, I am trying to figure out how to build an array with faces that have a particular material assigned to it. I have found bit of info here and there, and this is what i came up with. string $matchingFaces[]; //this will be used later to select facesConvertSelectionToFaces; // just select all the faces of the…
isnt that going to select All the meshes in my scene that use the materials? I just want to have one mesh selected and be able to quickly select faces by material. Thats why i was going the long route. I dont want to have to select a lot other objects and deselct their faces. Just the one i have selected.
in python import maya.cmds as mc # select object or face b = mc.ls(sl=1)[0].split("[")[0] # remember a token for comparison below mc.hyperShade(smn=1) # that will select the shader s = mc.ls(sl=1)[0] # remember the selected shader sg = mc.listConnections(s+".oc", s=0, d=1)[0] # figure out the shading group # select the…