acoolrocket

Blender - Area Light Size of Multiple Area Lights

Aug 9th, 2024
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 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
  9. if obj.type == 'LIGHT':
  10. # Multiply the radius size by 2
  11. light_data = obj.data
  12. light_data.shadow_soft_size *= 2
  13.  
  14. # Alternatively, if you want to scale the size for area lights, you can do:
  15. if light_data.type == 'AREA':
  16. light_data.size *= 2
  17. light_data.size_y *= 2 # If using rectangular area lights
  18.  
  19. # Update the scene to reflect the changes
  20. bpy.context.view_layer.update()
Advertisement
Add Comment
Please, Sign In to add comment