diff options
author | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-10 13:52:14 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@stuvel.eu> | 2017-02-10 13:54:00 +0300 |
commit | b929eef8c5ead2e1ac5e3d456cb82feeba589710 (patch) | |
tree | 331072d51118ea894affd4c94d0a528f9d46b636 /source/blender/alembic | |
parent | 38155c7d3c7685ee8cdc78a6119bdca5de7e075d (diff) |
Alembic: fixed mistake in bounding box computation
By performing the Z-up to Y-up conversion, the change in sign of the
Z-coordinate swaps "minimum" and "maximum".
Diffstat (limited to 'source/blender/alembic')
-rw-r--r-- | source/blender/alembic/intern/abc_object.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc index 9dfccdb8c7f..a5b8af542fc 100644 --- a/source/blender/alembic/intern/abc_object.cc +++ b/source/blender/alembic/intern/abc_object.cc @@ -97,14 +97,14 @@ Imath::Box3d AbcObjectWriter::bounds() return Imath::Box3d(); } - /* Convert Z-up to Y-up. */ + /* Convert Z-up to Y-up. This also changes which vector goes into which min/max property. */ this->m_bounds.min.x = bb->vec[0][0]; this->m_bounds.min.y = bb->vec[0][2]; - this->m_bounds.min.z = -bb->vec[0][1]; + this->m_bounds.min.z = -bb->vec[6][1]; this->m_bounds.max.x = bb->vec[6][0]; this->m_bounds.max.y = bb->vec[6][2]; - this->m_bounds.max.z = -bb->vec[6][1]; + this->m_bounds.max.z = -bb->vec[0][1]; return this->m_bounds; } |