Skip to content

Commit

Permalink
Merge pull request #364 from jchanvfx/serlize_session_bugfix_#363
Browse files Browse the repository at this point in the history
Serialize session bugfix #363
  • Loading branch information
jchanvfx authored Jul 27, 2023
2 parents 7732724 + 2e0fef4 commit 0a9df7f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
8 changes: 4 additions & 4 deletions NodeGraphQt/base/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -537,9 +537,9 @@ def add_port_accept_connection_type(
connection_data = connection_data[key]

if accept_ptype not in connection_data:
connection_data[accept_ptype] = set([accept_pname])
connection_data[accept_ptype] = [accept_pname]
else:
connection_data[accept_ptype].add(accept_pname)
connection_data[accept_ptype].append(accept_pname)

def port_accept_connection_types(self, node_type, port_type, port_name):
"""
Expand Down Expand Up @@ -582,9 +582,9 @@ def add_port_reject_connection_type(
connection_data = connection_data[key]

if reject_ptype not in connection_data:
connection_data[reject_ptype] = set([reject_pname])
connection_data[reject_ptype] = [reject_pname]
else:
connection_data[reject_ptype].add(reject_pname)
connection_data[reject_ptype].append(reject_pname)

def port_reject_connection_types(self, node_type, port_type, port_name):
"""
Expand Down
2 changes: 1 addition & 1 deletion NodeGraphQt/pkg_info.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/usr/bin/python
# -*- coding: utf-8 -*-
__version__ = '0.6.11'
__version__ = '0.6.12'
__status__ = 'Work in Progress'
__license__ = 'MIT'

Expand Down
2 changes: 1 addition & 1 deletion examples/hotkeys/hotkey_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def save_session_as(graph):
graph.save_session(file_path)


def new_session(graph):
def clear_session(graph):
"""
Prompts a warning dialog to new a node graph session.
"""
Expand Down
7 changes: 7 additions & 0 deletions examples/hotkeys/hotkeys.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@
"function_name":"import_session",
"shortcut":""
},
{
"type":"command",
"label":"Clear Session...",
"file":"../examples/hotkeys/hotkey_functions.py",
"function_name":"clear_session",
"shortcut":""
},
{
"type":"command",
"label":"Save...",
Expand Down

0 comments on commit 0a9df7f

Please sign in to comment.