Skip to content

Commit

Permalink
Merge pull request #185 from nxt-dev/dev
Browse files Browse the repository at this point in the history
Release editor-v3.8.2
  • Loading branch information
MichaelAldrich authored May 1, 2021
2 parents 1a11c73 + 02277ca commit e117cec
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 11 deletions.
3 changes: 1 addition & 2 deletions nxt_editor/connection_graphics_item.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,7 @@ def paint(self, painter, option, widget):
QtGui.QPainter.SmoothPixmapTransform, False)
thick_mult = 3
pen_style = QtCore.Qt.PenStyle.SolidLine
pen = QtGui.QPen(self.color, self.thickness * thick_mult,
self.pen_style)
pen = QtGui.QPen(self.color, self.thickness * thick_mult, pen_style)
# if self.tgt_path in self.model.selection:
# pen.setColor(colors.SELECTED)
# elif self.is_hovered:
Expand Down
11 changes: 9 additions & 2 deletions nxt_editor/dockwidgets/property_editor.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Built-in
import textwrap
import sys
import logging
from functools import partial

# External
Expand All @@ -18,7 +19,7 @@
from nxt_editor.dockwidgets.dock_widget_base import DockWidgetBase
from nxt_editor.pixmap_button import PixmapButton
from nxt_editor.label_edit import LabelEdit
from nxt_editor import colors
from nxt_editor import colors, LOGGER_NAME
from nxt_editor.decorator_widgets import OpinionDots
from nxt import DATA_STATE, NODE_ERRORS, nxt_path
from nxt.nxt_node import INTERNAL_ATTRS, META_ATTRS
Expand All @@ -27,6 +28,8 @@
# Fixme: Should this be a pref?
HISTORICAL_MAX_CHARS = 50

logger = logging.getLogger(LOGGER_NAME)


class PropertyEditor(DockWidgetBase):

Expand Down Expand Up @@ -1250,7 +1253,11 @@ def set_represented_node(self, node_path=None):
if self.state:
if sys.version_info[0] > 2 and isinstance(self.state, str):
self.state = bytes(self.state, 'utf-8')
self.horizontal_header.restoreState(self.state)
try:
self.horizontal_header.restoreState(self.state)
except TypeError:
logger.error('Corrupted property editor pref!')
self.state = ''
self.view.resizeColumnToContents(COLUMNS.nxt_type)

def get_data(self):
Expand Down
6 changes: 5 additions & 1 deletion nxt_editor/integration/unreal/Content/Python/init_unreal.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,11 @@ def make_or_find_nxt_menu():
return nxt_menu

def refresh_nxt_menu():
nxt_menu = make_or_find_nxt_menu()
try:
nxt_menu = make_or_find_nxt_menu()
except ValueError:
# If the plugin is loaded in unreal headless, the menu won't exist.
return
if is_nxt_available():
nxt_menu.add_menu_entry("nxt-section", make_open_editor_entry())
nxt_menu.add_menu_entry("nxt-section", make_update_entry())
Expand Down
2 changes: 1 addition & 1 deletion nxt_editor/integration/unreal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def launch_nxt_in_ue():
__NXT_WINDOW = nxt_editor.show_new_editor()

__NXT_WINDOW.close_signal.connect(existing.exit)
atexit.register(__NXT_WINDOW.close)
atexit.register(__NXT_WINDOW.close)
8 changes: 4 additions & 4 deletions nxt_editor/stage_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -1258,11 +1258,11 @@ def handle_collapse_changed(self, node_paths):
graphic.update_collapse()
collapsed = self.model.get_node_collapse(path, comp_layer)
if collapsed:
children = self.model.get_children(path,
include_implied=True)
for child_path in children:
descendants = self.model.get_descendants(path,
include_implied=True)
for child_path in descendants:
self.remove_node_graphic(child_path)
if children:
if descendants:
roots_hit.add(nxt_path.get_root_path(path))
else:
descendants = self.model.get_descendants(path,
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": 3,
"MINOR": 8,
"PATCH": 1
"PATCH": 2
}
}

0 comments on commit e117cec

Please sign in to comment.