mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 12:37:44 +00:00
Forget about using remove_list_redundancies
This commit is contained in:
parent
b73ebb9cf5
commit
ba89ad7450
1 changed files with 5 additions and 5 deletions
|
|
@ -1,13 +1,13 @@
|
||||||
from manimlib.utils.iterables import remove_list_redundancies
|
|
||||||
import itertools as it
|
import itertools as it
|
||||||
|
|
||||||
|
|
||||||
def extract_mobject_family_members(mobject_list, only_those_with_points=False):
|
def extract_mobject_family_members(mobject_list, only_those_with_points=False):
|
||||||
result = remove_list_redundancies(list(
|
result = list(it.chain(*[
|
||||||
it.chain(*[m.get_family() for m in mobject_list])
|
mob.get_family()
|
||||||
))
|
for mob in mobject_list
|
||||||
|
]))
|
||||||
if only_those_with_points:
|
if only_those_with_points:
|
||||||
result = [m for m in result if m.has_points()]
|
result = [mob for mob in result if mob.has_points()]
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue