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:
authorSybren A. Stüvel <sybren@blender.org>2019-08-01 15:54:22 +0300
committerSybren A. Stüvel <sybren@blender.org>2019-08-01 15:54:22 +0300
commit2741992f6608c0f76e1bc95ca5d6e05a63348c7f (patch)
tree2047e13b2ecf9046045f145db4286e72bd174bda /source/blender/alembic
parent08a63215018222062e6d669f9ac4de3980722042 (diff)
Fix T61935: load camera transforms from Alembic files written by Meshroom
Meshroom writes two hierarchies to Alembic, one rooted at `/mvgRoot/mvgCameras` and the other at `/mvgRoot/mvgCamerasUndefined`. These paths have no schema definition, and thus are ignored by Blender. The cameras themselves have those schemaless paths as parent, and have their transforms marked as "inherited", e.g. relative to their parent. As these cameras have no valid parent, there is no Blender object to use to convert their local matrices to world matrices, and Blender just decided to reset them to the unit matrix. Now "inherited" transforms without a parent in Blender are interpreted as world transforms. Reparenting those objects to a Blender object will re-interpret the transforms as local to the parent again.
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_object.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_object.cc b/source/blender/alembic/intern/abc_object.cc
index 7b0d94a2305..f863fe4fee7 100644
--- a/source/blender/alembic/intern/abc_object.cc
+++ b/source/blender/alembic/intern/abc_object.cc
@@ -335,8 +335,10 @@ void AbcObjectReader::read_matrix(float r_mat[4][4],
mul_m4_m4m4(r_mat, m_object->parent->obmat, r_mat);
}
else {
- /* This can happen if the user deleted the parent object. */
- unit_m4(r_mat);
+ /* This can happen if the user deleted the parent object, but also if the Alembic parent was
+ * not imported (because of unknown/unsupported schema, for example). In that case just use
+ * the local matrix as if it is the world matrix. This allows us to import Alembic files from
+ * MeshRoom, see T61935. */
}
}
else {