Skip to content

Commit

Permalink
fix: lavavu.camera bug when keys are missing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lachlan Grose committed Jul 20, 2022
1 parent ff91507 commit b554c3c
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions LoopStructural/visualisation/lavavu.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from pyrsistent import v
from .model_plotter import BaseModelPlotter
from LoopStructural.utils import getLogger
from LoopStructural.utils import LoopImportError
Expand Down Expand Up @@ -409,6 +410,12 @@ def camera(self):

@camera.setter
def camera(self, camera):
# for some reason lavavu complains if the keys
# attributes aren't already in the dict, so add them and then
# call camera
for key, value in camera.items():
self.lv[key] = value

self.lv.camera(camera)

@property
Expand Down

0 comments on commit b554c3c

Please sign in to comment.