Use proper path separators
This makes the script runnable under Linux/macOS, preventing an OSError
@@ -8,6 +8,7 @@ from NodeGraphQt import (NodeGraph,
update_nodes_by_down,
setup_context_menu)
from example_nodes import Nodes
+from os.path import sep
if __name__ == '__main__':
QtCore.QCoreApplication.setAttribute(QtCore.Qt.AA_EnableHighDpiScaling)
@@ -46,7 +47,7 @@ if __name__ == '__main__':
[graph.register_node(n) for n in Nodes]
# load preset session
- graph.load_session(r'example_nodes\networks\example.nodes')
+ graph.load_session('example_nodes'+sep+'networks'+sep+'example.nodes')
# update nodes
update_nodes_by_down(graph.all_nodes())
