Skip to content
Snippets Groups Projects
Commit 7ff0b59e authored by Bartek Skorupa's avatar Bartek Skorupa
Browse files

Bug fix. Lamps cone angle calculations returned error as import of pi has been...

Bug fix. Lamps cone angle calculations returned error as import of pi has been removed. Now corrected the formula to match my new convention to use 'degrees' instead of 'pi'
parent fd057f74
No related branches found
No related tags found
No related merge requests found
...@@ -504,7 +504,7 @@ def write_jsx_file(file, data, selection, include_animation, include_active_cam, ...@@ -504,7 +504,7 @@ def write_jsx_file(file, data, selection, include_animation, include_active_cam,
js_data['lights'][name_ae]['energy_static'] = energy js_data['lights'][name_ae]['energy_static'] = energy
js_data['lights'][name_ae]['color_static'] = color js_data['lights'][name_ae]['color_static'] = color
if type == 'SPOT': if type == 'SPOT':
cone_angle = '[%f],' % (ob[0].data.spot_size / pi * 180.0) cone_angle = '[%f],' % (degrees(ob[0].data.spot_size))
cone_feather = '[%f],' % (ob[0].data.spot_blend * 100.0) cone_feather = '[%f],' % (ob[0].data.spot_blend * 100.0)
js_data['lights'][name_ae]['cone_angle'] += cone_angle js_data['lights'][name_ae]['cone_angle'] += cone_angle
js_data['lights'][name_ae]['cone_feather'] += cone_feather js_data['lights'][name_ae]['cone_feather'] += cone_feather
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment