-
Notifications
You must be signed in to change notification settings - Fork 3
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
Init Reload & Preview
Command/CodeLens
#95
Conversation
Reload & Preview
CommandReload & Preview
Command/CodeLens
Wow @Splines, you've been busy! After updating my version of manim, I'm still getting a weird bug on this behavior:
![]() Also, to make this feature more accessible to users, we can consider the following:
|
Could you send me a log file, please?
Yes, good idea! I opened #97 for that and will tackle this in a future PR.
If we go for option 1, this would not be necessary as it cannot happen, right? Or do you speak of Manim itself should display such an error? |
I identified the problem and converted this PR to a draft as it needs some more time to be finished. |
Not sure if this is the problem you identified, but here is the log
Correct, we do not need both 1 and 2, but either can do the trick |
So the problem you were encountering should be fixed by now such that this PR is ready for review 🙌
|
In a follow-up PR, we could add this |
The next PR #102 is already building upon this PR. To move on, I will merge this one in the next couple of days. For me, the |
I haven't had time to thoroughly test this feature yet, but go ahead and merge. I'll check the full functionality in #102 |
Closes #77.
Tip
In the
manim
repo, I've added areload()
command via 3b1b/manim#2240. This one is already merged and available on themaster
branch. The follow-up PR 3b1b/manim#2257 improves that command by reloading all user-defined modules.As of 2024-12-05, it is not merged yet.It is also available on themaster
branch ofmanim
.This PR makes use of this new
reload()
command by providing a new code lens that will reload the scene at that point before previewing it. If you want to test that the reloading actually takes place, checkout my branch from 3b1b/manim#2257 and see the test files over there in the PR comment (a.py
,b.py
andc.py
).Additionall small refactoring: We also move part of the preview mechanism from the
extension.ts
topreviewCode.ts
to have it in one place.Linked issues
reload()
3b1b/manim#2272window.focus()
offsets the window position 3b1b/manim#2271