Traverse Surface Selection Sets?
Esemwy
Posts: 578
Anybody know of a way to traverse surface selection sets or determine what sets a material is in?
I created an ugly way to do it with G3F, but I'd like something a bit more elegant.
var aTemplates = Array( Array("Face", "Lips", "Ears", "EyeSocket"), Array("Torso"), Array("Toenails", "Legs"), Array("Fingernails", "Arms"), Array("Teeth", "Mouth"), Array("Eyelashes"), Array("Cornea", "Pupils", "Sclera", "Irises"), Array("EyeMoisture"));function getTemplate(mat) { var nTemplates = aTemplates.length; for (var i = 0; i < nTemplates; i++) { if ( aTemplates[i].indexOf(mat.name) >= 0 ) { return "Template %1".arg(i+1); } } return false;}//...
Thanks!
Comments
The class you need is called: DzMaterialSelectionSet
It is on DzShape. Neglecting error handling, here's a simple example that prints out their hierarchy.
Exactly what I was after. Thanks so much!