Skip to content

Conversation

Splines
Copy link
Member

@Splines Splines commented Nov 10, 2024

Fixes #84. When starting the scene at a Python "class definition line", we don't start ManimGL in interactive mode (with -se <line_number>). Instead the whole scene is previewed (see the behavior of startStopScene.ts). We now identify this scenario in the executeStartCommand() method and wait not for the first IPython cell to finish, but for the first log info message to be shown:

[17:39:31] INFO                                               scene.py:210
                    Tips: Using the keys `d`, `f`, or `z` you             
                    can interact with the scene. Press                    
                    `command + q` or `esc` to quit 

Known limitations

  • After issuing this command, we think that we are in an interactive environment. Therefore, the next Preview Manim Cell will just put checkpoint_paste() in the current terminal and therefore do nothing. But the next Preview Manim Cell will then succeed. If the user exits the shell after having previewed the whole scene, the next Preview Manim Cell will also work fine. I'd like to accept this as known limitation (or maybe if really needed tackle this case in a future PR where we should beforehand discuss what the expected behavior is in this case).

@Splines Splines self-assigned this Nov 10, 2024
@bhoov bhoov requested review from bhoov and removed request for bhoov November 17, 2024 11:50
Copy link
Collaborator

@bhoov bhoov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm that this fixes #84 -- changes look good to me

@Splines Splines merged commit 546eafd into main Nov 17, 2024
@Splines Splines deleted the fix/non-interactive-mode-start branch November 17, 2024 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Starting Manim..." hangs -- if we start on class name
2 participants