mirror of
https://github.com/3b1b/manim.git
synced 2025-08-05 16:49:03 +00:00
Organize get_ancestors from top to bottom
This commit is contained in:
parent
0e45b41fea
commit
ec9ed32d78
1 changed files with 2 additions and 1 deletions
|
@ -359,8 +359,9 @@ class Mobject(object):
|
|||
if p not in excluded:
|
||||
ancestors.append(p)
|
||||
to_process.append(p)
|
||||
# Remove redundancies while preserving order
|
||||
# Ensure mobjects highest in the hierarchy show up first
|
||||
ancestors.reverse()
|
||||
# Remove list redundancies while preserving order
|
||||
return list(dict.fromkeys(ancestors))
|
||||
|
||||
def add(self, *mobjects: Mobject):
|
||||
|
|
Loading…
Add table
Reference in a new issue