ddg.visualization.blender.light module
- ddg.visualization.blender.light.light(name='Light', type='SUN', location=(0.0, 0.0, 0.0), collection=None, color=(1.0, 1.0, 1.0), specular=1.0, energy=10)[source]
Add a light.
- Parameters:
- namestr (default=’Light’)
Name of the created light
- typestr (default=’SUN’)
Type of the light, ‘POINT’, ‘SUN’, ‘SPOT’ or ‘AREA’
- locationIterable of three floats (default=(0., 0., 0.))
location of the light
- collectionbpy.types.collection (default=None)
Collection to link light to, If the parameter is not given or set to None the light gets linked to bpy.context.scene.collection
- colorIterable of three floats (default=(1.,1.,1.))
RGB color of the light.
- specularfloat (default=1.0)
Specular value of the light in the illumination model.
- energy: float (default=10)
Energy of the light in Watts.
- Returns:
- bpy.types.Light
- ddg.visualization.blender.light.look_at_point(bobj, point, world_up=(0, 0, 1), distance=None)[source]
Rotates light so that it points toward a given point.
See ddg.visualization.blender.object.look_at_point for full documentation.
- ddg.visualization.blender.light.clear(lights=None, do_unlink=True)[source]
Delete all given lights.
- Parameters:
- lightsIterable of bpy.type.Light (default=None)
Lights to be deleted. If the argument is not provided or None all lights will be deleted.
- do_unlinkbool (default=True)
Unlink lights from their scenes, if needed, before deleting them.
- Returns:
- None