diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-08-17 23:20:15 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2016-08-17 23:26:50 +0300 |
commit | 8e7bbe66ddc402fccf05defc109e6dced74b567b (patch) | |
tree | 8af81a91a4d6fd618483f3649aa2713cddb6b93e /source/blender/alembic/intern/abc_util.h | |
parent | 294b0756b441ac7a41d861ea6fd1088a8a6fd8ba (diff) |
Alembic import: fix scene min/max time computation to take objects with
transform animations into account.
Diffstat (limited to 'source/blender/alembic/intern/abc_util.h')
-rw-r--r-- | source/blender/alembic/intern/abc_util.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/source/blender/alembic/intern/abc_util.h b/source/blender/alembic/intern/abc_util.h index 688a25d85f6..8cdfe21e43f 100644 --- a/source/blender/alembic/intern/abc_util.h +++ b/source/blender/alembic/intern/abc_util.h @@ -64,7 +64,7 @@ void create_input_transform(const Alembic::AbcGeom::ISampleSelector &sample_sel, float r_mat[4][4], float scale, bool has_alembic_parent = false); template <typename Schema> -void get_min_max_time(const Schema &schema, chrono_t &min, chrono_t &max) +void get_min_max_time_ex(const Schema &schema, chrono_t &min, chrono_t &max) { const Alembic::Abc::TimeSamplingPtr &time_samp = schema.getTimeSampling(); @@ -81,6 +81,15 @@ void get_min_max_time(const Schema &schema, chrono_t &min, chrono_t &max) } } +template <typename Schema> +void get_min_max_time(const Alembic::AbcGeom::IObject &object, const Schema &schema, chrono_t &min, chrono_t &max) +{ + get_min_max_time_ex(schema, min, max); + + Alembic::AbcGeom::IXform parent(object.getParent(), Alembic::AbcGeom::kWrapExisting); + get_min_max_time_ex(parent.getSchema(), min, max); +} + bool has_property(const Alembic::Abc::ICompoundProperty &prop, const std::string &name); /* ************************** */ |