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/editors | |
parent | 0d86259fc8a34c7ae3543008adc16e35d185fdbd (diff) |
Cleanup: move object bounding-box into runtime struct
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/object/object_transform.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 4 | ||||
-rw-r--r-- | source/blender/editors/space_view3d/view3d_edit.c | 4 |
3 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/object/object_transform.c b/source/blender/editors/object/object_transform.c index 24abafe7d0f..201e8a8ea16 100644 --- a/source/blender/editors/object/object_transform.c +++ b/source/blender/editors/object/object_transform.c @@ -1011,7 +1011,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) Curve *cu = ob->data; - if (ob->bb == NULL && (centermode != ORIGIN_TO_CURSOR)) { + if (ob->runtime.bb == NULL && (centermode != ORIGIN_TO_CURSOR)) { /* do nothing*/ } else { @@ -1020,8 +1020,8 @@ static int object_origin_set_exec(bContext *C, wmOperator *op) } else { /* extra 0.5 is the height o above line */ - cent[0] = 0.5f * (ob->bb->vec[4][0] + ob->bb->vec[0][0]); - cent[1] = 0.5f * (ob->bb->vec[0][1] + ob->bb->vec[2][1]); + cent[0] = 0.5f * (ob->runtime.bb->vec[4][0] + ob->runtime.bb->vec[0][0]); + cent[1] = 0.5f * (ob->runtime.bb->vec[0][1] + ob->runtime.bb->vec[2][1]); } cent[2] = 0.0f; diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index cf580e093fd..b84798581a0 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -5045,11 +5045,11 @@ static void sculpt_restore_mesh(Sculpt *sd, Object *ob) /* Copy the PBVH bounding box into the object's bounding box */ void sculpt_update_object_bounding_box(Object *ob) { - if (ob->bb) { + if (ob->runtime.bb) { float bb_min[3], bb_max[3]; BKE_pbvh_bounding_box(ob->sculpt->pbvh, bb_min, bb_max); - BKE_boundbox_init_from_minmax(ob->bb, bb_min, bb_max); + BKE_boundbox_init_from_minmax(ob->runtime.bb, bb_min, bb_max); } } diff --git a/source/blender/editors/space_view3d/view3d_edit.c b/source/blender/editors/space_view3d/view3d_edit.c index 6994b048698..aaf1d8a01a3 100644 --- a/source/blender/editors/space_view3d/view3d_edit.c +++ b/source/blender/editors/space_view3d/view3d_edit.c @@ -295,10 +295,10 @@ static bool view3d_orbit_calc_center(bContext *C, float r_dyn_ofs[3]) /* use the boundbox if we can */ Object *ob_eval = base_eval->object; - if (ob_eval->bb && !(ob_eval->bb->flag & BOUNDBOX_DIRTY)) { + if (ob_eval->runtime.bb && !(ob_eval->runtime.bb->flag & BOUNDBOX_DIRTY)) { float cent[3]; - BKE_boundbox_calc_center_aabb(ob_eval->bb, cent); + BKE_boundbox_calc_center_aabb(ob_eval->runtime.bb, cent); mul_m4_v3(ob_eval->obmat, cent); add_v3_v3(select_center, cent); |