diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..a0e69ef
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,14 @@
+name: Release
+
+on:
+ push:
+ branches: [release]
+ workflow_dispatch:
+ branches: [release]
+
+jobs:
+ test-and-deploy:
+ secrets: inherit
+ uses: nxt-dev/nxt/.github/workflows/release.yml@release
+ with:
+ QT_DEPENDENCIES: true
diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml
new file mode 100644
index 0000000..ae7609e
--- /dev/null
+++ b/.github/workflows/unittests.yml
@@ -0,0 +1,17 @@
+name: Unittests
+
+on:
+ workflow_dispatch:
+ branches-ignore: [release]
+ workflow_call:
+ pull_request:
+ branches-ignore: [release]
+ push:
+ branches-ignore: [release]
+
+jobs:
+ test-python:
+ secrets: inherit
+ uses: nxt-dev/nxt/.github/workflows/unittests.yml@dev
+ with:
+ QT_DEPENDENCIES: true
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 2f1adc5..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,30 +0,0 @@
-language: python
-branches:
- only:
- - release
- - dev
-python:
- - "3.7"
-
-before_install:
- - |
- if [ "$TRAVIS_BRANCH" = "dev" ] && [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
- echo "Push to dev, not running until push to release"
- exit 0
- else
- echo "Doing the build"
- fi
-
-install:
- - cd ..
- - git clone https://github.com/nxt-dev/nxt.git
- - pip install importlib-metadata==3.4
- - pip install ./nxt_editor
-
-script:
- - |
- if [ "$TRAVIS_BRANCH" = "release" ] && [ "$TRAVIS_EVENT_TYPE" = "push" ]; then
- pip install twine
- python -m nxt.cli exec nxt_editor/build/packaging.nxt -s /make_and_upload
- exit $?
- fi
\ No newline at end of file
diff --git a/README.md b/README.md
index 1718755..a251c64 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,12 @@
+
+
+![Release Status](https://github.com/nxt-dev/nxt_editor/actions/workflows/release.yml/badge.svg?branch=release)
+![Dev Status](https://github.com/nxt-dev/nxt_editor/actions/workflows/unittests.yml/badge.svg?branch=dev)
# NXT Editor
+
+
+
**nxt** (**/ɛn·ɛks·ti/**) is a general purpose code compositor designed for rigging, scene assembly, and automation. (node execution tree)
[Installation/Usage](#installationusage) | [Docs](https://nxt-dev.github.io/) | [Contributing](CONTRIBUTING.md) | [Licensing](LICENSE)
diff --git a/nxt_editor/dockwidgets/code_editor.py b/nxt_editor/dockwidgets/code_editor.py
index fea0f5a..0005dda 100644
--- a/nxt_editor/dockwidgets/code_editor.py
+++ b/nxt_editor/dockwidgets/code_editor.py
@@ -334,7 +334,7 @@ def update_editor(self, node_list=()):
self.setEnabled(True)
if self.editing_active:
return
- if not self.stage_model.comp_layer.node_exists(self.node_path):
+ if not self.stage_model.node_exists(self.node_path):
self.editor.clear()
return
self.update_code_is_local()
diff --git a/nxt_editor/dockwidgets/property_editor.py b/nxt_editor/dockwidgets/property_editor.py
index 45f56d5..2f80f38 100644
--- a/nxt_editor/dockwidgets/property_editor.py
+++ b/nxt_editor/dockwidgets/property_editor.py
@@ -546,9 +546,9 @@ def set_represented_node(self):
order = QtCore.Qt.DescendingOrder
col = self.user_sort_pref['column']
if self.model.rowCount(self):
- self.model.horizontal_header.blockSignals(True)
- self.model.horizontal_header.setSortIndicator(col, order)
- self.model.horizontal_header.blockSignals(False)
+ self.table_view.horizontalHeader().blockSignals(True)
+ self.table_view.horizontalHeader().setSortIndicator(col, order)
+ self.table_view.horizontalHeader().blockSignals(False)
self.node_name = nxt_path.node_name_from_node_path(self.node_path)
if not self.node_name:
@@ -1553,10 +1553,7 @@ def paint(self, painter, option, index):
inner_rect = inner_rect.marginsRemoved(QtCore.QMargins(1, 1, 1, 1))
painter.setPen(QtCore.Qt.NoPen)
painter.setBrush(option.backgroundBrush)
- attr_name = index.sibling(index.row(), COLUMNS.name).data()
- model = index.model().sourceModel()
- color = model.node_attr_draw_details[attr_name]['color']
- color = QtGui.QColor(color)
+ color = index.data(role=QtCore.Qt.ForegroundRole)
painter.setPen(color)
if option.state & QtWidgets.QStyle.State_MouseOver:
if self.parent.mouse_pressed == index.column():
diff --git a/nxt_editor/main_window.py b/nxt_editor/main_window.py
index 9cf6f22..13971e0 100644
--- a/nxt_editor/main_window.py
+++ b/nxt_editor/main_window.py
@@ -8,6 +8,7 @@
import webbrowser
from functools import partial
import time
+import tempfile
# External
from Qt import QtWidgets
@@ -1252,6 +1253,8 @@ def __init__(self, parent=None):
# Help Menu
self.help_menu = self.addMenu('Help')
self.help_menu.setTearOffEnabled(True)
+ logs_dir_action = self.help_menu.addAction('Open Logs Dir')
+ logs_dir_action.triggered.connect(self.open_logs_dir)
prefs_dir_action = self.help_menu.addAction('Open Prefs Dir')
prefs_dir_action.triggered.connect(self.open_prefs_dir)
config_dir_action = self.help_menu.addAction('Open Plugins Dir')
@@ -1335,29 +1338,26 @@ def window_action_triggered(self, action=None):
@staticmethod
def open_prefs_dir():
- d = user_dir.PREF_DIR
- if 'darwin' in sys.platform:
- os.system('open {}'.format(d))
- elif 'win' in sys.platform:
- os.startfile(d)
- else:
- try:
- os.system('xdg-open {}'.format(d))
- except:
- logger.exception('Failed to open user dir')
+ QtGui.QDesktopServices.openUrl(
+ QtCore.QUrl.fromLocalFile(user_dir.PREF_DIR)
+ )
@staticmethod
def open_plugins_dir():
- d = USER_PLUGIN_DIR
- if 'darwin' in sys.platform:
- os.system('open {}'.format(d))
- elif 'win' in sys.platform:
- os.startfile(d)
- else:
- try:
- os.system('xdg-open {}'.format(d))
- except:
- logger.exception('Failed to open user config dir')
+ QtGui.QDesktopServices.openUrl(
+ QtCore.QUrl.fromLocalFile(USER_PLUGIN_DIR)
+ )
+
+ @staticmethod
+ def open_logs_dir():
+ try:
+ log_dir = nxt_log.LOG_DIR
+ except AttributeError:
+ # Guess the log dir if nxt core is old.
+ log_dir = os.path.join(tempfile.gettempdir(), 'nxt_logs')
+ QtGui.QDesktopServices.openUrl(
+ QtCore.QUrl.fromLocalFile(log_dir)
+ )
def about_message(self):
text = ('nxt {} \n'
diff --git a/nxt_editor/node_graphics_item.py b/nxt_editor/node_graphics_item.py
index 1eea793..b8de726 100644
--- a/nxt_editor/node_graphics_item.py
+++ b/nxt_editor/node_graphics_item.py
@@ -452,7 +452,8 @@ def draw_title(self, painter, lod=1.):
# draw collapse state arrow
for arrow in self.collapse_arrows:
- self.scene().removeItem(arrow)
+ if arrow.scene():
+ self.scene().removeItem(arrow)
if lod > MIN_LOD:
self.collapse_arrows = []
# TODO calculation needed arrows should be done outside drawing
diff --git a/nxt_editor/stage_view.py b/nxt_editor/stage_view.py
index d9d0dbc..11151ec 100644
--- a/nxt_editor/stage_view.py
+++ b/nxt_editor/stage_view.py
@@ -1281,7 +1281,8 @@ def remove_node_graphic(self, node_path):
self.remove_node_connection_graphics(node_path)
def handle_del():
- self.scene().removeItem(graphic)
+ if graphic.scene():
+ self.scene().removeItem(graphic)
graphic.out_anim_group.finished.connect(handle_del)
graphic.anim_out()
diff --git a/nxt_editor/version.json b/nxt_editor/version.json
index d76d81b..1b7135a 100644
--- a/nxt_editor/version.json
+++ b/nxt_editor/version.json
@@ -1,7 +1,7 @@
{
"EDITOR": {
"MAJOR": 3,
- "MINOR": 15,
+ "MINOR": 16,
"PATCH": 0
}
}
diff --git a/setup.py b/setup.py
index 2679ca3..7b98ff4 100644
--- a/setup.py
+++ b/setup.py
@@ -28,9 +28,9 @@
long_description_content_type="text/markdown",
url="https://github.com/nxt-dev/nxt_editor",
packages=setuptools.find_packages(),
- python_requires='>=2.7, <3.11',
+ python_requires='>=3.7, <3.11',
install_requires=['nxt-core<1.0,>=0.14',
- 'qt.py==1.1',
+ 'qt.py<3',
'pyside2>=5.11,<=5.16'
],
package_data={