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 c07a6db commit 15403fa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
9 changes: 2 additions & 7 deletions k3d/headless.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
import msgpack
import threading
import time
from deepcomparer import deep_compare
from base64 import b64decode
from flask import Flask, send_from_directory
from werkzeug import Response
Expand Down Expand Up @@ -66,13 +67,7 @@ def generate():
if p == 'voxels_group':
sync = True # todo
else:
try:
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 = o[p] != self.synced_objects[o.id][p]
sync = not deep_compare(o[p], self.synced_objects[o.id][p])

if sync:
if o.id not in objects_diff.keys():
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ classifiers = [
dependencies = [
"ipywidgets>=7.0.0,<9.0.0",
"msgpack",
"deepcomparer",
"numpy",
"traitlets",
"traittypes",
Expand Down
3 changes: 2 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ ipywidgets>=7.0.1
traittypes
traitlets
numpy>=1.11.0
msgpack
msgpack
deepcomparer

0 comments on commit 15403fa

Please sign in to comment.