mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-05-18 03:05:21 +08:00
Compare commits
5 Commits
v5.0.0-rc2
...
gui-scenes
Author | SHA1 | Date | |
---|---|---|---|
ea2ce6505f | |||
6903919767 | |||
f4971d3a43 | |||
e62a3b05ed | |||
152050612e |
@ -14,7 +14,7 @@ from pydantic import ValidationError
|
||||
from pydantic.color import Color
|
||||
from PySide6.QtCore import Qt, QThread, Signal, Slot
|
||||
from PySide6.QtGui import QCloseEvent, QIcon, QImage, QKeyEvent, QPixmap, QResizeEvent
|
||||
from PySide6.QtWidgets import QApplication, QGridLayout, QLabel, QWidget
|
||||
from PySide6.QtWidgets import QApplication, QFileDialog, QGridLayout, QLabel, QWidget
|
||||
from tqdm import tqdm
|
||||
|
||||
from .commons import config_path_option, verbosity_option
|
||||
@ -1027,6 +1027,22 @@ def present(
|
||||
Use `manim-slide list-scenes` to list all available scenes in a given folder.
|
||||
"""
|
||||
|
||||
app = QApplication(sys.argv)
|
||||
app.setApplicationName("Manim Slides")
|
||||
dialog = QFileDialog()
|
||||
dialog.setDirectory(FOLDER_PATH if os.path.exists(FOLDER_PATH) else "")
|
||||
dialog.setFileMode(QFileDialog.ExistingFiles)
|
||||
dialog.setNameFilters(["JSON (*.json)", "* (*.*)"])
|
||||
if dialog.exec():
|
||||
filenames = dialog.selectedFiles()
|
||||
print(filenames)
|
||||
|
||||
# TODO:
|
||||
# - get files in selected order
|
||||
# - kill dialog
|
||||
# - add cli option (+ envvar) to prompt gui instead of cli
|
||||
# - use scenes selected from gui
|
||||
|
||||
if skip_all:
|
||||
exit_after_last_slide = True
|
||||
|
||||
|
Reference in New Issue
Block a user