Skip to content

Commit 3206ed2

Browse files
committed
Copy pybullet consts instead of referencing them to avoid loading pybullet on module load
1 parent 65c676f commit 3206ed2

File tree

1 file changed

+16
-9
lines changed
  • src/compas_fab/backends/pybullet

1 file changed

+16
-9
lines changed

src/compas_fab/backends/pybullet/const.py

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,24 @@
66

77
from compas_fab.utilities import LazyLoader
88

9-
pybullet = LazyLoader('pybullet', globals(), 'pybullet')
9+
PYBULLET_GUI = 1
10+
PYBULLET_DIRECT = 2
11+
PYBULLET_SHARED_MEMORY = 3
12+
PYBULLET_UDP = 4
13+
PYBULLET_TCP = 5
14+
PYBULLET_GUI_SERVER = 7
15+
PYBULLET_SHARED_MEMORY_SERVER = 9
16+
PYBULLET_SHARED_MEMORY_GUI = 14
1017

1118
CONNECTION_TYPE = {
12-
'direct': pybullet.DIRECT,
13-
'gui': pybullet.GUI,
14-
'shared_memory': pybullet.SHARED_MEMORY,
15-
'udp': pybullet.UDP,
16-
'tcp': pybullet.TCP,
17-
'gui_server': pybullet.GUI_SERVER,
18-
'shared_memory_server': pybullet.SHARED_MEMORY_SERVER,
19-
'shared_memory_gui': pybullet.SHARED_MEMORY_GUI,
19+
'direct': PYBULLET_DIRECT,
20+
'gui': PYBULLET_GUI,
21+
'shared_memory': PYBULLET_SHARED_MEMORY,
22+
'udp': PYBULLET_UDP,
23+
'tcp': PYBULLET_TCP,
24+
'gui_server': PYBULLET_GUI_SERVER,
25+
'shared_memory_server': PYBULLET_SHARED_MEMORY_SERVER,
26+
'shared_memory_gui': PYBULLET_SHARED_MEMORY_GUI,
2027
}
2128

2229
BASE_LINK_ID = -1

0 commit comments

Comments
 (0)