Skip to content

BackdropNode _deserialize bug and fix #271

@Soooya

Description

@Soooya

When I open a save file containing BackDropNode, following error msg are shown:

Traceback (most recent call last):
File ".\Python310\lib\site-packages\nodegraphqt-0.2.2-py3.10.egg\NodeGraphQt\base\graph_actions.py", line 119, in _open_session
graph.load_session(file_path)
File ".\Python310\lib\site-packages\nodegraphqt-0.2.2-py3.10.egg\NodeGraphQt\base\graph.py", line 1429, in load_session
self.import_session(file_path)
File ".\Python310\lib\site-packages\nodegraphqt-0.2.2-py3.10.egg\NodeGraphQt\base\graph.py", line 1452, in import_session
self._deserialize(layout_data)
File ".\Python310\lib\site-packages\nodegraphqt-0.2.2-py3.10.egg\NodeGraphQt\base\graph.py", line 1314, in _deserialize
if prop in node.view.widgets:
AttributeError: 'BackdropNodeItem' object has no attribute 'widgets'

A temporary fix:
add self.widgets = {} in BackdropNodeItem.__init__()

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions