Skip to content

Commit

Permalink
Merge pull request nxt-dev#277 from nxt-dev/dev
Browse files Browse the repository at this point in the history
Release editor-v3.16.0
  • Loading branch information
ImLucasBrown authored Jun 11, 2024
2 parents 51d52ef + 4d2be98 commit 5527907
Show file tree
Hide file tree
Showing 11 changed files with 70 additions and 63 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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
17 changes: 17 additions & 0 deletions .github/workflows/unittests.yml
Original file line number Diff line number Diff line change
@@ -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
30 changes: 0 additions & 30 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
<div align="center">

![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

</div>


**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)

Expand Down
2 changes: 1 addition & 1 deletion nxt_editor/dockwidgets/code_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
11 changes: 4 additions & 7 deletions nxt_editor/dockwidgets/property_editor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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():
Expand Down
40 changes: 20 additions & 20 deletions nxt_editor/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import webbrowser
from functools import partial
import time
import tempfile

# External
from Qt import QtWidgets
Expand Down Expand Up @@ -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')
Expand Down Expand Up @@ -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'
Expand Down
3 changes: 2 additions & 1 deletion nxt_editor/node_graphics_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion nxt_editor/stage_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion nxt_editor/version.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"EDITOR": {
"MAJOR": 3,
"MINOR": 15,
"MINOR": 16,
"PATCH": 0
}
}
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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={
Expand Down

0 comments on commit 5527907

Please sign in to comment.