We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d3bdefb commit 4129505Copy full SHA for 4129505
manim/scene/scene.py
@@ -1008,6 +1008,24 @@ def play(
1008
All other keywords are passed to the renderer.
1009
1010
"""
1011
+ # Make sure this is running on the main thread
1012
+ if threading.current_thread().name != "MainThread":
1013
+ kwargs.update(
1014
+ {
1015
+ "subcaption": subcaption,
1016
+ "subcaption_duration": subcaption_duration,
1017
+ "subcaption_offset": subcaption_offset,
1018
+ }
1019
+ )
1020
+ self.queue.put(
1021
+ (
1022
+ "play",
1023
+ args,
1024
+ kwargs,
1025
1026
1027
+ return
1028
+
1029
start_time = self.renderer.time
1030
self.renderer.play(self, *args, **kwargs)
1031
run_time = self.renderer.time - start_time
0 commit comments