Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion build/release_footer.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ See the [latest release of nxt-blender](https://github.com/nxt-dev/nxt-blender/r
- By Hand: `/path/to/python.exe -m pip install -U nxt-editor`


## Maya(2019-2025) Installation/Update
## Maya(2025 or newer) Installation/Update
1. Download Maya module(nxt_maya.zip)
2. Extract and follow `README.md` inside
12 changes: 8 additions & 4 deletions nxt_editor/dockwidgets/dock_widget_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,14 @@ def set_stage_model_connections(self, model, connect):
(model.destroyed, self.on_stage_model_destroyed)
]
for model_signal, my_func in self.model_signal_connections:
if connect:
model_signal.connect(my_func)
else:
model_signal.disconnect(my_func)
try:
if connect:
model_signal.connect(my_func)
else:
model_signal.disconnect(my_func)
except RuntimeError as e:
state = 'connect' if connect else 'disconnect' # py 3.10 safe
logger.debug(f'Failed to {state} signal! {e}')
self.model_signal_connections = []

def on_stage_model_destroyed(self):
Expand Down
18 changes: 9 additions & 9 deletions nxt_editor/dockwidgets/widget_builder.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Built-in
import logging
import ast
from functools import partial
try:
from collections.abc import Iterable
except ImportError:
Expand Down Expand Up @@ -814,12 +814,12 @@ def __init__(self, node_path, parent=None):
action = QtWidgets.QAction(text, self)
if menu_data.get(self.SELECTOR_ITEM_ATTR) == 'True':
title = menu_data.get(self.SELECTOR_TITLE_ATTR)
action.triggered.connect(lambda p=menu_item_path, t=title:
self.selection_widget(p, t))
action.triggered.connect(partial(self.selection_widget,
node_path, title))
else:
action.triggered.connect(lambda p=menu_item_path,
a=self.ITEM_PATH_ATTR:
self.execute_node_path(p, a))
action.triggered.connect(partial(self.execute_node_path,
menu_item_path,
self.ITEM_PATH_ATTR))
items.append(action)

ContextMenu(stage_model=self.stage_model,
Expand Down Expand Up @@ -870,9 +870,9 @@ def selection_widget(self, node_path, title):
else:
items = []
# selector dialog
screen = QtWidgets.QApplication.desktop().screenNumber(
QtWidgets.QApplication.desktop().cursor().pos())
center = QtWidgets.QApplication.desktop().screenGeometry(screen).center()
cursor_pos = QtGui.QCursor.pos()
screen = QtWidgets.QApplication.screenAt(cursor_pos)
center = screen.geometry().center() if screen else QtCore.QPoint(0, 0)
dialog = SelectionDialog(title=title, items=items, pos=center, parent=self)
dialog.exec_()
if not dialog.result():
Expand Down
3 changes: 2 additions & 1 deletion nxt_editor/file_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ def __init__(self, parent=None):
model.setNameFilterDisables(False)
completer.setModel(model)
completer.setCaseSensitivity(QtCore.Qt.CaseInsensitive)
completer.setCompletionMode(completer.UnfilteredPopupCompletion)
mode = completer.CompletionMode.UnfilteredPopupCompletion
completer.setCompletionMode(mode)
completer.popup().setStyleSheet(parent.parent().stylesheet)
self.returnPressed.connect(self.file_chosen.emit)
self.setCompleter(completer)
Expand Down
22 changes: 10 additions & 12 deletions nxt_editor/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -1355,20 +1355,18 @@ def open_logs_dir():
)

def about_message(self):
text = ('nxt {} \n'
'graph v{}\n'
'api v{}\n'
'editor v{}\n'
'Copyright (c) 2015-2020 '
'The nxt Authors').format(self.main_window.host_app,
GRAPH_VERSION.VERSION_STR,
API_VERSION.VERSION_STR,
EDITOR_VERSION.VERSION_STR)
import datetime, Qt
text = (f'nxt {self.main_window.host_app} \n'
f'graph v{GRAPH_VERSION.VERSION_STR}\n'
f'api v{API_VERSION.VERSION_STR}\n'
f'editor v{EDITOR_VERSION.VERSION_STR}\n'
f'Qt: {Qt.__binding__} {Qt.__qt_version__}\n'
f'Copyright (c) 2015-{datetime.datetime.now().year} '
f'The nxt Authors')
message_box = QtWidgets.QMessageBox()
message_box.setWindowTitle('About nxt '
'({})'.format(EDITOR_VERSION.VERSION_STR))
message_box.setWindowTitle(f'About nxt ({EDITOR_VERSION.VERSION_STR})')
message_box.setText(text)
message_box.setStandardButtons(message_box.Close)
message_box.setStandardButtons(message_box.StandardButton.Close)
message_box.setIcon(message_box.Icon.Information)
message_box.exec_()

Expand Down
2 changes: 1 addition & 1 deletion nxt_editor/version.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
"EDITOR": {
"MAJOR": 4,
"MINOR": 0,
"PATCH": 1
"PATCH": 2
}
}