def extract_mobject_family_members(self, mobjects, only_those_with_points=False): if only_those_with_points: method = Mobject.family_members_with_points else: method = Mobject.submobject_family return remove_list_redundancies(list( it.chain(*[ method(m) for m in mobjects if not (isinstance(m, VMobject) and m.is_subpath) ]) ))
def extract_mobject_family_members(self, mobjects, only_those_with_points=False): if only_those_with_points: method = Mobject.family_members_with_points else: method = Mobject.get_family return remove_list_redundancies( list( it.chain(*[ method(m) for m in mobjects if not (isinstance(m, VMobject) and m.is_subpath) ])))
def submobject_family(self): sub_families = map(Mobject.submobject_family, self.submobjects) all_mobjects = [self] + list(it.chain(*sub_families)) return remove_list_redundancies(all_mobjects)
def submobject_family(self): sub_families = map(Mobject.submobject_family, self.submobjects) all_mobjects = [self] + list(it.chain(*sub_families)) #all_mobjects = list(it.chain(*sub_families)) + [self] return remove_list_redundancies(all_mobjects)