mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Organize get_ancestors from top to bottom
This commit is contained in:
@ -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):
|
||||
|
Reference in New Issue
Block a user