Commit graph

6318 commits

Author SHA1 Message Date
Grant Sanderson
f6dbb1886a Update comments 2024-12-13 15:21:37 -06:00
Grant Sanderson
89e7a0a320 Have autoreload update shell namespace with reloaded module variables 2024-12-13 13:03:16 -06:00
Grant Sanderson
0c69ab6a32 Update version number 2024-12-12 20:54:37 -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
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
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
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
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
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
eeb4fdf270
Merge pull request #2266 from 3b1b/video-work
Refactor config
2024-12-11 10:53:26 -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
c6c1a49ede Update setup.cfg 2024-12-11 10:38:30 -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
Grant Sanderson
bac0c0c9b9
Merge pull request #2265 from Varniex/master
Minor Import Bug Fixed + Adding Required Packages
2024-12-11 10:35:44 -06:00
Grant Sanderson
9ae5b4dee3 Use addict.Dict for scene config 2024-12-11 10:33:50 -06:00
Grant Sanderson
0b350e248b Change global_attrs back to global_config in Text 2024-12-11 10:18:05 -06:00
Grant Sanderson
7148d6bced Add addict to requirements 2024-12-11 10:03:49 -06:00
Grant Sanderson
b470a47da7 Remove unnecessary import 2024-12-11 10:03:39 -06:00
Grant Sanderson
13fdc9629d No need for the shortcuts into the manim_config 2024-12-11 09:58:51 -06:00
Grant Sanderson
fce92347fa Replace get_global_config() with manim_config, and make it an addict Dict 2024-12-11 09:50:17 -06:00
Grant Sanderson
185f642826 Focus and sync window when initialized for a scene 2024-12-11 09:29:04 -06:00
Grant Sanderson
4a6a125739 Change "style" in default config to "text"
Some checks are pending
docs / build up document and deploy (push) Waiting to run
2024-12-11 08:30:31 -06:00
Grant Sanderson
8246d0da5d Fix bug with xelatex rendering 2024-12-11 08:23:17 -06:00
Grant Sanderson
1794e4d0ba Better align docs description of configuration with the updated format 2024-12-11 07:37:52 -06:00
Grant Sanderson
4d7f6093b4 Update how tex configuration default is passed in 2024-12-11 07:18:30 -06:00
Grant Sanderson
37a05094ea Small comment changes 2024-12-11 07:17:20 -06:00
Varniex
76afc42e9a adding required packages to setup.cfg file 2024-12-11 16:46:09 +05:30
Varniex
5fcb668f07 fixing get_ipython import error 2024-12-11 16:40:56 +05:30
Grant Sanderson
2d7b9d579a Move comment 2024-12-10 20:19:30 -06:00
Grant Sanderson
9ac16ab722 Remove DEFAULT_FPS constant
It's a bit silly to have it's valued defined by camera_config, when it's only function is to be a default value for Camera's configuration
2024-12-10 20:19:25 -06:00
Grant Sanderson
8744c878f4 Make log_level configurable in default_config 2024-12-10 20:12:38 -06:00
Grant Sanderson
9fcdd0de5f Use pyglet.window.key for key constant values 2024-12-10 20:00:03 -06:00
Grant Sanderson
9f785a5fba Move key to int constants to interactive_scene.py 2024-12-10 19:42:53 -06:00
Grant Sanderson
a03accff9c Rename local colors variable in constants.py 2024-12-10 19:36:19 -06:00
Grant Sanderson
7d3758c44c Move joint_type_map out of constants to VMobject 2024-12-10 19:33:06 -06:00
Grant Sanderson
f9a44c9975 Make ffmpeg_bin specification a piece of file_writer_config 2024-12-10 19:29:55 -06:00
Grant Sanderson
d5c36de3c5 DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
Some checks are pending
docs / build up document and deploy (push) Waiting to run
And likewise DEFAULT_MOBJECT_TO_MOBJECT_BUFFER -> DEFAULT_MOBJECT_TO_MOBJECT_BUFF
2024-12-10 19:23:15 -06:00
Grant Sanderson
c9b6ee57a8 Make default_wait_time a piece of scene configuration 2024-12-10 19:21:16 -06:00
Grant Sanderson
2c43d293a5 Move arbitrary constant definitions into default_config
This should make things like the color palette and frame size more easily customizable.
2024-12-10 19:17:55 -06:00
Grant Sanderson
3d3f8258f4 Merge branch 'master' of github.com:3b1b/manim into video-work 2024-12-10 18:49:44 -06:00
Grant Sanderson
17f37ff02a
Merge pull request #2264 from Varniex/master
Fixing a Cairo Bug on Windows OS
2024-12-10 18:49:26 -06:00
Grant Sanderson
2359ed9aa4 Remove tempfile from requirements.txt 2024-12-10 17:00:33 -06:00
Grant Sanderson
32d36a09f6 Update commend on reload_scene 2024-12-10 15:46:34 -06:00
Grant Sanderson
8cf95ec9a4 Move ReloadManager logic into __main__.py
Since the reload logic no longer relies on any state, the relevant loop is simple enough that it feels clearest to include it in the main entry point file.
2024-12-10 15:46:17 -06:00
Grant Sanderson
24697377db Make the fact that the global configuration is a mutable global dictionary a bit more explicit
Instead of implicit through the use of lru_cache
2024-12-10 15:31:43 -06:00
Grant Sanderson
d21fbd02bc Minor tweak to reload_scene 2024-12-10 14:46:03 -06:00
Grant Sanderson
284c1d8f2c Move message for no scenes found to extract_scene 2024-12-10 14:43:10 -06:00
Grant Sanderson
ae93d8fcc6 Move update to is_reload status of run_config out of ReloadManager 2024-12-10 14:42:53 -06:00
Grant Sanderson
1d67768a13 Move reload out of Scene, instead have it directly update the global run configuration 2024-12-10 14:34:46 -06:00