| 26 | namespace exporter { |
| 27 | |
| 28 | AEResourceType GetAEItemResourceType(AEGP_ItemH& item) { |
| 29 | const auto& suites = GetSuites(); |
| 30 | |
| 31 | AEGP_ItemType itemType = AEGP_ItemType_NONE; |
| 32 | suites->ItemSuite8()->AEGP_GetItemType(item, &itemType); |
| 33 | if (itemType == AEGP_ItemType_FOLDER) { |
| 34 | return AEResourceType::Folder; |
| 35 | } |
| 36 | if (itemType == AEGP_ItemType_COMP) { |
| 37 | return AEResourceType::Composition; |
| 38 | } |
| 39 | if (itemType == AEGP_ItemType_FOOTAGE) { |
| 40 | AEGP_ItemFlags itemFlags; |
| 41 | suites->ItemSuite6()->AEGP_GetItemFlags(item, &itemFlags); |
| 42 | if (itemFlags & AEGP_ItemFlag_STILL) { |
| 43 | AEGP_FootageH footageHandle = nullptr; |
| 44 | suites->FootageSuite5()->AEGP_GetMainFootageFromItem(item, &footageHandle); |
| 45 | AEGP_FootageSignature signature; |
| 46 | suites->FootageSuite5()->AEGP_GetFootageSignature(footageHandle, &signature); |
| 47 | if (signature != AEGP_FootageSignature_SOLID && signature != AEGP_FootageSignature_MISSING && |
| 48 | signature != AEGP_FootageSignature_NONE) { |
| 49 | return AEResourceType::Image; |
| 50 | } |
| 51 | } |
| 52 | } |
| 53 | return AEResourceType::Unknown; |
| 54 | } |
| 55 | |
| 56 | bool HasCompositionResource() { |
| 57 | const auto& suites = GetSuites(); |
no test coverage detected