Switch off the lamp in imported VRML In my VRML file, I have lights switched off. But when I render it in blender (by using the import tool), the lights are switched on.

I looked at the code:

def importLamp_PointLight(node, ancestry):
    ....
    # is_on = node.getFieldAsBool('on', True, ancestry) # TODO
    ....


As I can see in the code, lamp's is_on has not been implemented.
But I need this to work. How can I contribute to the code and make this work?

I see the this is implemented in bpy.data.lamps, but it uses C code _bpy imports types.

Thanks.
You could try uncommenting the is_on line and add something like

bpylamp.hide = not is_on
bpylamp.hide_render = not is_on


Another option could be

if is_on:
    bpylamp.energy = intensity
else:
    bpylamp.energy = 0


The X3D/VRML2 import script was written by Campbell and Bart so you might want to contact them and ask what they planned to do with the lights and whether they want some help. It's possible they left it like that because there is no on/off light switch in blender (maybe adding one is a TODO somewhere).