Rename is_movable to interaction_allowed

This commit is contained in:
Grant Sanderson
2022-04-22 19:17:39 -07:00
parent 7b342a2759
commit 3961005fd7
2 changed files with 19 additions and 12 deletions

View File

@ -84,7 +84,7 @@ class Mobject(object):
self.locked_data_keys: set[str] = set()
self.needs_new_bounding_box: bool = True
self._is_animating: bool = False
self._is_movable: bool = False
self.interaction_allowed: bool = False
self.init_data()
self.init_uniforms()
@ -692,20 +692,20 @@ class Mobject(object):
# Check if mark as static or not for camera
def is_changing(self) -> bool:
return self._is_animating or self.has_updaters or self._is_movable
return self._is_animating or self.has_updaters or self.interaction_allowed
def set_animating_status(self, is_animating: bool, recurse: bool = True) -> None:
for mob in self.get_family(recurse):
mob._is_animating = is_animating
return self
def make_movable(self, value: bool = True, recurse: bool = True) -> None:
def allow_interaction(self, value: bool = True, recurse: bool = True) -> None:
for mob in self.get_family(recurse):
mob._is_movable = value
mob.interaction_allowed = value
return self
def is_movable(self) -> bool:
return self._is_movable
def is_interaction_allowed(self) -> bool:
return self.interaction_allowed
# Transforming operations