Commit graph

23 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
Varniex
5d3f730824
Cleaning up some imports + Minor Bug fixed in VectorField (#2253)
* cleaning up imports

* sample_points -> sample_coords
2024-12-05 14:42:46 -08:00
Grant Sanderson
1f55832a6a Clean up around z_index 2024-09-06 12:20:26 -05:00
Grant Sanderson
441ac77eae Change Euler axis limits for xz flat plane 2024-08-26 08:22:29 -05:00
Grant Sanderson
058914fdd2 Mildly more efficient CameraFrame.get_view_matrix() 2024-08-19 16:54:29 -05:00
Grant Sanderson
bc91e91634 In get_euler_angles, add edge case for gimbal lock on the low side 2024-08-07 14:11:10 -05:00
Grant Sanderson
b45c71d3c2 Account for Gimbal lock in panning 2024-08-05 16:58:03 -05:00
Grant Sanderson
ed3ac74d67 Add option to change Euler axes 2024-02-13 14:48:56 -06:00
Grant Sanderson
4aef0d1bf5 Add add_ambient_rotation 2024-02-03 18:48:16 -06:00
Grant Sanderson
661814deea Add all orientation options into CameraFrame.reorient 2024-02-03 18:48:07 -06:00
Grant Sanderson
d10745a379 Have CameraFrame.get_view_matrix and and CameraFrame.get_implied_camera_location use _data_has_changed instead of a refresh arg 2023-02-02 20:47:12 -08:00
Grant Sanderson
3b0c958189 Check case of scale = 0 in get_view_matrix 2023-01-31 15:37:03 -08:00
Grant Sanderson
92e4d43ca3 Make sure camera location is not computed more times than it needs to be 2023-01-31 12:29:49 -08:00
Grant Sanderson
424db4b3e4 Ensure view matrix is not computed more than it needs to be 2023-01-31 12:20:25 -08:00
Grant Sanderson
af69cf9c7d Track field of view instead of focal_dist_to_height 2023-01-30 15:02:33 -08:00
Grant Sanderson
71bd3edb09 Fix frame scaling 2023-01-30 15:02:04 -08:00
Grant Sanderson
277c471c90 Refactor so that view matrix incorporates frame scaling 2023-01-30 14:15:39 -08:00
Grant Sanderson
285953b44d Add FRAME_SHAPE constant 2023-01-30 11:57:01 -08:00
Grant Sanderson
2705ba3afa Fix CameraFrame.to_fixed_frame_point 2023-01-28 22:58:05 -08:00
Grant Sanderson
91f69be3e0 Add CameraFrame.to_fixed_frame_point 2023-01-28 22:30:00 -08:00
Grant Sanderson
fbde9e8bba Check for null orientation in getting euler angles 2023-01-28 13:06:08 -08:00
Grant Sanderson
5deef1c249 Allow for setting a default frame orientation 2023-01-28 12:02:19 -08:00
Grant Sanderson
3339aad29e Separate CameraFrame into its own file 2023-01-25 10:19:44 -08:00