Fill Mesh Components with Random Vertex Color 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.


I usually end up with something like this..


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!
Thank you @Mr Zak, you got me pointed in the right direction. Going through the first links github, I found this... https://github.com/varkenvarken/blenderaddons/blob/master/connectedvertexcolors%20.py … It adds an option to fill each piece of the object with a random color while in vertex paint mode. Thanks!