Zoom Deactivation
Description of the proposed feature
The feature I want to propose is a zoom deactivation system It would look like this.
from manim import *
class Basic(ZoomedScene):
def construct(self):
self.activate_zooming(animate=False)
self.deactivate_zooming(animate=False)
I would like to do this because we can activated zooming but not deactivate it.
How can the new feature be used?
In cases where you would like to zoom in for a little bit but then remove the zoom.
Hello,
I'm not sure to understand what you want. You can remove the zoom overlay added by activate_zooming, for sure.
As the function definition states (l.151): https://github.com/ManimCommunity/manim/blob/42d595ac4fb6c607a8375e28f24b9b7193668cb5/manim/scene/zoomed_scene.py#L135-L154
you can remove the two mobjects added (the zoomed frame and square) with
self.remove(
self.zoomed_camera.frame,
self.zoomed_display,
)
That is a rough and handcrafted equivalent to "deactivating" the zoom. But I wholeheartedly agree that it should be implemented in a proper method.
I received a notification claiming that an individual posted a message on this thread, but the message is GONE! This issue was made over 3 years ago. Is there any progress?
I received a notification claiming that an individual posted a message on this thread, but the message is GONE! This issue was made over 3 years ago. Is there any progress?
Apparently, no progress.
Yesterday I was taking a look at the open Manim issues and marked some of them, including this one, as "good first issues" for new contributors to give them a shot. Right after that, this person appeared in this and another issue marked as "good first issue" and said they wanted to try fixing them, but their comments disappeared right after 🤷🏼♂️
Since this is now a "good first issue", someone will likely come soon to implement this feature.
Hi, I’d like to pick this up. I saw that #4905 was closed because the author couldn’t continue, so I’d be happy to take another shot at deactivate_zooming().
~~One thing I wasn’t fully sure about from the issue: should deactivate_zooming() also unregister the zoomed display from MultiCamera so that activating it again later works cleanly, or is the intended scope mainly removing the visible zoom objects and resetting the state?~~
Edit: I tested this locally, and removing the frame and display still leaves the display registered with MultiCamera. Activating zoom again increases the registration count from 1 to 2, so I’m going to unregister it during deactivation and add a reactivation test for that.
Hello,
I'm not sure to understand what you want. You can remove the zoom overlay added by
activate_zooming, for sure.As the function definition states (l.151):
https://github.com/ManimCommunity/manim/blob/42d595ac4fb6c607a8375e28f24b9b7193668cb5/manim/scene/zoomed_scene.py#L135-L154
you can remove the two mobjects added (the zoomed frame and square) with
self.remove( self.zoomed_camera.frame, self.zoomed_display, ) That is a rough and handcrafted equivalent to "deactivating" the zoom. But I wholeheartedly agree that it should be implemented in a proper method.
I made this little attempt at deactivating zooming using your idea. https://github.com/PlayfulMathematician/manim/commit/d0597b3b810f38ed2616b5c29ce9148a058da4de
Hello,
I'm not sure to understand what you want. You can remove the zoom overlay added by
activate_zooming, for sure.As the function definition states (l.151):
https://github.com/ManimCommunity/manim/blob/42d595ac4fb6c607a8375e28f24b9b7193668cb5/manim/scene/zoomed_scene.py#L135-L154
you can remove the two mobjects added (the zoomed frame and square) with
self.remove( self.zoomed_camera.frame, self.zoomed_display, ) That is a rough and handcrafted equivalent to "deactivating" the zoom. But I wholeheartedly agree that it should be implemented in a proper method.
I made this little attempt at deactivating zooming using your idea. https://github.com/PlayfulMathematician/manim/commit/d0597b3b810f38ed2616b5c29ce9148a058da4de
sorry did not see the comment does this mean this is already implemented?
Hi! I'd like to work on this issue as part of a university course. Unless someone is already on it, I'll open a PR soon. Thanks!
13. Hi! I'd like to work on this issue as part of a university course. Unless someone is already on it, I'll open a PR soon. Thanks!
Where is your PR?