MCPcopy Create free account
hub / github.com/NyarchLinux/DesktopPuppet / InteractionServer

Class InteractionServer

src/interaction_server.py:5–42  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3
4
5class InteractionServer:
6 def __init__(self, model_manager: ModelManager, window) -> None:
7 self.model_manager = model_manager
8 self.window = None
9 self.changefunc = None
10 pass
11
12 def get_expressions(self) -> list[str]:
13 return self.model_manager.get_expressions()
14
15 def set_expression(self, expression: str) -> None:
16 return self.model_manager.set_expression(expression)
17
18 def get_motions(self) -> list[str]:
19 return self.model_manager.get_motions()
20
21 def set_motion(self, motion: str) -> None:
22 return self.model_manager.do_motion(motion)
23
24 def set_mouth_amplitude(self, amplitude: float) -> None:
25 return self.model_manager.set_mouth_amplitude(amplitude)
26
27 def set_settings(self, settings: dict) -> None:
28 return self.model_manager.set_settings(settings)
29
30 def start_interaction_server(self, address:str="localhost") -> None:
31 self.httpd, self.server_thread = start_interaction_api(self, address, 42943)
32
33 def kill_interaction_server(self) -> None:
34 stop_interaction_api(self.httpd)
35
36 def change_overlay_type(self, overlay_type: str) -> None:
37 if self.changefunc is not None and self.window is not None:
38 self.changefunc(overlay_type, self.window)
39
40 def set_change_func(self, changefunc, window):
41 self.changefunc = changefunc
42 self.window = window
43

Callers 1

on_activateFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected