| 82 | } |
| 83 | |
| 84 | QString GetProjectPath() { |
| 85 | AEGP_ProjectH projectHandle = nullptr; |
| 86 | Suites->ProjSuite6()->AEGP_GetProjectByIndex(0, &projectHandle); |
| 87 | AEGP_MemHandle pathMemory; |
| 88 | Suites->ProjSuite6()->AEGP_GetProjectPath(projectHandle, &pathMemory); |
| 89 | std::string filePath = AeMemoryHandleToString(pathMemory); |
| 90 | Suites->MemorySuite1()->AEGP_FreeMemHandle(pathMemory); |
| 91 | if (!filePath.empty()) { |
| 92 | std::replace(filePath.begin(), filePath.end(), '\\', '/'); |
| 93 | } |
| 94 | QString projectPath = |
| 95 | QDir::cleanPath(QDir::fromNativeSeparators(QString::fromStdString(filePath))); |
| 96 | QFileInfo fileInfo(projectPath); |
| 97 | return fileInfo.absolutePath(); |
| 98 | } |
| 99 | |
| 100 | AEGP_ItemH GetActiveCompositionItem() { |
| 101 | AEGP_ItemH activeItemHandle = nullptr; |
no test coverage detected