Selecting all polygon objects in the scene with a certain prefix
Hope you're all well.
So i'm relatively new to mel and have managed just fine so far copying and editing other peoples scripts and writing my own (basic ones Now i'm stuck and could really do with all your help.
I've spent a week building a scene filled with hundreds and hundreds of doors that open and close randomly. All these doors have hinges that are just to big. i want to make them smaller. Now there are thousands. SO
I want to write a script that looks through all the nodes in the scene and selects all the polygon meshes that have steelHinge in the name (all the hinges are steelHinge01, steelHinge02 and so on. The number at the end is quite random as ive deleted some and added some during the week. Nonetheless they all have a certain prefix
This is what i have at the moment, but i dont see anything selected in my viewport, and also it seems to be missing some???
// declare an array called $nodes. Call ls to list
// the nodes in the scene
$meshes = `ls -type "mesh"`;
// loop through each mesh
for( $mesh in $meshes )
// print the mesh name
$name = $mesh +"\n";