Fix #105791: Alembic procedural ignores materials #105798

Merged
Hans Goudey merged 1 commits from HooglyBoogly/blender:fix-alembic-cycles-material into blender-v3.5-release 2023-03-15 19:02:04 +01:00
1 changed files with 4 additions and 0 deletions

View File

@ -156,6 +156,10 @@ static Mesh *generate_bounding_box_mesh(const Mesh *org_mesh)
}
Mesh *result = geometry::create_cuboid_mesh(max - min, 2, 2, 2);
if (org_mesh->mat) {
result->mat = static_cast<Material **>(MEM_dupallocN(org_mesh->mat));
result->totcol = org_mesh->totcol;
}
BKE_mesh_translate(result, math::midpoint(min, max), false);
return result;