forked from blender/blender
main sync #3
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user