Commit graph

3245 commits

Author SHA1 Message Date
Grant Sanderson
47815e5e73 Have TracedPath always update to the stroke configuration passed in 2024-12-26 10:29:33 -07:00
Grant Sanderson
273929fa53 Add simple get_dist function 2024-12-19 10:56:30 -06:00
Grant Sanderson
341c228358 Have UnitInterval pass on kwargs to NumberLine 2024-12-19 10:56:21 -06:00
Grant Sanderson
676ca2ff49 Merge branch 'master' of github.com:3b1b/manim into video-work
Some checks failed
docs / build up document and deploy (push) Has been cancelled
2024-12-13 15:24:22 -06:00
Grant Sanderson
39fbb677dc
Have autoreload update shell namespace with reloaded module variables (#2278)
Some checks failed
docs / build up document and deploy (push) Has been cancelled
* Have autoreload update shell namespace with reloaded module variables

* Update comments
2024-12-13 13:23:50 -08:00
syhner
c13d2a946b
fix typos (#2270) 2024-12-13 11:05:48 -08:00
Grant Sanderson
78f62eef7d Minor stylistic tweak 2024-12-13 09:21:38 -06:00
Grant Sanderson
f427fc67df
A few bug fixes (#2277)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG

* Add arg to clear the cache

* Separate out full_tex_to_svg from tex_to_svg

And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.

* Bug fix in handling BlankScene

* Make checkpoint_states an instance variable of CheckpointManager

As per https://github.com/3b1b/manim/issues/2272

* Move resizing out of Window.focus, and into Window.init_for_scene

* Make default output directory "." instead of ""

To address https://github.com/3b1b/manim/issues/2261

* Remove input_file_path arg from SceneFileWriter

* Use Dict syntax in place of dict for config more consistently across config.py

* Simplify get_output_directory

* Swap order of preamble and additional preamble
2024-12-12 18:45:34 -08:00
Grant Sanderson
67409f4d32 Swap order of preamble and additional preamble 2024-12-12 20:40:40 -06:00
Grant Sanderson
5bf6fde16b Simplify get_output_directory 2024-12-12 17:38:15 -06:00
Grant Sanderson
7840cd6996 Use Dict syntax in place of dict for config more consistently across config.py 2024-12-12 16:56:58 -06:00
Grant Sanderson
e93f61bddc Remove input_file_path arg from SceneFileWriter 2024-12-12 16:26:24 -06:00
Grant Sanderson
859958794c Make default output directory "." instead of ""
To address https://github.com/3b1b/manim/issues/2261
2024-12-12 16:25:22 -06:00
Grant Sanderson
3d9a0cd25e
Move resizing out of Window.focus, and into Window.init_for_scene (#2274)
Some checks are pending
docs / build up document and deploy (push) Waiting to run
2024-12-12 14:16:45 -08:00
Grant Sanderson
85c38ff9fd Move resizing out of Window.focus, and into Window.init_for_scene 2024-12-12 16:13:42 -06:00
Grant Sanderson
33dbf04985
Make checkpoint_states an instance variable of CheckpointManager (#2273)
As per https://github.com/3b1b/manim/issues/2272
2024-12-12 14:07:55 -08:00
Grant Sanderson
f7c955e3b1 Make checkpoint_states an instance variable of CheckpointManager
Some checks failed
docs / build up document and deploy (push) Has been cancelled
As per https://github.com/3b1b/manim/issues/2272
2024-12-12 16:04:34 -06:00
Grant Sanderson
24d4bf25b7 Bug fix in handling BlankScene 2024-12-12 14:37:26 -06:00
Grant Sanderson
576ecd2e0e Separate out full_tex_to_svg from tex_to_svg
And only cache to disk the results of full_tex_to_svg.  Otherwise, making edits to the tex_templates would not show up without clearing the cache.
2024-12-12 14:27:23 -06:00
Grant Sanderson
5eac0933df Add arg to clear the cache 2024-12-12 14:23:56 -06:00
Grant Sanderson
744e695340
Misc. clean up (#2269)
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string

* Ensure temporary svg paths for Text are deleted

* Remove unused dict_ops.py functions

* Remove break_into_partial_movies from file_writer configuration

* Rewrite guarantee_existence using Path

* Clean up SceneFileWriter

It had a number of vestigial functions no longer used, and some setup that could be made more organized.

* Remove --save_pngs CLI arg (which did nothing)

* Add --subdivide CLI arg

* Remove add_extension_if_not_present

* Remove get_sorted_integer_files

* Have find_file return Path

* Minor clean up

* Clean up num_tex_symbols

* Fix find_file

* Minor cleanup for extract_scene.py

* Add preview_frame_while_skipping option to scene config

* Use shell.showtraceback function

* Move keybindings to config, instead of in-place constants

* Replace DEGREES -> DEG
2024-12-12 08:39:54 -08:00
Grant Sanderson
8cc51956dd Replace DEGREES -> DEG 2024-12-12 10:31:40 -06:00
Grant Sanderson
d8e06c614d Move keybindings to config, instead of in-place constants 2024-12-12 10:24:56 -06:00
Grant Sanderson
8ff8f984d9 Use shell.showtraceback function 2024-12-12 10:04:59 -06:00
Grant Sanderson
c1b52bf572 Add preview_frame_while_skipping option to scene config 2024-12-12 10:00:16 -06:00
Grant Sanderson
82e24f8276 Minor cleanup for extract_scene.py 2024-12-12 09:55:01 -06:00
Grant Sanderson
7fbbeb68ec Merge branch 'master' of github.com:3b1b/manim into video-work 2024-12-12 08:53:16 -06:00
Grant Sanderson
00b34f2020
Autoreload v2 (#2268)
Some checks are pending
docs / build up document and deploy (push) Waiting to run
* Add autoreload

* Typo correction

* Add --autoreload to configuration docts

Co-Authored-By: Splines <37160523+Splines@users.noreply.github.com>

---------

Co-authored-by: Splines <37160523+Splines@users.noreply.github.com>
2024-12-12 06:52:03 -08:00
Grant Sanderson
0b1d102657 Fix find_file 2024-12-11 17:57:55 -06:00
Grant Sanderson
4dfd4a8736 Clean up num_tex_symbols 2024-12-11 17:47:26 -06:00
Grant Sanderson
dbcec1fcea Minor clean up 2024-12-11 17:30:26 -06:00
Grant Sanderson
14bb485cdc Have find_file return Path 2024-12-11 17:23:35 -06:00
Grant Sanderson
bce7b03eff Remove get_sorted_integer_files 2024-12-11 17:23:17 -06:00
Grant Sanderson
c9dd2b3cfb Remove add_extension_if_not_present 2024-12-11 17:18:29 -06:00
Grant Sanderson
66d949bcb5 Add --subdivide CLI arg 2024-12-11 17:16:35 -06:00
Grant Sanderson
8f93bec46a Remove --save_pngs CLI arg (which did nothing) 2024-12-11 17:16:23 -06:00
Grant Sanderson
390064f6bd Clean up SceneFileWriter
It had a number of vestigial functions no longer used, and some setup that could be made more organized.
2024-12-11 17:16:02 -06:00
Grant Sanderson
7f9a2cf487 Rewrite guarantee_existence using Path 2024-12-11 17:15:14 -06:00
Grant Sanderson
53234bfa65 Remove break_into_partial_movies from file_writer configuration 2024-12-11 17:14:56 -06:00
Grant Sanderson
22bc068bce Remove unused dict_ops.py functions 2024-12-11 15:40:38 -06:00
Grant Sanderson
1566ce2435 Ensure temporary svg paths for Text are deleted
Some checks are pending
docs / build up document and deploy (push) Waiting to run
2024-12-11 15:32:53 -06:00
Grant Sanderson
bafea89ac9
Update InteractiveSceneEmbed (#2267)
Some checks are pending
docs / build up document and deploy (push) Waiting to run
* Comment tweak

* Directly print traceback

Since the shell.showtraceback is giving some issues

* Make InteracrtiveSceneEmbed into a class

This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.

* Move remaining checkpoint_paste logic into scene_embed.py

This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.

* Change null key to be the empty string
2024-12-11 11:33:48 -08:00
Grant Sanderson
482a055567 Change null key to be the empty string 2024-12-11 13:25:56 -06:00
Grant Sanderson
f9a747abc6 Move remaining checkpoint_paste logic into scene_embed.py
This involved making a few context managers for Scene: temp_record, temp_skip, temp_progress_bar, which seem useful in and of themselves.
2024-12-11 13:21:28 -06:00
Grant Sanderson
b6f5593b30 Make InteracrtiveSceneEmbed into a class
This way it can keep track of it's internal shell; use of get_ipython has a finicky relationship with reloading.
2024-12-11 12:40:56 -06:00
Grant Sanderson
c03336dc8b Directly print traceback
Since the shell.showtraceback is giving some issues
2024-12-11 12:00:06 -06:00
Grant Sanderson
3abe3e8189 Comment tweak 2024-12-11 11:59:36 -06:00
Grant Sanderson
e2e785d6c9 Remove init_config.py
It may become a bit unwieldy to make sure this matches the structure of default_config, given the amount of code repetition involved. It seems easier for a user to just create their own custom_config.yml file directly.
2024-12-11 10:50:53 -06:00
Grant Sanderson
6d753a297a Remove stray imports 2024-12-11 10:38:23 -06:00
Grant Sanderson
f9fc543b07 Merge branch 'master' of github.com:3b1b/manim into video-work 2024-12-11 10:36:52 -06:00