Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Focus active manim shell when running "Preview Selected Manim Code" #86

Open
bhoov opened this issue Nov 5, 2024 · 4 comments
Open
Labels
enhancement-archive Don't use this label anymore.

Comments

@bhoov
Copy link
Collaborator

bhoov commented Nov 5, 2024

(building a small scene in manim for work and am recording features that would be nice for my workflow)

When debugging a scene, I find that I often want to check the state of data that is underlying the visualization. The nicest way to do these "debug" statements is to type cmd+' cmd+r to run selected lines (they may be as simple as printing shapes or values of existing objects). However, I then have to find the terminal that is running the active manim session to see the output.

@bhoov bhoov added the enhancement-archive Don't use this label anymore. label Nov 5, 2024
@VladimirFokow
Copy link
Collaborator

VladimirFokow commented Nov 6, 2024

maybe for this -
add a checkbox in the settings?
(if some users want it and some don't)?

@Splines
Copy link
Member

Splines commented Dec 1, 2024

Ben, would you like that the shell opens whenever you use this shortcut? Or just in some scenarios, e.g. for "debug" statements. E.g. even if we had a checkbox in the settings, it could be beneficial to have a sperate command to run in the shell AND open the respective shell that the command was run in. Since maybe most of the time you don't really need the terminal when just previewing.

Would a command like Open Active Manim Terminal be a way to go? Another idea is to parse the output and only open the terminal if something other than the Manim Progress updates is output, e.g. your custom print statement.

@bhoov
Copy link
Collaborator Author

bhoov commented Dec 11, 2024

YES. Having an "Open active manim terminal cmd" that can be arbitrarily bound to a hotkey is perfect. Thanks @Splines.

My idea is that whenever you run a specific selection of lines, you may want to see what happens in the video, or what the data looks like (perhaps w/ print statements) in the terminal. My workflow would say I would always want to see both if I run just specific lines. But let's not develop to my specific workflow right now, this is not an urgent issue

@Splines
Copy link
Member

Splines commented Jan 13, 2025

Ok, so what could be implemented in the future:

  • Add command: "Open active Manim Terminal"
  • Add a config setting to decide if the Manim Terminal should be focused whenever we preview a cell.
  • What stays the same: whenever the Manim Terminal shows an error, it is automatically opened, regardless of any user setting.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement-archive Don't use this label anymore.
Projects
None yet
Development

No branches or pull requests

3 participants