[Bf-blender-cvs] [26f8095384] blender2.8: Alembic: fixed mistake in bounding box computation
Sybren A. Stüvel
noreply at git.blender.org
Fri Feb 10 11:53:33 CET 2017
Commit: 26f8095384259f166a3ff1e88c53222bc796ace8
Author: Sybren A. Stüvel
Date: Fri Feb 10 11:52:14 2017 +0100
Branches: blender2.8
https://developer.blender.org/rB26f8095384259f166a3ff1e88c53222bc796ace8
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".
===================================================================
M source/blender/alembic/intern/abc_object.cc
===================================================================
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index 9dfccdb8c7..a5b8af542f 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;
}
More information about the Bf-blender-cvs
mailing list