Alembic import: fixed bug where local matrix from Alembic was used as object matrix
[blender.git] / source / blender / alembic / intern / alembic_capi.cc
index 44d902907c3ebc551371199018dfcb202e5f420b..44f495428281ee4154384e4c0be05994138be08b 100644 (file)
@@ -639,7 +639,6 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa
 
                if (reader->valid()) {
                        reader->readObjectData(data->bmain, 0.0f);
-                       reader->readObjectMatrix(0.0f);
 
                        min_time = std::min(min_time, reader->minTime());
                        max_time = std::max(max_time, reader->maxTime());
@@ -712,6 +711,12 @@ static void import_startjob(void *user_data, short *stop, short *do_update, floa
                        return;
                }
        }
+
+       /* Setup transformations and constraints. */
+       for (iter = data->readers.begin(); iter != data->readers.end(); ++iter) {
+               AbcObjectReader *reader = *iter;
+               reader->setupObjectTransform(0.0f);
+       }
 }
 
 static void import_endjob(void *user_data)