mirror of
https://github.com/3b1b/manim.git
synced 2025-09-01 00:48:45 +00:00
Have Mobject.match_points apply to all parts of data in pointlike_data_key
This commit is contained in:
parent
47815e5e73
commit
c8369246c9
1 changed files with 6 additions and 3 deletions
|
@ -307,12 +307,15 @@ class Mobject(object):
|
|||
parent.refresh_bounding_box()
|
||||
return self
|
||||
|
||||
# Others related to points
|
||||
|
||||
@affects_data
|
||||
def match_points(self, mobject: Mobject) -> Self:
|
||||
self.set_points(mobject.get_points())
|
||||
self.resize_points(len(mobject.data), resize_func=resize_preserving_order)
|
||||
for key in self.pointlike_data_keys:
|
||||
self.data[key][:] = mobject.data[key]
|
||||
return self
|
||||
|
||||
# Others related to points
|
||||
|
||||
def get_points(self) -> Vect3Array:
|
||||
return self.data["point"]
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue