394 Commits

Author SHA1 Message Date
f8280a12be Change where exception mode is set, to be quieter 2024-11-30 10:08:54 -06:00
1fa17030a2 Add reload() command for interactive scene reloading (#2240)
* Init reload command (lots of things not working yet)

* Add back in class line (accidentally deleted)

* Add back in key modifiers (accidentally deleted)

* Unpack tuple from changed `get_module`

* Init MainRunManager & respawn IPython shell

* Init cleanup of scenes from manager

* Restore string quotes

* Still take `self.preview` into account

* Remove left-over code from module experimentation

* Remove double window activation

* Reset scenes array in RunManager

* Move self.args None check up

* Use first available window

* Don't use constructor for RunManager

* Use self. syntax

* Init moderngl context manually

* Add some comments for failed attempts to reset scene

* Reuse existing shell (this fixed the bug 🎉)

* Remove unused code

* Remove unnecessary intermediate ReloadSceneException

* Allow users to finally exit

* Rename main_run_manager to reload_manager

* Add docstrings to `ReloadManager`

* Improve reset management in window

* Clarify why we use magic exit_raise command

* Add comment about window reuse

* Improve docstrings in ReloadManager & handle case of 0 scenes

* Set scene and title earlier

* Run linter suggestions
2024-11-26 10:09:43 -08:00
1248abd922 Merge pull request #2233 from mitkonikov/modifier-keys-fix
Properly check modifier keys.
2024-11-25 10:09:10 -06:00
af923a2327 Add docstring to user-facing focus() method 2024-11-10 19:10:53 +01:00
97b6e39abb Init new focus() command 2024-11-10 18:48:33 +01:00
693a859caf revert changes in mobject.py and camera.py 2024-10-27 14:10:12 -03:00
1738876f43 fix bad 3D overlapping using z_index 2024-10-27 14:06:35 -03:00
dc731f8bf2 Properly check modifier keys. 2024-10-25 00:01:30 +02:00
2dd0256af6 Instantiate the IPython shell without a local ns 2024-10-12 22:02:43 -03:00
81b17dd63e Merge pull request #2168 from zhujisheng/patch-1
Update scene.py to make scene.time more accurate
2024-10-10 12:24:05 -07:00
154a473a12 Get rid of globals update locals hack
It seems this issues is no longer there in the case of list constructors(?). Although it still exists for functions defined within a cell, that can be circumvented with more explicit function arguments.
2024-10-10 14:05:43 -05:00
29cb6f76fe Write scene insertions into a subdirectory 2024-10-02 07:24:33 -05:00
cf37f34e1f Add copy cursor position option 2024-10-01 13:05:00 -05:00
ccb9977a67 Update scene.py to make scene.time more accurate
When the time intervals are (0, dt, 2dt, ...), during the first frame processing, only the video is inserted, but the update parameter is 0, which causes scene.time to be inaccurate. The correct time intervals should be (dt, 2dt, ...)
2024-09-23 23:48:18 +08:00
1f55832a6a Clean up around z_index 2024-09-06 12:20:26 -05:00
aebf2220a6 Merge pull request #2057 from germanzhu/add-zorder-mobject
add zorder to mobject
2024-09-06 10:11:40 -07:00
08f7cb8d3e zorder -> z_index 2024-09-06 10:11:31 -07:00
55a798676a Always stop skipping after checkpoint_paste 2024-08-26 11:41:50 -05:00
51de1fb650 For some reason RenderGroups must be groups for camera reorientation to function 2024-08-23 14:56:35 -05:00
a823901b98 Only form render groups from Mobjects of the same type
I.e. bias against forming such groups
2024-08-23 14:45:27 -05:00
fcc5dc00f9 Treat objects fixed in frame as having flat stroke 2024-08-23 14:17:26 -05:00
c8d5e91422 Rename shader_dtype -> data_dtype 2024-08-22 14:52:35 -05:00
11df256369 Fix error rect 2024-08-21 16:49:08 -05:00
7474ae17b0 Change default to flat stroke, except in 3d situations 2024-08-20 11:52:05 -05:00
f12b143d16 Unify get_shader_wrapper_list, and and better subdivide render groups by ShaderWrapper ids 2024-08-20 08:53:51 -05:00
08e33faab8 Ensure scene properly updates on an embed 2024-08-19 21:49:39 -05:00
21c0bcb8b6 Don't wait for animations while skipping 2024-08-16 12:20:49 -05:00
902a4f264e Add white space after assert statements 2024-08-16 12:15:55 -05:00
df0ae6fdc9 Fix missing ignore_skipping -> force_draw 2024-08-15 16:40:16 -05:00
65d5947966 Change ignore_skipping name to force_draw 2024-08-15 14:05:32 -05:00
a5ba721f96 Cease useless rendering
Change so that with a live window, rendering only happens if there has been an event (mouse motion, key press, etc.) to respond to.
2024-08-15 14:03:16 -05:00
bbc89d13e9 Don't save state after each embed cell call 2024-07-31 15:32:08 +02:00
c1efd14904 Add touch and notouch to embed vocabulary 2024-07-31 15:24:50 +02:00
a7765dcac3 Change copy frame position command 2024-07-31 15:24:25 +02:00
a07ccf4aca Include *args, **kwargs in embed shell event pre_cell and post_cell functions 2024-06-24 15:22:22 -07:00
83cd5d6246 Clean up updater matters, prune unused functions 2024-03-07 16:07:39 -03:00
9432a73a9f Let checkpoint_paste work on methods of the current scene 2024-03-02 16:49:54 -05:00
ffbe5c8114 Add type hints for affects_mobject_list 2024-03-02 16:49:35 -05:00
4a89376fdd Add method for resetting which plane in 3d space behaves like the floor when panning 2024-02-21 12:42:59 -08:00
d44e248277 Specify type of argument in Mobject.add 2024-02-09 17:48:25 -06:00
dfa96c2047 Update copy_frame_positioning 2024-02-03 18:49:04 -06:00
0b5e9d4a8b add zorder to mobject 2023-08-27 15:35:22 +08:00
0609c1bfa8 Change default saturation and gamma to each be 1 2023-06-10 09:25:03 -07:00
162fd4a92b Change defaults for where videos are saved
Save them directly to the relevant output directory, rather than to a "videos" subdirectory within it.
2023-06-10 09:24:50 -07:00
cb02066f22 Add always_depth_test option to ThreeDScene, default to true 2023-06-10 09:23:19 -07:00
557cb66c52 Fix transparent background videos 2023-02-15 09:38:35 -08:00
3e3e4de5e9 Add option for gamma correction to SceneFileWriter 2023-02-08 20:09:33 -08:00
ded06c1f88 Give SceneFileWriter an option for saturation, and set default to 1.7
The colors in a scene can look a little different in a preview window vs. in the rendered file written by ffmpeg. This is mean to bring them closer together.
2023-02-08 19:41:07 -08:00
c918e84784 Change default progress bar format 2023-02-03 18:10:29 -08:00
b8fe7b0172 Note that restoring state affects the mobject list 2023-02-03 17:28:00 -08:00