Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG FIX] ext/pyrender/viewer: resolve macOS crashes when initialising Tk() #92

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions genesis/ext/pyrender/viewer.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@

from tkinter import Tk
from tkinter import filedialog
root = Tk()
root.withdraw()
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hide root window as we only use filedialog to save image.


import pyglet
from moviepy.video.io.ffmpeg_writer import FFMPEG_VideoWriter
Expand Down Expand Up @@ -961,7 +963,6 @@ def _get_save_filename(self, file_exts):
}
filetypes = [file_types[x] for x in file_exts]
try:
root = Tk()
save_dir = self.viewer_flags["save_directory"]
if save_dir is None:
save_dir = os.getcwd()
Expand All @@ -971,7 +972,6 @@ def _get_save_filename(self, file_exts):
except Exception:
return None

root.destroy()
if filename == ():
return None
return filename
Expand Down