getall()函数的报错
作者:互联网
昨天还用的好好的,今天就报错了
def getall(): alls = self.mobjects vg = VGroup() for i in alls: vg.add(i) return vg
a = getall() … # 让a移动等操作 self.play(Transform(a,b))
报错:
TypeError: All submobjects must be of type VMobject
这说明某些Mobject不是矢量化的,于是我将getall()改成:
def getall(): alls = self.mobjects vg = Group() for i in alls: vg.add(i) return vg
随后报错:
NotImplementedError: get_point_mobject not implemented for Mobject
这说明只有矢量化的VMobject才能使用Transform,真是太烦人了
标签:函数,vg,self,getall,Transform,alls,报错 来源: https://www.cnblogs.com/daxiangcai/p/16483991.html