I recently came back from a trip to Vancouver where I did and assisted on scoring a piece for film at the wonderful Bridge Studios, it was a great experience but there was something I did years ago that helped to train me to do this type of work and now I will share it will you all.
First find approximately a 2 minute scene of your favorite movie but be sure it is a majestic type scene, love scene, maybe showing nice landscape etc.. but soft...then turn off the sound, time the piece to see how long it is and work out a draft of your music, next watch the film and try to play expressively to and along according to the visual dynamics of the film..
Work on this and you will be totally surprised, this is what got me obsessed with being a producing Bassist, go for it, sit back and critique your work and when it's right you will fall in love with your Bass all over again..Please try this you won't regret it.
you might be a little frustrated at first but trust me it will come to you. Thus you will make a big step towards playing Melodically. enjoy brothers..John