No direct experience, but a friend of mine had his hips replaced and (although he is not very athletic) he is getting around just fine. Also, my BJJ coach tore a knee ligament (I was there when it happened), had replacement surgery and is doing fine.
I don't buy into all the positive thinking nonsense but IMHO (and experience) your attitude after the surgery is important. The surgery was needed and you are better off with it.
It may take time. You may have to adapt your training. There may techniques you won't be able to do now, but as your body recovers, you may be able to do later. Don't self impose any limitations - make the doc tell you to slow down.