diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-02-17 04:24:08 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-02-17 04:52:53 +0300 |
commit | ae2b677dcb5a70f5f58e1da56b4fcf15b12ef851 (patch) | |
tree | 93dd1b8a40c6eed9ca8c6845f443f503c142c968 /source/blender/blenkernel/intern/mesh.c | |
parent | 0d86259fc8a34c7ae3543008adc16e35d185fdbd (diff) |
Cleanup: move object bounding-box into runtime struct
Diffstat (limited to 'source/blender/blenkernel/intern/mesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 9a725be302c..780712c8e25 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -897,7 +897,7 @@ void BKE_mesh_texspace_calc(Mesh *me) BoundBox *BKE_mesh_boundbox_get(Object *ob) { /* This is Object-level data access, DO NOT touch to Mesh's bb, would be totally thread-unsafe. */ - if (ob->bb == NULL || ob->bb->flag & BOUNDBOX_DIRTY) { + if (ob->runtime.bb == NULL || ob->runtime.bb->flag & BOUNDBOX_DIRTY) { Mesh *me = ob->data; float min[3], max[3]; @@ -907,14 +907,14 @@ BoundBox *BKE_mesh_boundbox_get(Object *ob) max[0] = max[1] = max[2] = 1.0f; } - if (ob->bb == NULL) { - ob->bb = MEM_mallocN(sizeof(*ob->bb), __func__); + if (ob->runtime.bb == NULL) { + ob->runtime.bb = MEM_mallocN(sizeof(*ob->runtime.bb), __func__); } - BKE_boundbox_init_from_minmax(ob->bb, min, max); - ob->bb->flag &= ~BOUNDBOX_DIRTY; + BKE_boundbox_init_from_minmax(ob->runtime.bb, min, max); + ob->runtime.bb->flag &= ~BOUNDBOX_DIRTY; } - return ob->bb; + return ob->runtime.bb; } BoundBox *BKE_mesh_texspace_get(Mesh *me, float r_loc[3], float r_rot[3], float r_size[3]) |