Skip to content

Commit

Permalink
fix bug on mac, preventing bqt from working
Browse files Browse the repository at this point in the history
  • Loading branch information
hannesdelbeke committed Sep 16, 2023
1 parent 7b70a80 commit 1e0a50b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions bqt/blender_applications/darwin_blender_application.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
with suppress(ModuleNotFoundError):
import AppKit
import objc
# this is only supressed so it doesnt crash windows, we do need this, not optional

from PySide2.QtGui import QIcon
from PySide2.QtCore import QObject
Expand All @@ -27,7 +28,7 @@ class DarwinBlenderApplication(BlenderApplication):

def __init__(self, *args, **kwargs):
# OSX Specific - Needs to initialize first
self._ns_window = self.__get_application_window() or None
self._ns_window = self._get_application_window() or None

super().__init__(*args, **kwargs)

Expand All @@ -41,7 +42,7 @@ def _get_blender_hwnd(self) -> int:

# Check to ensure ns_window is set
if self._ns_window is None:
self._ns_window = self.__get_application_window()
self._ns_window = self._get_application_window()

return objc.pyobjc_id(self._ns_window.contentView())

Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def run(self):
setup(
# Metadata
name="bqt",
version="1.3.1",
version="1.3.2",
description="Files to help bootstrap PySide2 with an event loop within Blender.",
long_description=long_description,
long_description_content_type='text/markdown',
Expand Down

0 comments on commit 1e0a50b

Please sign in to comment.