regcs / AliceLG

A Blender add-on for the use of Blender with the Looking Glass holographic displays.
GNU General Public License v3.0
103 stars 23 forks source link

[Camera] If no camera is selected several exceptions are caused #70

Closed regcs closed 2 years ago

regcs commented 2 years ago

When no camera is selected in the add-on settings, this causes an exception:

Traceback (most recent call last):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\AliceLG-master\lightfield_viewport.py", line 333, in modal
    self.render_view(context)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\AliceLG-master\lightfield_viewport.py", line 845, in render_view
    LookingGlassAddon.update_lightfield_window(-1, None)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\AliceLG-master\globals.py", line 274, in update_lightfield_window
    device.display(None)
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\AliceLG-master/lib\pylightio\lookingglass\devices.py", line 78, in display
    if self.service.display(self, lightfield, flip_views=flip_views, aspect=aspect, invert=invert, custom_decoder=custom_decoder):
  File "C:\Users\user\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\AliceLG-master/lib\pylightio\lookingglass\services.py", line 247, in display
    logger.debug(" [#] Sending request and waiting for response took %.3f s." % (time.time() - start))
UnboundLocalError: local variable 'start' referenced before assignment