Skip to content

Commit e117cec

Browse files
Merge pull request #185 from nxt-dev/dev
Release editor-v3.8.2
2 parents 1a11c73 + 02277ca commit e117cec

File tree

6 files changed

+21
-11
lines changed

6 files changed

+21
-11
lines changed

nxt_editor/connection_graphics_item.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def paint(self, painter, option, widget):
111111
QtGui.QPainter.SmoothPixmapTransform, False)
112112
thick_mult = 3
113113
pen_style = QtCore.Qt.PenStyle.SolidLine
114-
pen = QtGui.QPen(self.color, self.thickness * thick_mult,
115-
self.pen_style)
114+
pen = QtGui.QPen(self.color, self.thickness * thick_mult, pen_style)
116115
# if self.tgt_path in self.model.selection:
117116
# pen.setColor(colors.SELECTED)
118117
# elif self.is_hovered:

nxt_editor/dockwidgets/property_editor.py

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Built-in
22
import textwrap
33
import sys
4+
import logging
45
from functools import partial
56

67
# External
@@ -18,7 +19,7 @@
1819
from nxt_editor.dockwidgets.dock_widget_base import DockWidgetBase
1920
from nxt_editor.pixmap_button import PixmapButton
2021
from nxt_editor.label_edit import LabelEdit
21-
from nxt_editor import colors
22+
from nxt_editor import colors, LOGGER_NAME
2223
from nxt_editor.decorator_widgets import OpinionDots
2324
from nxt import DATA_STATE, NODE_ERRORS, nxt_path
2425
from nxt.nxt_node import INTERNAL_ATTRS, META_ATTRS
@@ -27,6 +28,8 @@
2728
# Fixme: Should this be a pref?
2829
HISTORICAL_MAX_CHARS = 50
2930

31+
logger = logging.getLogger(LOGGER_NAME)
32+
3033

3134
class PropertyEditor(DockWidgetBase):
3235

@@ -1250,7 +1253,11 @@ def set_represented_node(self, node_path=None):
12501253
if self.state:
12511254
if sys.version_info[0] > 2 and isinstance(self.state, str):
12521255
self.state = bytes(self.state, 'utf-8')
1253-
self.horizontal_header.restoreState(self.state)
1256+
try:
1257+
self.horizontal_header.restoreState(self.state)
1258+
except TypeError:
1259+
logger.error('Corrupted property editor pref!')
1260+
self.state = ''
12541261
self.view.resizeColumnToContents(COLUMNS.nxt_type)
12551262

12561263
def get_data(self):

nxt_editor/integration/unreal/Content/Python/init_unreal.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,11 @@ def make_or_find_nxt_menu():
8080
return nxt_menu
8181

8282
def refresh_nxt_menu():
83-
nxt_menu = make_or_find_nxt_menu()
83+
try:
84+
nxt_menu = make_or_find_nxt_menu()
85+
except ValueError:
86+
# If the plugin is loaded in unreal headless, the menu won't exist.
87+
return
8488
if is_nxt_available():
8589
nxt_menu.add_menu_entry("nxt-section", make_open_editor_entry())
8690
nxt_menu.add_menu_entry("nxt-section", make_update_entry())

nxt_editor/integration/unreal/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ def launch_nxt_in_ue():
3131
__NXT_WINDOW = nxt_editor.show_new_editor()
3232

3333
__NXT_WINDOW.close_signal.connect(existing.exit)
34-
atexit.register(__NXT_WINDOW.close)
34+
atexit.register(__NXT_WINDOW.close)

nxt_editor/stage_view.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1258,11 +1258,11 @@ def handle_collapse_changed(self, node_paths):
12581258
graphic.update_collapse()
12591259
collapsed = self.model.get_node_collapse(path, comp_layer)
12601260
if collapsed:
1261-
children = self.model.get_children(path,
1262-
include_implied=True)
1263-
for child_path in children:
1261+
descendants = self.model.get_descendants(path,
1262+
include_implied=True)
1263+
for child_path in descendants:
12641264
self.remove_node_graphic(child_path)
1265-
if children:
1265+
if descendants:
12661266
roots_hit.add(nxt_path.get_root_path(path))
12671267
else:
12681268
descendants = self.model.get_descendants(path,

nxt_editor/version.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"EDITOR": {
33
"MAJOR": 3,
44
"MINOR": 8,
5-
"PATCH": 1
5+
"PATCH": 2
66
}
77
}

0 commit comments

Comments
 (0)