Guest User

Untitled

a guest
Oct 19th, 2017
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.48 KB | None | 0 0
  1. import bpy
  2.  
  3. for lamp in bpy.data.lamps:
  4.     print('+++ begin +++')
  5.  
  6.     print('name = ', lamp.name)
  7.     print('type = ', lamp.type)
  8.     if lamp.type == 'POINT':
  9.         scale_vector = bpy.data.objects[lamp.name].scale.copy()
  10.         print('scale = ', scale_vector)
  11.         scale_vector[0] = 1/scale_vector[0]
  12.         scale_vector[1] = 1/scale_vector[2]
  13.         scale_vector[2] = 1/scale_vector[2]
  14.         print('normalized scale = ', scale_vector)
  15.  
  16.     print('+++ end +++\n')
Add Comment
Please, Sign In to add comment