From: Fabrice T. <fab...@in...> - 2005-12-04 16:54:03
|
Hello, I think I have found a little bug in povexport code. When an object with a bad class is found (faces, etc...), the script print a warning on the output, but the name of the class (obj_name) seems not to be correctly updated : 424: for obj in display.objects: 425: key = obj.__class__ 426: if legal.has_key(key): 427: obj_name = legal[key] 428: if obj_name != 'frame': 429: function_name = 'export_' + obj_name 430: function = globals().get(function_name) 431: object_code = function(obj) 432: file.write( object_code ) 433: else: 434: print 'WARNING: export function for ' + obj_name + ' not implemented' causing bugs like that : Traceback (most recent call last): File "C:\...\test.py", line 37, in -toplevel- povexport.export(display=scene, include_list = inclist) File "C:\...\povexport.py", line 396, in export print 'WARNING: export function for ' + obj_name + ' not implemented' UnboundLocalError: local variable 'obj_name' referenced before assignment |