[Closed] How to automate changing from Editable Poly to Editable Mesh?
It sounds like you’re beyond wanting to use denisT’s code, but since I’m just sitting here watching a progressbar for a bit, I’ll try to walk through it some and elaborate what I can. This is also helpful for me to try and understand, as I’m not at expert level with this stuff either.
denisT’s code is two overall pieces. 1) A function definition and 2)a single line that calls that function.
He referenced it as a mapped function, which the help file page explains in detail what it does. We know it’s a mapped function because the definition syntax fn functionNameHere = () begins with the keyword mapped in his code. So that means we can supply it an array of objects, and it will automatically iterate over that array. Looking at that syntax, the function’s name is “_turntomesh” and it uses a parameter which he called “node”. Again, since this is a mapped function, that parameter becomes a variable which the function’s inner code will use to reference the current element from the array that is passed to it.
The “geometry” keyword is an object set, as mentioned in the help, as is just an array of every geometry object in the scene. In this case that is the array that is passed to our mapped function. If you don’t want everything, just change that line so it says _turntomesh selection as array, or make your own array of whatever and call the function with _turntomesh myArray.
The short version of what his function actually does, is puts a turn to mesh modifier underneath the skin modifier and then does a ‘collapseTo’ to that modifier. that’s the for loop part. The if statement after that says if there isn’t a skin modifier and it’s not already an edit mesh, and it is an object type that can be converted to an edit mesh, then convert it.
Hope that helps.