Skip to content
Snippets Groups Projects
Commit c9290d23 authored by Hans Goudey's avatar Hans Goudey Committed by Philipp Oeser
Browse files

Fix T96494: Array modifier with caps crash on curve objects

Since 3b6ee8ce, a list of vertex groups cannot be retrieved
from curve objects for merging because curve objects do not support
vertex groups. Previously the empty list on the object was returned.
Only mesh objects are supported for the caps.
parent b444ed2b
No related branches found
Tags
No related merge requests found
......@@ -412,8 +412,10 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
Object *start_cap_ob = amd->start_cap;
if (start_cap_ob && start_cap_ob != ctx->object) {
if (start_cap_ob->type == OB_MESH && ctx->object->type == OB_MESH) {
vgroup_start_cap_remap = BKE_object_defgroup_index_map_create(
start_cap_ob, ctx->object, &vgroup_start_cap_remap_len);
}
start_cap_mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(start_cap_ob, false);
if (start_cap_mesh) {
......@@ -425,8 +427,10 @@ static Mesh *arrayModifier_doArray(ArrayModifierData *amd,
}
Object *end_cap_ob = amd->end_cap;
if (end_cap_ob && end_cap_ob != ctx->object) {
if (start_cap_ob->type == OB_MESH && ctx->object->type == OB_MESH) {
vgroup_end_cap_remap = BKE_object_defgroup_index_map_create(
end_cap_ob, ctx->object, &vgroup_end_cap_remap_len);
}
end_cap_mesh = BKE_modifier_get_evaluated_mesh_from_evaluated_object(end_cap_ob, false);
if (end_cap_mesh) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment