Oh, I did not realize you wanted to paint the roof, I thought your molding was torn or something along those lines. what you need to do is rope off the glass molding and tape it back to the glass..
here is a pretty good video of how to do it. you can get tape like this at any local paint store. just make sure you sand the panel under the molding when you get it taped back or the clear will peel down the road. either that or like 1fast turbo said, wrap the roof.