Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-23 16:31:11 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2019-09-23 17:27:23 +0300
commit9208146199019e111711f077abcda31f976cabcc (patch)
treedf287ca58b1f8d6d27ecb19f6bd02de8d5b39249 /source/blender/makesrna
parent5c89c689db5c68602aecb55a0a7891059021eeaf (diff)
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.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_curve.c8
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c8
2 files changed, 4 insertions, 12 deletions
diff --git a/source/blender/makesrna/intern/rna_curve.c b/source/blender/makesrna/intern/rna_curve.c
index a7dac4100db..aab78c269e6 100644
--- a/source/blender/makesrna/intern/rna_curve.c
+++ b/source/blender/makesrna/intern/rna_curve.c
@@ -291,9 +291,7 @@ static void rna_Curve_texspace_loc_get(PointerRNA *ptr, float *values)
{
Curve *cu = (Curve *)ptr->data;
- if (!cu->bb) {
- BKE_curve_texspace_calc(cu);
- }
+ BKE_curve_texspace_ensure(cu);
copy_v3_v3(values, cu->loc);
}
@@ -309,9 +307,7 @@ static void rna_Curve_texspace_size_get(PointerRNA *ptr, float *values)
{
Curve *cu = (Curve *)ptr->data;
- if (!cu->bb) {
- BKE_curve_texspace_calc(cu);
- }
+ BKE_curve_texspace_ensure(cu);
copy_v3_v3(values, cu->size);
}
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index af9d3d7cf1b..ed605376f0c 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -503,9 +503,7 @@ static void rna_Mesh_texspace_size_get(PointerRNA *ptr, float values[3])
{
Mesh *me = (Mesh *)ptr->data;
- if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
- BKE_mesh_texspace_calc(me);
- }
+ BKE_mesh_texspace_ensure(me);
copy_v3_v3(values, me->size);
}
@@ -514,9 +512,7 @@ static void rna_Mesh_texspace_loc_get(PointerRNA *ptr, float values[3])
{
Mesh *me = (Mesh *)ptr->data;
- if (me->bb == NULL || (me->bb->flag & BOUNDBOX_DIRTY)) {
- BKE_mesh_texspace_calc(me);
- }
+ BKE_mesh_texspace_ensure(me);
copy_v3_v3(values, me->loc);
}