It actually did work fine, but it wasn’t the same as photoshop’s dual brush, and in the end, my work was scrapped and replaced by masked brushes, which are a clone of photoshop’s dual brush. And no, that didn’t make happy… I’m not going to resurrect that old code in any case.