Cycles: Texture Paint on Transparent Object?

Blender Version: 2.79
Renderer: Cycles
Hi. Can anyone explain how to paint on a transparent object in Cycles as shown below?
The above example is using a third party plugin, but I’d like to be able to do it natively within Blender. Thanks in advance for any help!

Ok, after playing around a bit I was able to answer my own question. Here’s a brief explanation in case anyone wants to try it for themselves:

I UV unwrapped a cylinder, and in texture paint mode set the blend to “erase alpha” to remove the existing texture(making it transparent), then changed blend to “Mix” and re-painted over the object using a custom brush. Node setup below.