Changeset View
Changeset View
Standalone View
Standalone View
render_povray/primitives.py
| Show First 20 Lines • Show All 1,046 Lines • ▼ Show 20 Lines | |||||
| class POVRAY_OT_rainbow_add(bpy.types.Operator): | class POVRAY_OT_rainbow_add(bpy.types.Operator): | ||||
| bl_idname = "pov.addrainbow" | bl_idname = "pov.addrainbow" | ||||
| bl_label = "Rainbow" | bl_label = "Rainbow" | ||||
| bl_description = "Add Rainbow" | bl_description = "Add Rainbow" | ||||
| bl_options = {'REGISTER', 'UNDO'} | bl_options = {'REGISTER', 'UNDO'} | ||||
| def execute(self,context): | def execute(self,context): | ||||
| cam = context.scene.camera | cam = context.scene.camera | ||||
| bpy.ops.object.lamp_add(type='SPOT', radius=1) | bpy.ops.object.light_add(type='SPOT', radius=1) | ||||
| ob = context.object | ob = context.object | ||||
| ob.data.show_cone = False | ob.data.show_cone = False | ||||
| ob.data.spot_blend = 0.5 | ob.data.spot_blend = 0.5 | ||||
| ob.data.shadow_buffer_clip_end = 0 | ob.data.shadow_buffer_clip_end = 0 | ||||
| ob.data.shadow_buffer_clip_start = 4*cam.location.length | ob.data.shadow_buffer_clip_start = 4*cam.location.length | ||||
| ob.data.distance = cam.location.length | ob.data.distance = cam.location.length | ||||
| ob.data.energy = 0 | ob.data.energy = 0 | ||||
| ob.name = ob.data.name = "PovRainbow" | ob.name = ob.data.name = "PovRainbow" | ||||
| ▲ Show 20 Lines • Show All 854 Lines • Show Last 20 Lines | |||||