Fix #106257: Move to Nodes does not work if the node tree has no Geometry input or output #110670

Merged
Hans Goudey merged 2 commits from fiord/blender:fix/empty-move-to-nodes into main 2023-08-02 14:00:39 +02:00

View File

@ -153,6 +153,9 @@ class MoveModifierToNodes(Operator):
if not first_geometry_input:
first_geometry_input = group_node_input
if not first_geometry_input:
self.report({"WARNING"}, "Node group must have a geometry input")

Suggestion: "Node group must have a geometry input"

"null" is a programming term and generally not used in the UI

Suggestion: "Node group must have a geometry input" "null" is a programming term and generally not used in the UI

@HooglyBoogly Thank you for the review! I fixed by 2e2d9817f9, could you rereview this?

@HooglyBoogly Thank you for the review! I fixed by https://projects.blender.org/blender/blender/commit/2e2d9817f9a35b8ad5ffb91077fc89c15ee20e64, could you rereview this?
return {'CANCELLED'}
group.links.new(group_input_node.outputs[0], first_geometry_input)
# Adjust locations of named attribute input nodes and group input node to make some space.
@ -195,6 +198,9 @@ class MoveModifierToNodes(Operator):
group.links.new(store_nodes[-1].outputs["Geometry"], group_output_node.inputs[data_("Geometry")])
else:
if not first_geometry_output:
self.report({"WARNING"}, "Node group must have a geometry output")
return {"CANCELLED"}
group.links.new(first_geometry_output, group_output_node.inputs[data_("Geometry")])
modifier.node_group = group