Alembic procedural: fix potential zero scale matrix generation

This can happen during user edits or with files missing the global scale
property.
This commit is contained in:
Kévin Dietrich 2021-03-11 23:45:42 +01:00
parent 3256f0d52c
commit 2ebf4fbbfb
1 changed files with 4 additions and 0 deletions

View File

@ -1017,6 +1017,10 @@ void AlembicObject::setup_transform_cache(float scale)
cached_data.transforms.clear();
cached_data.transforms.invalidate_last_loaded_time();
if (scale == 0.0f) {
scale = 1.0f;
}
if (xform_time_sampling) {
cached_data.transforms.set_time_sampling(*xform_time_sampling);
}