Assigning MEL Shader on Post Render

Hi, I want to assign, only at rendering a checkered shader texture to an object, then immediately revert back to the original shader that I have, but the following MEL script is not working ? I was wondering does a shader need to be applied as well ?

select -r [object]:[object]; hypershade -assign checker1 [object];

You cannot assign textures (like checker) directly to objects - you assign shaders to objects (and the texture to the shader). You would also need to use the pre render callback to assign the checker shader and also use a post render callback to restore the orignal shader

I think a more maintainable way to do this is simply to have an extra renderlayer with a checker shader override on your chosen objects

+1 to render layers. they are designed to do exactly this.

I applied a lambert shader to the render layer with default shader settings, but the object renders black ?

In a clean scene, a material override on a render layer works. In my original scene the object renders black, here is the node list to demonstrate ?