Merge branch 'blender-v3.0-release'
This commit is contained in:
commit
cc17ed26ce
|
@ -1049,17 +1049,6 @@ static void check_property_socket_sync(const Object *ob, ModifierData *md)
|
|||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
bool has_geometry_output = false;
|
||||
LISTBASE_FOREACH (const bNodeSocket *, socket, &nmd->node_group->outputs) {
|
||||
if (socket->type == SOCK_GEOMETRY) {
|
||||
has_geometry_output = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!has_geometry_output) {
|
||||
BKE_modifier_set_error(ob, md, "Node group must have a geometry output");
|
||||
}
|
||||
}
|
||||
|
||||
static void modifyGeometry(ModifierData *md,
|
||||
|
@ -1078,6 +1067,7 @@ static void modifyGeometry(ModifierData *md,
|
|||
|
||||
if (tree.has_link_cycles()) {
|
||||
BKE_modifier_set_error(ctx->object, md, "Node group has cycles");
|
||||
geometry_set.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1085,17 +1075,23 @@ static void modifyGeometry(ModifierData *md,
|
|||
Span<const NodeRef *> input_nodes = root_tree_ref.nodes_by_type("NodeGroupInput");
|
||||
Span<const NodeRef *> output_nodes = root_tree_ref.nodes_by_type("NodeGroupOutput");
|
||||
if (output_nodes.size() != 1) {
|
||||
BKE_modifier_set_error(ctx->object, md, "Node group must have a single output node");
|
||||
geometry_set.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
const NodeRef &output_node = *output_nodes[0];
|
||||
Span<const InputSocketRef *> group_outputs = output_node.inputs().drop_back(1);
|
||||
if (group_outputs.is_empty()) {
|
||||
BKE_modifier_set_error(ctx->object, md, "Node group must have an output socket");
|
||||
geometry_set.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
const InputSocketRef *first_output_socket = group_outputs[0];
|
||||
if (first_output_socket->idname() != "NodeSocketGeometry") {
|
||||
BKE_modifier_set_error(ctx->object, md, "Node group's first output must be a geometry");
|
||||
geometry_set.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue