Commit graph

13 commits

Author SHA1 Message Date
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
Splines
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
YishiMichael
9ef9961d0e
Sort imports 2022-04-12 19:19:59 +08:00
Grant Sanderson
e9afb0ee33 Fix tiny PEP errors 2021-11-30 11:28:26 -08:00
TonyCrane
e10f850d0d add cli flag to specify log level 2021-10-16 21:01:39 +08:00
Michael W
0e574882b3
Refactor #1637 (#1650)
* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Refactor #1637

* Update config.py

Co-authored-by: 鹤翔万里 <tonycrane@foxmail.com>
2021-10-16 13:04:52 +08:00
TonyCrane
ed99427a3b print version when start 2021-10-07 17:42:23 +08:00
TonyCrane
ef5253f1bc add cli flag -v to show version info 2021-10-06 17:54:28 +08:00
GZTime
41120b096e Add support for debugger launch 2021-04-09 20:17:21 +08:00
Grant Sanderson
b48ce3f1de Remove whitespace 2021-02-25 08:48:50 -08:00
Tony031218
e3d09d161c add auto config guide 2021-02-07 17:45:18 +08:00
Tony031218
2394bdc2e6 refactor __init__.py and __main__.py 2021-02-07 17:43:05 +08:00