Commit graph

122 commits

Author SHA1 Message Date
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
0b350e248b Change global_attrs back to global_config in Text 2024-12-11 10:18:05 -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
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
Varniex
c51a84a6ee Fixing a Cairo Bug (Windows OS) 2024-12-11 00:10:06 +05:30
Grant Sanderson
94f6f0aa96
Cleaner local caching of Tex/Text data, and partially cleaned up configuration (#2259)
* Remove print("Reloading...")

* Change where exception mode is set, to be quieter

* Add default fallback monitor for when no monitors are detected

* Have StringMobject work with svg strings rather than necessarily writing to file

Change SVGMobject to allow taking in a string of svg code as an input

* Add caching functionality, and have Tex and Text both use it for saved svg strings

* Clean up tex_file_writing

* Get rid of get_tex_dir and get_text_dir

* Allow for a configurable cache location

* Make caching on disk a decorator, and update implementations for Tex and Text mobjects

* Remove stray prints

* Clean up how configuration is handled

In principle, all we need here is that manim looks to the default_config.yaml file, and updates it based on any local configuration files, whether in the current working directory or as specified by a CLI argument.

* Make the default size for hash_string an option

* Remove utils/customization.py

* Remove stray prints

* Consolidate camera configuration

This is still not optimal, but at least makes clearer the way that importing from constants.py kicks off some of the configuration code.

* Factor out configuration to be passed into a scene vs. that used to run a scene

* Use newer extract_scene.main interface

* Add clarifying message to note what exactly is being reloaded

* Minor clean up

* Minor clean up

* If it's worth caching to disk, then might as well do so in memory too during development

* No longer any need for custom hash_seeds in Tex and Text

* Remove display_during_execution

* Get rid of (no longer used) mobject_data directory reference

* Remove get_downloads_dir reference from register_font

* Update where downloads go

* Easier use of subdirectories in configuration

* Add new pip requirements
2024-12-05 14:51:14 -08:00
Grant Sanderson
ae99c8cd2e Go back to use_simple_quadratic_approx being set at the Text level 2023-01-13 14:08:29 -08:00
Grant Sanderson
108bb3da44 Have SVGs default to use_simple_quadratic_approx 2023-01-13 08:16:46 -08:00
Grant Sanderson
f0edc6628b Push default of use_simple_quadratic_approx being True to Text 2023-01-12 21:24:03 -08:00
Grant Sanderson
9c106eb873 Add option for StringMobject to only render a single svg
Then set as the default behavior for MTex and Text
2022-12-20 14:31:17 -08:00
Grant Sanderson
dd662b0d12 Move Selector and Span to manimlib.typing 2022-12-20 14:29:17 -08:00
Grant Sanderson
073a62bf03 Factor rgb_to_hex, hex_to_int and int_to_hex away from StringMobject and to utils/color 2022-12-19 17:28:22 -08:00
Grant Sanderson
8db20cc460 Small fix 2022-12-16 20:59:14 -08:00
Grant Sanderson
43fd5e1aea Move custom type to manimlib.typing 2022-12-16 20:19:18 -08:00
Grant Sanderson
b21f5bad00 Fix small t2c issue 2022-12-16 11:41:42 -08:00
Grant Sanderson
3b5181d1a3 Kill CONFIG in StringMobject and Text 2022-12-15 13:35:13 -08:00
Grant Sanderson
958002152e Define ManimColor type in constants 2022-12-14 10:55:32 -08:00
YishiMichael
4dfe8aff86
refactor: refactor StringMobject 2022-08-22 21:52:48 +08:00
YishiMichael
8bd01d60e4
fix: add protect attribute to hash_seed 2022-08-22 17:08:58 +08:00
YishiMichael
c2a75e15cc
refactor: refactor StringMobject 2022-08-22 16:55:46 +08:00
YishiMichael
19c757ec90
refactor: refactor StringMobject 2022-08-20 13:01:59 +08:00
YishiMichael
7ffc7b33f7
Refactor StringMobject and relevant classes 2022-08-07 23:57:54 +08:00
YishiMichael
28e4240475
Refactor StringMobject and relevant classes 2022-08-07 11:29:31 +08:00
YishiMichael
f434eb93e2
Refactor StringMobject and relevant classes 2022-08-07 00:50:29 +08:00
YishiMichael
093af347aa
Refactor LabelledString and relevant classes 2022-06-11 15:15:39 +08:00
YishiMichael
f0447d7739
Small refactors on StringMobject and relevant classes 2022-05-28 21:43:37 +08:00
YishiMichael
59eba943e5
Resolve conflicts 2022-05-28 12:43:53 +08:00
Grant Sanderson
83b4aa6b88 Let defaullt text alignment be decided in default_config 2022-05-24 15:16:59 -07:00
YishiMichael
f0984487ea
Construct TexTemplate class to convert tex to svg 2022-05-21 15:56:03 +08:00
YishiMichael
cdadaf8a8c
Rename LabelledString to StringMobject 2022-05-06 22:09:58 +08:00
YishiMichael
7cf0e0ba10
Refactor LabelledString and relevant classes 2022-05-06 17:56:27 +08:00
YishiMichael
b509f62010
Refactor LabelledString and relevant classes 2022-05-06 16:43:20 +08:00
YishiMichael
642602155d
[WIP] Refactor LabelledString and relevant classes 2022-05-05 23:03:02 +08:00
YishiMichael
511a3aab3d
[WIP] Remove comments 2022-05-04 22:18:19 +08:00
YishiMichael
1cb7401141
[WIP] Refactor LabelledString and relevant classes 2022-05-04 21:56:13 +08:00
YishiMichael
ab8f78f40f
[WIP] Refactor LabelledString and relevant classes 2022-05-03 23:39:37 +08:00
YishiMichael
03cb42ba15
[WIP] Refactor LabelledString and relevant classes 2022-05-02 22:40:06 +08:00
YishiMichael
065900c6ac
Some refactors 2022-04-27 23:04:24 +08:00
YishiMichael
e085c2e214
Refactor LabelledString and relevant classes 2022-04-23 17:17:43 +08:00
YishiMichael
12bfe88f40
Some refactors 2022-04-11 23:44:33 +08:00
YishiMichael
e23f667c3d
Fix bug when handling multi-line tex 2022-04-10 08:36:13 +08:00
YishiMichael
3550108ff7
Handle out-of-bound spans 2022-04-07 09:48:44 +08:00
YishiMichael
557707ea75
Support substring and case_sensitive parameters 2022-04-07 00:46:41 +08:00
YishiMichael
93f8d3f1ca
Some refactors on LabelledString 2022-04-06 22:38:33 +08:00
YishiMichael
7f616987a3
Fix typo 2022-04-05 14:01:07 +08:00
YishiMichael
974d9d5ab0
Avoid empty spans 2022-04-04 14:53:40 +08:00
YishiMichael
3c3264d7d6
Support passing in spans directly 2022-04-02 22:42:19 +08:00
YishiMichael
84c56b3624
Fix typo 2022-03-31 18:11:37 +08:00
YishiMichael
dc816c9f8d
Improve algorithm 2022-03-31 18:08:10 +08:00
YishiMichael
d5ab9a91c4
Reorganize files 2022-03-31 16:15:58 +08:00