mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Add error message for ApplyFunction
This commit is contained in:
parent
5cce05fc46
commit
c74cfa3c5d
1 changed files with 4 additions and 1 deletions
|
@ -230,7 +230,10 @@ class ApplyFunction(Transform):
|
||||||
super().__init__(mobject, **kwargs)
|
super().__init__(mobject, **kwargs)
|
||||||
|
|
||||||
def create_target(self):
|
def create_target(self):
|
||||||
return self.function(self.mobject.copy())
|
target = self.function(self.mobject.copy())
|
||||||
|
if not isinstance(target, Mobject):
|
||||||
|
raise Exception("Functions passed to ApplyFunction must return object of type Mobject")
|
||||||
|
return target
|
||||||
|
|
||||||
|
|
||||||
class ApplyMatrix(ApplyPointwiseFunction):
|
class ApplyMatrix(ApplyPointwiseFunction):
|
||||||
|
|
Loading…
Add table
Reference in a new issue