Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes bug that outputs of inputnodes could have only one connection #70

Merged
merged 2 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion src/QuiltiX/qx_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,7 +624,6 @@ def on_output_connected(self, in_port, out_port):
in_port.color = QxNodeBase._random_color_from_string(out_port.view.get_mx_port_type())
in_port.model.name = name
in_port.view.name = name
in_port.view.multi_connection = False # refresh tooltip
text_item = self.view.get_output_text_item(in_port.view)
text_item.setPlainText(name)
out_port.model.connected_ports[self.id] = [name]
Expand Down
2 changes: 1 addition & 1 deletion src/QuiltiX/qx_nodegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ def get_mx_doc_from_serialized_data(self, serialized_data, mx_parent=None, paren

for input_data in node_data.get("input_ports", {}):
val = node_data.get("custom", {}).get(input_data["name"], node_data.get("custom", {}).get(input_data["name"] + "0"))
hasGeomProp = bool(mx_def.getActiveInput(input_data["name"]).getDefaultGeomProp())
hasGeomProp = mx_def and bool(mx_def.getActiveInput(input_data["name"]).getDefaultGeomProp())
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pls explain why mx_def ;)

isConnected = None
if hasGeomProp:
for connection in serialized_data.get("connections", []):
Expand Down