0
$\begingroup$
  • I'm using this script.
  • Always(...) + Python (Script) = Nothing...
  • Do I need to configure anything else?
  • List item
  • The script does not work.

    import bpy
    
    scene = bpy.context.scene
    lamp = bpy.data.lamps['Lamp']
    lamp.energy = 10000
    lamp.type = 'SPOT'
    lamp.distance = 250000
    
$\endgroup$
0
$\begingroup$

Here is a script creating what you want:

import bpy
C = bpy.context
scene = C.scene
bpy.ops.object.lamp_add(type='SPOT')
C.selected_objects[0].name = 'Lamp'
lamp = bpy.data.lamps['Lamp']
lamp.energy = 20000
lamp.distance = 250000
|improve this answer|||||
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.