acoolrocket

Blender - Light Radius Size of Multiple Lights to 0.03

Jul 11th, 2026
23
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. import bpy
  2.  
  3. # Get the selected objects
  4. selected_objects = bpy.context.selected_objects
  5.  
  6. # Iterate through the selected objects
  7. for obj in selected_objects:
  8. # Check if the object is a light and is either POINT or SPOT type
  9. if obj.type == 'LIGHT' and obj.data.type in {'POINT', 'SPOT'}:
  10. # Set the radius size (shadow_soft_size) to exactly 0.03
  11. obj.data.shadow_soft_size = 0.03
  12.  
  13. # Update the scene to reflect the changes
  14. bpy.context.view_layer.update()
Advertisement
Add Comment
Please, Sign In to add comment