xeolabs/scenejs-pycollada — Issue #8: 'module' object has no attribute 'SunLight'
Author: dejvik
Created: 2012-03-01 20:42:51+00:00
State: open

Hi,
when converting a simple COLLADA file with lights the converter fails and reports an error:

```
python scenejs-pycollada.py -o js duck.dae
Traceback (most recent call last):
File "scenejs-pycollada.py", line 169, in
main(sys.argv[1:])
File "scenejs-pycollada.py", line 135, in main
translate(serializer, collada_obj, { 'libraries_only': libraries_only }, debug, verbose)
File "/home/david/Downloads/scenejs-pycollada/translator.py", line 51, in translate
jsscene = translate_scene(scene)
File "/home/david/Downloads/scenejs-pycollada/translator.py", line 566, in translate_scene
jsrenderer['nodes'] = _translate_scene_nodes(scene.nodes)
File "/home/david/Downloads/scenejs-pycollada/translator.py", line 479, in _translate_scene_nodes
jschild_nodes = _translate_scene_nodes(node.children)
File "/home/david/Downloads/scenejs-pycollada/translator.py", line 444, in _translate_scene_nodes
elif type(node.light) is collada.light.SunLight or type(node.light) is collada.light.BoundSunLight:
AttributeError: 'module' object has no attribute 'SunLight'
```
If I remove the lights the file gets converted.
[Duck model with lights] (http://www.fi.muni.cz/~xhracho1/pycollada_issues/duck_with_lights.dae) and [without lights](http://www.fi.muni.cz/~xhracho1/pycollada_issues/duck_without_lights.dae)

scenejs-pycollada commit *da7a2c0937b696ac41d9f43dfe1e3018d3a9e0c2* Tue Nov 15 17:19:29 2011 +0200
pycollada commit *4bc5bb51820ddab8363b807daa7f4feb1aa9c746* Wed Jun 8 19:08:19 2011 -0400
They should be the latest versions.