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
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
Grant Sanderson
07bb34793e
Add simple function descriptions
2024-12-10 14:25:26 -06:00
Grant Sanderson
cd744024ea
Minor reorganization of ReloadManager.retrieve_scenes_and_run
2024-12-10 14:20:43 -06:00
Grant Sanderson
667cfaf160
Remove args from ReloadManager
2024-12-10 14:16:29 -06:00
Grant Sanderson
c61e0bcee5
Move window_config out of run_config
2024-12-10 14:16:07 -06:00
Grant Sanderson
d1080aa6fd
Add run configuration to global config
2024-12-10 14:08:12 -06:00
Grant Sanderson
f9fa8ac846
Make scene configuration part of the global configuration
2024-12-10 13:58:03 -06:00
Grant Sanderson
bcc4235e2f
Move embed configuration out of Scene, and get rid of error sound option
2024-12-10 12:43:29 -06:00
Varniex
c51a84a6ee
Fixing a Cairo Bug (Windows OS)
2024-12-11 00:10:06 +05:30
Grant Sanderson
6b38011078
Refactor config.py
2024-12-10 12:34:18 -06:00
Grant Sanderson
858d8c122b
Rename "file_writer_config" in default_config to simply "file_writer"
2024-12-10 11:43:48 -06:00
Grant Sanderson
4b483b75ce
Minor tweak
2024-12-10 11:39:23 -06:00
Grant Sanderson
4cc2e5ed17
Consolidate camera configuration
2024-12-10 11:39:13 -06:00
Grant Sanderson
d4c5c4736a
Move logic for window size and position into Window class
2024-12-10 11:07:54 -06:00
Grant Sanderson
178cca0ca5
Factor out get_window_position
2024-12-10 10:35:31 -06:00
Grant Sanderson
c02259a39e
Remove import
2024-12-10 10:35:21 -06:00
Grant Sanderson
1276724891
Pull out the initial Window.to_default_position from init_for_scene
2024-12-10 10:14:59 -06:00
Grant Sanderson
9e77b0dcdd
Consolidate window configuration
2024-12-10 10:10:58 -06:00
Grant Sanderson
950ac31b9b
Replace IGNORE_MANIMLIB_MODULES constant with a piece of global configuration
2024-12-09 16:57:55 -06:00
Grant Sanderson
8706ba1589
No real need to track ReloadManager.scenes
...
This was to be able to loop through an tear them down, but tear down is primarily about ending any file writing, and potentially cleaning up a window, which for the sake of reusing a window we don't want to do anyway.
2024-12-09 16:46:13 -06:00
Grant Sanderson
dd508b8cfc
No need to track ReloadManager.start_at_line
2024-12-09 16:43:08 -06:00
Grant Sanderson
88bae476ce
Don't print filename that is being reloaded
2024-12-09 16:25:18 -06:00
Grant Sanderson
7a69807ce6
Remove mobject.save_to_file
...
This simply didn't work, and had no resilience to changes to the library. For cases where this might be useful, it's likely much better deliberately save specific data which is time-consuming to generate on the fly.
2024-12-09 16:24:50 -06:00
Grant Sanderson
6d0b23f914
Slightly simplify ReloadManager
2024-12-09 16:14:27 -06:00
Grant Sanderson
bf81d94362
Don't make reload_manager a global variable
2024-12-09 15:54:16 -06:00
Grant Sanderson
5b315d5c70
Get rid of the (hacky) solution to redefining Scene methods, since reload handles it better
2024-12-09 14:02:22 -06:00
Grant Sanderson
cb3e115a6c
Minor cleaning
2024-12-09 14:01:34 -06:00
Grant Sanderson
40b5c7c1c1
Slightly clean up interactive_scene_embed
2024-12-09 13:56:33 -06:00
Grant Sanderson
636fb3a45b
Factor interactive embed logic out of Scene class
2024-12-09 13:53:03 -06:00
Grant Sanderson
ea3f77e3f1
Add blank line
2024-12-09 11:59:22 -06:00
Grant Sanderson
0692afdfec
Bug fix
2024-12-09 11:59:16 -06:00
Grant Sanderson
14c6fdc1d9
Slight refactor of get_indent
2024-12-09 09:49:48 -06:00
Grant Sanderson
89bf0b1297
Track all mobjects as a set in Scene. begin_animations
2024-12-07 08:21:33 -07:00
Grant Sanderson
5fa99b7723
Set default log level to "WARNING"
2024-12-07 08:14:56 -07:00
Grant Sanderson
0ef12ad7e4
Move FRAME_HEIGHT back to constants
...
Where it belongs
2024-12-06 12:35:39 -07:00
Grant Sanderson
09c27a654f
Minor cleaning of imports
2024-12-06 12:26:54 -07:00
Grant Sanderson
90dfb02cc6
Move get_scene_module logic to extract_scene.py
2024-12-06 12:24:16 -07:00
Grant Sanderson
e270f5c3d3
Change from get_module_with_inserted_embed_line to insert_embed_line_to_module
...
Rather than taking in a file_name and reading it in, directly take the module and edit its code.
2024-12-06 11:59:18 -07:00
Grant Sanderson
fadd045fc1
Don't write new file when inserting embed line
...
Instead, load the relevant module of the true file, and execute the modified code within that.
This also cleans up some of the previous now-unnecessary code around get_module_with_inserted_embed_line
2024-12-06 11:05:57 -07:00
Grant Sanderson
dd0aa14442
Clean up get_module_with_inserted_embed_line, only accept line number as embed arg
2024-12-06 10:39:02 -06:00
Grant Sanderson
d357e21c1d
Change how ModuleLoader receives is_reload information
...
Use on the fly import of reload_manager rather than altering the args
2024-12-06 10:07:07 -06:00
Grant Sanderson
dd251ab8c2
Remove "preview" as a scene parameter, just look for whether window is None
2024-12-06 09:54:14 -06:00