In NY, as well, if you are abusive to your wife/ significant other, they automatically are on high alert for abuse of a child.. I'm sure he'll be on high alert with a baby, and if he wants you to get an abortion (which you can't anyway, it's pretty late in the game for that) I doubt he's gonig to try to fight you for custody.
He hit you? Good for you for getting a restraining order, I'm SO sorry you have to go through that, as for rights, I can imagine having a restraining order on him from hitting you while pregnant will NOT look good in court..I would definitely get a lawyer, or a court appointed lawyer and ask him/her about it!
The restraining order would mean that he cannot come to the hospital when you deliver. As for once the baby is born you will have to go to court for a custody hearing. Odds are though that he will get some kinda custody. My ex beat me extremely had on more then one occassion and I have police reports from it. He also wanted me to have an abortion. Here in AZ when we went to court for custody they gave me sole custody but allowed him to see her 2 days a month, no over night visits and they had to be supervised. Since then AZ has changed its law and all parents have joint custody. He has never taken the time to use his parent rights though. But basically unless he hits your child you can't keep him out of the baby's life or limit visits that much.