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:
authorCampbell Barton <ideasman42@gmail.com>2019-02-17 04:24:08 +0300
committerCampbell Barton <ideasman42@gmail.com>2019-02-17 04:52:53 +0300
commitae2b677dcb5a70f5f58e1da56b4fcf15b12ef851 (patch)
tree93dd1b8a40c6eed9ca8c6845f443f503c142c968 /source/blender/blenkernel/intern/mball.c
parent0d86259fc8a34c7ae3543008adc16e35d185fdbd (diff)
Cleanup: move object bounding-box into runtime struct
Diffstat (limited to 'source/blender/blenkernel/intern/mball.c')
-rw-r--r--source/blender/blenkernel/intern/mball.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/mball.c b/source/blender/blenkernel/intern/mball.c
index 10825a36ea6..14878cdf494 100644
--- a/source/blender/blenkernel/intern/mball.c
+++ b/source/blender/blenkernel/intern/mball.c
@@ -186,8 +186,10 @@ void BKE_mball_texspace_calc(Object *ob)
int tot;
bool do_it = false;
- if (ob->bb == NULL) ob->bb = MEM_callocN(sizeof(BoundBox), "mb boundbox");
- bb = ob->bb;
+ if (ob->runtime.bb == NULL) {
+ ob->runtime.bb = MEM_callocN(sizeof(BoundBox), "mb boundbox");
+ }
+ bb = ob->runtime.bb;
/* Weird one, this. */
/* INIT_MINMAX(min, max); */
@@ -222,8 +224,8 @@ BoundBox *BKE_mball_boundbox_get(Object *ob)
{
BLI_assert(ob->type == OB_MBALL);
- if (ob->bb != NULL && (ob->bb->flag & BOUNDBOX_DIRTY) == 0) {
- return ob->bb;
+ if (ob->runtime.bb != NULL && (ob->runtime.bb->flag & BOUNDBOX_DIRTY) == 0) {
+ return ob->runtime.bb;
}
/* This should always only be called with evaluated objects, but currently RNA is a problem here... */
@@ -231,7 +233,7 @@ BoundBox *BKE_mball_boundbox_get(Object *ob)
BKE_mball_texspace_calc(ob);
}
- return ob->bb;
+ return ob->runtime.bb;
}
float *BKE_mball_make_orco(Object *ob, ListBase *dispbase)
@@ -243,7 +245,7 @@ float *BKE_mball_make_orco(Object *ob, ListBase *dispbase)
int a;
/* restore size and loc */
- bb = ob->bb;
+ bb = ob->runtime.bb;
loc[0] = (bb->vec[0][0] + bb->vec[4][0]) / 2.0f;
size[0] = bb->vec[4][0] - loc[0];
loc[1] = (bb->vec[0][1] + bb->vec[2][1]) / 2.0f;