How to check for Ogawa or hdf5

274 views
Skip to first unread message

haggi krey

unread,
Aug 14, 2018, 8:06:20 AM8/14/18
to alembic-discussion
Hi,

is there a way to find out if an achive uses Ogawa or Hdf5?

haggi

Dorian Fevrier

unread,
Aug 14, 2018, 8:23:36 AM8/14/18
to alembic-discussion
Hi Haggi, can I suggest to look at this code snippet:


It's exactly what you need. Roughtly:

Alembic::AbcCoreFactory::IFactory factory;
Alembic::AbcCoreFactory::IFactory::CoreType core_type;

Alembic::Abc::IArchive archive = factory.getArchive(file_path, core_type);

switch (core_type)
{
    case Alembic::AbcCoreFactory::IFactory::kHDF5:
        RENDERER_LOG_INFO("        core type: HDF5");
        break;
    case Alembic::AbcCoreFactory::IFactory::kOgawa:
        RENDERER_LOG_INFO("        core type: Ogawa");
        break;
    case Alembic::AbcCoreFactory::IFactory::kLayer:
        RENDERER_LOG_INFO("        core type: Layer");
        break;
    case Alembic::AbcCoreFactory::IFactory::kUnknown:
        RENDERER_LOG_WARNING("        core type: Unknown");
        break;
    assert_otherwise;
}

Hope this helps. :)

haggi krey

unread,
Aug 14, 2018, 8:34:47 AM8/14/18
to alembic-discussion
Ahhh, great. That's exactly what I need, thanks a lot.

Victor Lavrent'ev

unread,
Aug 30, 2018, 7:48:53 AM8/30/18
to alembic-discussion
Hi
There is a utility:
abcls -m alembic.abc

out:
Using Alembic 1.7.8 (built Aug  6 2018 19:43:11)
 
(file doesn't have any ArchiveInfo)
  core type : HDF5




вторник, 14 августа 2018 г., 15:06:20 UTC+3 пользователь haggi krey написал:
Reply all
Reply to author
Forward
0 new messages