Painting landscape with weightmap

I am getting this error in 4.18