Geometry Nodes: remove incorrect assert

It is perfectly valid that an attribute does not exist and cannot be created.
For example, this can happen when a mesh does not contain any vertices.
This commit is contained in:
2021-02-12 12:33:04 +01:00
parent 26481eabe1
commit 9fa6e06287

View File

@@ -84,19 +84,15 @@ static void move_split_attributes(const GeometryComponent &in_component,
const CustomDataType data_type = bke::cpp_type_to_custom_data_type(attribute->cpp_type());
const AttributeDomain domain = attribute->domain();
/* Don't try to create the attribute on the new component if it already exists. Built-in
* attributes will already exist on new components by definition. It should always be possible
* to recreate the attribute on the same component type. Also, if one of the new components
* has the attribute the other one should have it too, but check independently to be safe. */
/* Don't try to create the attribute on the new component if it already exists (i.e. has been
* initialized by someone else). */
if (!out_component_a.attribute_exists(name)) {
if (!out_component_a.attribute_try_create(name, domain, data_type)) {
BLI_assert(false);
continue;
}
}
if (!out_component_b.attribute_exists(name)) {
if (!out_component_b.attribute_try_create(name, domain, data_type)) {
BLI_assert(false);
continue;
}
}