mirror of
https://github.com/3b1b/manim.git
synced 2025-11-14 08:47:44 +00:00
Small clean up
This commit is contained in:
parent
422c9cebd2
commit
2863672740
1 changed files with 20 additions and 14 deletions
|
|
@ -1768,8 +1768,14 @@ class Mobject(object):
|
|||
self.locked_data_keys = set(keys)
|
||||
|
||||
def lock_matching_data(self, mobject1: Mobject, mobject2: Mobject):
|
||||
for sm, sm1, sm2 in zip(self.get_family(), mobject1.get_family(), mobject2.get_family()):
|
||||
if sm.data.dtype == sm1.data.dtype == sm2.data.dtype:
|
||||
tuples = zip(
|
||||
self.get_family(),
|
||||
mobject1.get_family(),
|
||||
mobject2.get_family(),
|
||||
)
|
||||
for sm, sm1, sm2 in tuples:
|
||||
if not sm.data.dtype == sm1.data.dtype == sm2.data.dtype:
|
||||
continue
|
||||
names = sm.data.dtype.names
|
||||
sm.lock_data(filter(
|
||||
lambda name: arrays_match(sm1.data[name], sm2.data[name]),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue