MeshPaint module extended functionality

I’m trying to extend standart mesh paint module functionality, so that you can add a mask to the brush. Its basically just like photoshop brush, but inside unreal. I have encountered a probem with not being able to access the process of painting itself. It’s probably сoncealed inside a FBachetElements class. Can anyone point me in direction where I can interfere with painting process to achieve my goal?