Is the standard here just having a load of loose materials and then doing face selections and applying the mat that way?
And in working with those materials and their faces you have to create selection sets matching the those face selections to act as a pseudo select by ID function?
If that is indeed the case do Maya users have a go to script or something to replicate a multisubobj mats and matIDs?
I skipped trying selection sets as I was still modelling and wasn't sure of the entire array of materials I was going to need for the project, and didn't know if selection sets break if you modify the geometry (do they go ballistic if you cut into the geo?). I didn't want to waste time doing them as I'm a Maya noob, but I probably wasted some time remapping faces to different mats as it took shape about 4 times.
Replies
Everything moving to USD is not making that better. USD is able to store per Face data but i wont recommend that.
To select faces on a single object with a specific material assigned you need to go through every material and every face in the scene and then filter out the ones on the object you're interested in.
This makes it really, really slow so any script you write is a bad one. I did consider trying it with openMaya but never bothered actually doing it.
The short answer is no, avoid getting into this situation
Selection sets are pretty useless since faces get new IDs if you make mesh edits that affect face/vertex count
import maya.cmds as mc
b = mc.ls(sl=1)[0].split("[")[0]
mc.hyperShade(smn=1)
s = mc.ls(sl=1)[0]
sg = mc.listConnections(s+".oc", s=0, d=1)[0]
l = []
for o in mc.sets(sg, q=1):
if b not in o: continue
l.append(o)
mc.select(l)