How to mask certain materials through BP

Hi, what I’m trying to do here is apply a material function (BoxMask3D) to certain materials existing in the world (I’ve tagged the actors if that would help) without editing every single material. If there’s a way to do this in blueprints, that would be great.