Merge commit 'b67b95767b7bfcd5f618ebc8e14ddbc83edcbe36'
All checks were successful
Build / build (push) Successful in 1m37s
All checks were successful
Build / build (push) Successful in 1m37s
This commit is contained in:
@@ -185,14 +185,13 @@ ox::Error Project::writeObj(ox::StringViewCR path, T const &obj) noexcept {
|
|||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
ox::Result<T> Project::loadObj(ox::StringViewCR path) const noexcept {
|
ox::Result<T> Project::loadObj(ox::StringViewCR path) const noexcept {
|
||||||
OX_REQUIRE_M(buff, loadBuff(path));
|
OX_REQUIRE(buff, loadBuff(path));
|
||||||
if constexpr(ox::is_same_v<T, ox::ModelObject>) {
|
if constexpr(ox::is_same_v<T, ox::ModelObject>) {
|
||||||
return keel::readAsset(m_typeStore, buff);
|
return keel::readAsset(m_typeStore, buff);
|
||||||
} else {
|
} else {
|
||||||
OX_REQUIRE(typeId, keel::readAssetTypeId(buff));
|
OX_REQUIRE(typeId, keel::readAssetTypeId(buff));
|
||||||
if (typeId != ox::ModelTypeId_v<T>) {
|
if (typeId != ox::ModelTypeId_v<T>) {
|
||||||
OX_REQUIRE(ah, keel::readAssetHeader(buff));
|
return keel::convert<T>(m_kctx, buff);
|
||||||
OX_RETURN_ERROR(keel::convertBuffToBuff<T>(m_kctx, buff, ah.clawHdr.fmt).moveTo(buff));
|
|
||||||
}
|
}
|
||||||
return keel::readAsset<T>(buff);
|
return keel::readAsset<T>(buff);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user