This script create a Render layer with the objects selected.
then create a surface shader wich allow u to mask in post.
In the .rar file u'll find 2 .mel files for the version of maya u use (2k8 and 2k9)
For a quick tutorial see on
youTube Thx to Reggie Fourmyle (ReggieFourmyle.com) for the dirt job +___+
t0m0
r.varett@gmail.com
i've recognised that u have to run 2 times to make run correctly (it's still a beta :)
.