[Bf-blender-cvs] [60a2d99044] temp-sybren-alembic: Alembic: Don't compute world matrix when it's not necessary.

Sybren A. Stüvel noreply at git.blender.org
Fri Feb 24 17:05:53 CET 2017


Commit: 60a2d99044c3e7554d813f2e52e108ce449baf5c
Author: Sybren A. Stüvel
Date:   Wed Feb 15 15:30:34 2017 +0100
Branches: temp-sybren-alembic
https://developer.blender.org/rB60a2d99044c3e7554d813f2e52e108ce449baf5c

Alembic: Don't compute world matrix when it's not necessary.

===================================================================

M	source/blender/alembic/intern/abc_util.cc

===================================================================

diff --git a/source/blender/alembic/intern/abc_util.cc b/source/blender/alembic/intern/abc_util.cc
index e3152a17f6..d5775f235a 100644
--- a/source/blender/alembic/intern/abc_util.cc
+++ b/source/blender/alembic/intern/abc_util.cc
@@ -230,11 +230,7 @@ void convert_matrix(const Imath::M44d &xform, Object *ob,
 
 	create_transform_matrix(r_mat);
 
-	if (ob->parent) {
-		mul_m4_m4m4(r_mat, ob->parent->obmat, r_mat);
-	}
-	/* TODO(kevin) */
-	else if (!has_alembic_parent) {
+	if (!has_alembic_parent) {
 		/* Only apply scaling to root objects, parenting will propagate it. */
 		float scale_mat[4][4];
 		scale_m4_fl(scale_mat, scale);
@@ -261,6 +257,9 @@ void create_transform_matrix(Object *obj, float transform_mat[4][4])
 	unit_m4(mat);
 
 	/* get local matrix. */
+	/* TODO Sybren: when we're exporting as "flat", i.e. non-hierarchial,
+	 * we should export the world matrix even when the object has a parent
+	 * Blender Object. */
 	if (obj->parent) {
 		invert_m4_m4(invmat, obj->parent->obmat);
 		mul_m4_m4m4(mat, invmat, obj->obmat);




More information about the Bf-blender-cvs mailing list