mirror of
https://github.com/3b1b/manim.git
synced 2025-08-21 05:44:04 +00:00
Add Mobject.insert_submobject method
This commit is contained in:
parent
ba23fbe71e
commit
49743daf32
1 changed files with 5 additions and 0 deletions
|
@ -313,6 +313,11 @@ class Mobject(object):
|
|||
self.assemble_family()
|
||||
return self
|
||||
|
||||
def insert_submobject(self, index, new_submob):
|
||||
self.submobjects.insert(index, new_submob)
|
||||
self.assemble_family()
|
||||
return self
|
||||
|
||||
def set_submobjects(self, submobject_list):
|
||||
self.remove(*self.submobjects)
|
||||
self.add(*submobject_list)
|
||||
|
|
Loading…
Add table
Reference in a new issue