Cleanup: remove Mesh.bb and Curve.bb, no reason for these to be persistent

These were only strictly valid for texture space calculation, don't store them
since they should not be used after that. Only store a flag to indicate if the
auto texture space has been evaluated.

In the future it might make sense to store bounding boxes at the mesh level to
speed up bounding box computation for multiple objects using the same mesh, but
then it will need to be implemented differently.
This commit is contained in:
2019-09-23 15:31:11 +02:00
parent 5c89c689db
commit 9208146199
14 changed files with 95 additions and 176 deletions

View File

@@ -3023,9 +3023,7 @@ static void DRW_shgroup_texture_space(OBJECT_ShadingGroupList *sgl, Object *ob,
break;
case ID_CU: {
Curve *cu = (Curve *)ob_data;
if (cu->bb == NULL || (cu->bb->flag & BOUNDBOX_DIRTY)) {
BKE_curve_texspace_calc(cu);
}
BKE_curve_texspace_ensure(cu);
texcoloc = cu->loc;
texcosize = cu->size;
break;