...
You may also render selected objects by choosing the option from the Maya Render View, Windows > Rendering Editors > Render View > Render > Render Selected Objects Only, or by toggling a mel shelf button using this mel command: switchSelectObj;
Alternatively you can specify on and off buttons using: optionVar -iv "renderViewRenderSelectedObj" 0; Where 0 is off and 1 is on.