acoolrocket

Blender - Light Radius Size of Multiple Lights

Aug 9th, 2024
19
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. # Multiply the radius size (shadow_soft_size) by 2
  11. obj.data.shadow_soft_size /= 71
  12.  
  13. # Update the scene to reflect the changes
  14. bpy.context.view_layer.update()
Advertisement
Add Comment
Please, Sign In to add comment