mirror of
https://github.com/3b1b/manim.git
synced 2025-08-02 19:46:21 +08:00
Rename is_movable to interaction_allowed
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user