| 435 | } |
| 436 | |
| 437 | std::string ModelPackageImpl::replaceRootModel(const std::filesystem::path& path, const std::string& name, const std::string& author, const std::string& description) |
| 438 | { |
| 439 | if (m_manifest->hasKey(kModelPackageRootModelKey)) { |
| 440 | auto rootModelIdentifier = m_manifest->getString(kModelPackageRootModelKey); |
| 441 | removeItem(rootModelIdentifier); |
| 442 | } |
| 443 | |
| 444 | auto identifier = addItem(path, name, author, description); |
| 445 | m_manifest->setString(kModelPackageRootModelKey, identifier); |
| 446 | return identifier; |
| 447 | } |
| 448 | |
| 449 | std::shared_ptr<ModelPackageItemInfo> ModelPackageImpl::getRootModel() const |
| 450 | { |