Skip to content

Commit

Permalink
dict-based animations won't update when headless #451
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-trzesiok committed Jul 3, 2024
1 parent 2316b13 commit 059cf8d
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions k3d/headless.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,12 @@ def generate():
sync = True # todo
else:
try:
if isinstance(o[p], np.ndarray) and o[p].shape == () and \
isinstance(self.synced_objects[o.id][p], np.ndarray) and \
self.synced_objects[o.id][p].shape == ():
sync = False
else:
sync = (o[p] != self.synced_objects[o.id][p]).any()
except Exception:
try:
sync = o[p].shape != self.synced_objects[o.id][p].shape
except Exception:
sync = not deep_compare(o[p], self.synced_objects[o.id][p])
except Exception as e:
print(e)

if sync:
if o.id not in objects_diff.keys():
Expand Down

0 comments on commit 059cf8d

Please sign in to comment.