Skip to content

armgit / manim

Public Imported from GitHub
0

A community-maintained Python framework for creating mathematical animations.

Allow to use call_updater=True with a function without dt (#3149)

DegrangeMc2492cea1271
diff --git a/manim/mobject/mobject.py b/manim/mobject/mobject.py
index e51efb116..8e40cc8c6 100644
--- a/manim/mobject/mobject.py
+++ b/manim/mobject/mobject.py
@@ -971,7 +971,11 @@ class Mobject:
else:
self.updaters.insert(index, update_function)
if call_updater:
- update_function(self, 0)
+ parameters = get_parameters(update_function)
+ if "dt" in parameters:
+ update_function(self, 0)
+ else:
+ update_function(self)
return self
def remove_updater(self, update_function: Updater):