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:
Diffstat (limited to 'source/blender/draw/engines/overlay')
-rw-r--r--source/blender/draw/engines/overlay/overlay_extra.c7
-rw-r--r--source/blender/draw/engines/overlay/overlay_outline.c2
2 files changed, 4 insertions, 5 deletions
diff --git a/source/blender/draw/engines/overlay/overlay_extra.c b/source/blender/draw/engines/overlay/overlay_extra.c
index 9953480e7fa..4f0bf0b8048 100644
--- a/source/blender/draw/engines/overlay/overlay_extra.c
+++ b/source/blender/draw/engines/overlay/overlay_extra.c
@@ -345,18 +345,17 @@ static void OVERLAY_bounds(OVERLAY_ExtraCallBuffers *cb,
bool around_origin)
{
float center[3], size[3], tmp[4][4], final_mat[4][4];
- BoundBox bb_local;
if (ob->type == OB_MBALL && !BKE_mball_is_basis(ob)) {
return;
}
- BoundBox *bb = BKE_object_boundbox_get(ob);
-
+ const BoundBox *bb = BKE_object_boundbox_get(ob);
+ BoundBox bb_local;
if (bb == NULL) {
const float min[3] = {-1.0f, -1.0f, -1.0f}, max[3] = {1.0f, 1.0f, 1.0f};
+ BKE_boundbox_init_from_minmax(&bb_local, min, max);
bb = &bb_local;
- BKE_boundbox_init_from_minmax(bb, min, max);
}
BKE_boundbox_calc_size_aabb(bb, size);
diff --git a/source/blender/draw/engines/overlay/overlay_outline.c b/source/blender/draw/engines/overlay/overlay_outline.c
index cb94008f53f..8010319e3fa 100644
--- a/source/blender/draw/engines/overlay/overlay_outline.c
+++ b/source/blender/draw/engines/overlay/overlay_outline.c
@@ -32,7 +32,7 @@ static void gpencil_depth_plane(Object *ob, float r_plane[4])
* strokes not aligned with the object axes. Maybe we could try to
* compute the minimum axis of all strokes. But this would be more
* computationally heavy and should go into the GPData evaluation. */
- BoundBox *bbox = BKE_object_boundbox_get(ob);
+ const BoundBox *bbox = BKE_object_boundbox_get(ob);
/* Convert bbox to matrix */
float mat[4][4], size[3], center[3];
BKE_boundbox_calc_size_aabb(bbox, size);