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:52:51 +0300 |
commit | 26f8095384259f166a3ff1e88c53222bc796ace8 (patch) | |
tree | 79c61562116e65e775721dbd14b05fdadf1b44ed /source/blender/alembic | |
parent | ae6e9401abb7cf147367aaa84d04b186e6805d7c (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; } |