I find myself spending a tremendous amount of time preparing my models for export into substance painter. It seems like a macro and or script would be able to do this no problem. Unfortunately my Python skills are non existent, but I would love to learn. My process is fairly straight forward.
I select an object / mesh that has multiple components in Object Mode. Then switch to Edit Mode.
Select a pieces verts using L.
Switch to Vertex Paint Mode making sure Face selection masking for painting is on.
Select a random color and hit Shift + K to fill selection with color.
This allows me to generate an ID map within substance painter. It is the quickest way I've found to generate these maps for texturing.
My searches have brought up random vert colorization, but nothing like what I'm describing. Maybe I'm using the wrong terminology?
Any help with this would be greatly appreciated!