callback script turning vray overide material at frame

HEllo,

anyone can advise on my first script? I am attempting here to render frames from animation and have the vray overide material turn on at frame 1001. It does turn the click in vray render dialog but it renders only what the current state is.

-- turn vr overide on at frame 1001

vr=renderers.current
fn turnonvrmatov =
if currenttime < 1001 then vr.options_overrideMtl_on=off else vr.options_overrideMtl_on=true
registerTimeCallback turnonvrmatov

-- to unregister use the line below
-- unregisterTimeCallback turnonvrmatov