From dbf201e2880828c5de04bad70bb8c69925a0bee5 Mon Sep 17 00:00:00 2001 From: elser Date: Tue, 1 Aug 2023 15:30:18 -0400 Subject: [PATCH 1/8] add test for blank tileset --- .../cesium/omniverse/tests/extension_test.py | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/exts/cesium.omniverse/cesium/omniverse/tests/extension_test.py b/exts/cesium.omniverse/cesium/omniverse/tests/extension_test.py index 27b6820fc..a1e10b418 100644 --- a/exts/cesium.omniverse/cesium/omniverse/tests/extension_test.py +++ b/exts/cesium.omniverse/cesium/omniverse/tests/extension_test.py @@ -1,5 +1,9 @@ import omni.kit.test import omni.kit.ui_test as ui_test +import omni.usd +import pxr.Usd + +import cesium.usd from typing import Optional @@ -25,3 +29,19 @@ async def test_window_docked(self): await _window_ref.focus() await ui_test.wait_n_updates(4) self.assertTrue(_window_ref.window.docked) + + async def test_blank_tileset(self): + global _window_ref + + blankTilesetButton = _window_ref.find("**/Button[*].text=='Blank 3D Tiles Tileset'") + self.assertIsNotNone(blankTilesetButton) + + stage: pxr.Usd.Stage = omni.usd.get_context().get_stage() + self.assertIsNotNone(stage) + + self.assertFalse(any([i.IsA(cesium.usd.plugins.CesiumUsdSchemas.Tileset) for i in stage.Traverse()])) + + await blankTilesetButton.click() + + await ui_test.wait_n_updates(2) # passes without, but seems prudent + self.assertTrue(any([i.IsA(cesium.usd.plugins.CesiumUsdSchemas.Tileset) for i in stage.Traverse()])) From 8ca6e4a2685793db22eb8f72ef61a0b5e776dbde Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Wed, 2 Aug 2023 09:25:31 -0400 Subject: [PATCH 2/8] Update cesium-native to v0.26.0 --- extern/CMakeLists.txt | 1 + extern/cesium-native | 2 +- src/core/CMakeLists.txt | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 128925030..6d560b373 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -25,6 +25,7 @@ add_external_project( uriparser webpdecoder turbojpeg + meshoptimizer OPTIONS CESIUM_TESTS_ENABLED=OFF CESIUM_COVERAGE_ENABLED=OFF diff --git a/extern/cesium-native b/extern/cesium-native index 6cb980762..172ac5ddc 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 6cb9807626d51f0e2ab8e0161e2f1e4da5f41a40 +Subproject commit 172ac5ddcce602c8b268ad342639554dea2f6004 diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index f32748c51..2d3e883dd 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -55,6 +55,7 @@ setup_lib( uriparser webpdecoder turbojpeg + meshoptimizer cpr::cpr stb::stb ZLIB::ZLIB From 8b652820ccf40063d67eb887fc0927ec15862364 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Wed, 2 Aug 2023 09:37:01 -0400 Subject: [PATCH 3/8] Release FabricMeshes stored in TileLoadThreadResult --- src/core/src/FabricPrepareRenderResources.cpp | 44 ++++++++++--------- 1 file changed, 24 insertions(+), 20 deletions(-) diff --git a/src/core/src/FabricPrepareRenderResources.cpp b/src/core/src/FabricPrepareRenderResources.cpp index 31a2461e5..c7cf85297 100644 --- a/src/core/src/FabricPrepareRenderResources.cpp +++ b/src/core/src/FabricPrepareRenderResources.cpp @@ -193,6 +193,28 @@ void setFabricMeshes( } } +void freeFabricMeshes(const std::vector& fabricMeshes) { + auto& fabricResourceManager = FabricResourceManager::getInstance(); + + for (const auto& mesh : fabricMeshes) { + auto& geometry = mesh.geometry; + auto& material = mesh.material; + auto& baseColorTexture = mesh.baseColorTexture; + + assert(geometry != nullptr); + + fabricResourceManager.releaseGeometry(geometry); + + if (material != nullptr) { + fabricResourceManager.releaseMaterial(material); + } + + if (baseColorTexture != nullptr) { + fabricResourceManager.releaseTexture(baseColorTexture); + } + } +} + } // namespace FabricPrepareRenderResources::FabricPrepareRenderResources(const OmniTileset& tileset) @@ -307,31 +329,13 @@ void FabricPrepareRenderResources::free( void* pMainThreadResult) noexcept { if (pLoadThreadResult) { const auto pTileLoadThreadResult = reinterpret_cast(pLoadThreadResult); + freeFabricMeshes(pTileLoadThreadResult->fabricMeshes); delete pTileLoadThreadResult; } if (pMainThreadResult) { const auto pTileRenderResources = reinterpret_cast(pMainThreadResult); - auto& fabricResourceManager = FabricResourceManager::getInstance(); - - for (const auto& mesh : pTileRenderResources->fabricMeshes) { - auto& geometry = mesh.geometry; - auto& material = mesh.material; - auto& baseColorTexture = mesh.baseColorTexture; - - assert(geometry != nullptr); - - fabricResourceManager.releaseGeometry(geometry); - - if (material != nullptr) { - fabricResourceManager.releaseMaterial(material); - } - - if (baseColorTexture != nullptr) { - fabricResourceManager.releaseTexture(baseColorTexture); - } - } - + freeFabricMeshes(pTileRenderResources->fabricMeshes); delete pTileRenderResources; } } From 2f693f532f2b0ec30832fbd70ecf712af5353999 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Wed, 2 Aug 2023 10:51:08 -0400 Subject: [PATCH 4/8] Fix handling when tileset is destroyed mid load --- .../include/cesium/omniverse/FabricGeometry.h | 5 +- .../cesium/omniverse/FabricGeometryPool.h | 4 +- .../include/cesium/omniverse/FabricMaterial.h | 5 +- .../cesium/omniverse/FabricMaterialPool.h | 4 +- .../omniverse/FabricPrepareRenderResources.h | 5 +- .../cesium/omniverse/FabricResourceManager.h | 15 ++++- src/core/include/cesium/omniverse/UsdUtil.h | 1 + src/core/src/FabricGeometry.cpp | 41 +++++++++++-- src/core/src/FabricGeometryPool.cpp | 8 ++- src/core/src/FabricMaterial.cpp | 35 +++++++++-- src/core/src/FabricMaterialPool.cpp | 8 ++- src/core/src/FabricPrepareRenderResources.cpp | 56 +++++++++--------- src/core/src/FabricResourceManager.cpp | 58 ++++++++++++++----- src/core/src/FabricUtil.cpp | 5 -- src/core/src/OmniTileset.cpp | 4 +- src/core/src/UsdUtil.cpp | 8 ++- 16 files changed, 186 insertions(+), 76 deletions(-) diff --git a/src/core/include/cesium/omniverse/FabricGeometry.h b/src/core/include/cesium/omniverse/FabricGeometry.h index cd3ea2eac..84006d4f8 100644 --- a/src/core/include/cesium/omniverse/FabricGeometry.h +++ b/src/core/include/cesium/omniverse/FabricGeometry.h @@ -20,7 +20,8 @@ class FabricGeometry { FabricGeometry( const pxr::SdfPath& path, const FabricGeometryDefinition& geometryDefinition, - bool debugRandomColors); + bool debugRandomColors, + long stageId); ~FabricGeometry(); void setGeometry( @@ -44,10 +45,12 @@ class FabricGeometry { private: void initialize(); void reset(); + bool stageDestroyed(); const omni::fabric::Path _pathFabric; const FabricGeometryDefinition _geometryDefinition; const bool _debugRandomColors; + const long _stageId; }; } // namespace cesium::omniverse diff --git a/src/core/include/cesium/omniverse/FabricGeometryPool.h b/src/core/include/cesium/omniverse/FabricGeometryPool.h index 18d2d4046..baf4cb075 100644 --- a/src/core/include/cesium/omniverse/FabricGeometryPool.h +++ b/src/core/include/cesium/omniverse/FabricGeometryPool.h @@ -12,7 +12,8 @@ class FabricGeometryPool final : public ObjectPool { int64_t poolId, const FabricGeometryDefinition& geometryDefinition, uint64_t initialCapacity, - bool debugRandomColors); + bool debugRandomColors, + long stageId); [[nodiscard]] const FabricGeometryDefinition& getGeometryDefinition() const; @@ -24,6 +25,7 @@ class FabricGeometryPool final : public ObjectPool { const int64_t _poolId; const FabricGeometryDefinition _geometryDefinition; const bool _debugRandomColors; + const long _stageId; }; } // namespace cesium::omniverse diff --git a/src/core/include/cesium/omniverse/FabricMaterial.h b/src/core/include/cesium/omniverse/FabricMaterial.h index 3b3f635be..d19c80b34 100644 --- a/src/core/include/cesium/omniverse/FabricMaterial.h +++ b/src/core/include/cesium/omniverse/FabricMaterial.h @@ -26,7 +26,8 @@ class FabricMaterial { FabricMaterial( pxr::SdfPath path, const FabricMaterialDefinition& materialDefinition, - pxr::SdfAssetPath defaultTextureAssetPath); + pxr::SdfAssetPath defaultTextureAssetPath, + long stageId); ~FabricMaterial(); void setMaterial(int64_t tilesetId, const MaterialInfo& materialInfo); @@ -46,9 +47,11 @@ class FabricMaterial { void setTilesetId(int64_t tilesetId); void setMaterialValues(const MaterialInfo& materialInfo); void setBaseColorTextureValues(const pxr::SdfAssetPath& textureAssetPath, const TextureInfo& textureInfo); + bool stageDestroyed(); const FabricMaterialDefinition _materialDefinition; const pxr::SdfAssetPath _defaultTextureAssetPath; + const long _stageId; omni::fabric::Path _materialPathFabric; omni::fabric::Path _shaderPathFabric; diff --git a/src/core/include/cesium/omniverse/FabricMaterialPool.h b/src/core/include/cesium/omniverse/FabricMaterialPool.h index 79cb3ecce..0b5d34e67 100644 --- a/src/core/include/cesium/omniverse/FabricMaterialPool.h +++ b/src/core/include/cesium/omniverse/FabricMaterialPool.h @@ -14,7 +14,8 @@ class FabricMaterialPool final : public ObjectPool { int64_t poolId, const FabricMaterialDefinition& materialDefinition, uint64_t initialCapacity, - pxr::SdfAssetPath defaultTextureAssetPath); + pxr::SdfAssetPath defaultTextureAssetPath, + long stageId); [[nodiscard]] const FabricMaterialDefinition& getMaterialDefinition() const; @@ -26,6 +27,7 @@ class FabricMaterialPool final : public ObjectPool { const int64_t _poolId; const FabricMaterialDefinition _materialDefinition; const pxr::SdfAssetPath _defaultTextureAssetPath; + const long _stageId; }; } // namespace cesium::omniverse diff --git a/src/core/include/cesium/omniverse/FabricPrepareRenderResources.h b/src/core/include/cesium/omniverse/FabricPrepareRenderResources.h index f939e1a5c..6a51fb03a 100644 --- a/src/core/include/cesium/omniverse/FabricPrepareRenderResources.h +++ b/src/core/include/cesium/omniverse/FabricPrepareRenderResources.h @@ -68,9 +68,10 @@ class FabricPrepareRenderResources final : public Cesium3DTilesSelection::IPrepa const Cesium3DTilesSelection::RasterOverlayTile& rasterTile, void* pMainThreadRendererResources) noexcept override; - private: [[nodiscard]] bool tilesetExists() const; + void detachTileset(); - const OmniTileset& _tileset; + private: + const OmniTileset* _tileset; }; } // namespace cesium::omniverse diff --git a/src/core/include/cesium/omniverse/FabricResourceManager.h b/src/core/include/cesium/omniverse/FabricResourceManager.h index 3ab2f4e67..f06036ffe 100644 --- a/src/core/include/cesium/omniverse/FabricResourceManager.h +++ b/src/core/include/cesium/omniverse/FabricResourceManager.h @@ -46,10 +46,13 @@ class FabricResourceManager { bool hasImagery, const pxr::SdfPath& materialPath) const; - std::shared_ptr - acquireGeometry(const CesiumGltf::Model& model, const CesiumGltf::MeshPrimitive& primitive, bool smoothNormals); + std::shared_ptr acquireGeometry( + const CesiumGltf::Model& model, + const CesiumGltf::MeshPrimitive& primitive, + bool smoothNormals, + long stageId); - std::shared_ptr acquireMaterial(const MaterialInfo& materialInfo, bool hasImagery); + std::shared_ptr acquireMaterial(const MaterialInfo& materialInfo, bool hasImagery, long stageId); std::shared_ptr acquireTexture(); @@ -78,6 +81,12 @@ class FabricResourceManager { std::shared_ptr getMaterialPool(const FabricMaterialDefinition& materialDefinition); std::shared_ptr getTexturePool(); + std::shared_ptr + createGeometryPool(const FabricGeometryDefinition& geometryDefinition, long stageId); + std::shared_ptr + createMaterialPool(const FabricMaterialDefinition& materialDefinition, long stageId); + std::shared_ptr createTexturePool(); + int64_t getNextGeometryId(); int64_t getNextMaterialId(); int64_t getNextTextureId(); diff --git a/src/core/include/cesium/omniverse/UsdUtil.h b/src/core/include/cesium/omniverse/UsdUtil.h index 3539a63b3..130715975 100644 --- a/src/core/include/cesium/omniverse/UsdUtil.h +++ b/src/core/include/cesium/omniverse/UsdUtil.h @@ -58,6 +58,7 @@ class ScopedEdit { static const auto GEOREFERENCE_PATH = pxr::SdfPath("/CesiumGeoreference"); pxr::UsdStageRefPtr getUsdStage(); +long getUsdStageId(); omni::fabric::StageReaderWriter getFabricStageReaderWriter(); omni::fabric::StageReaderWriterId getFabricStageReaderWriterId(); diff --git a/src/core/src/FabricGeometry.cpp b/src/core/src/FabricGeometry.cpp index fe05f47a4..2bc0f8a0b 100644 --- a/src/core/src/FabricGeometry.cpp +++ b/src/core/src/FabricGeometry.cpp @@ -34,25 +34,43 @@ const auto DEFAULT_VISIBILITY = false; FabricGeometry::FabricGeometry( const pxr::SdfPath& path, const FabricGeometryDefinition& geometryDefinition, - bool debugRandomColors) + bool debugRandomColors, + long stageId) : _pathFabric(path.GetText()) , _geometryDefinition(geometryDefinition) - , _debugRandomColors(debugRandomColors) { + , _debugRandomColors(debugRandomColors) + , _stageId(stageId) { + if (stageDestroyed()) { + return; + } + initialize(); reset(); } FabricGeometry::~FabricGeometry() { + if (stageDestroyed()) { + return; + } + FabricUtil::destroyPrim(_pathFabric); } void FabricGeometry::setActive(bool active) { + if (stageDestroyed()) { + return; + } + if (!active) { reset(); } } void FabricGeometry::setVisibility(bool visible) { + if (stageDestroyed()) { + return; + } + auto srw = UsdUtil::getFabricStageReaderWriter(); auto worldVisibilityFabric = srw.getAttributeWr(_pathFabric, FabricTokens::_worldVisibility); @@ -68,6 +86,10 @@ const FabricGeometryDefinition& FabricGeometry::getGeometryDefinition() const { } void FabricGeometry::setMaterial(const omni::fabric::Path& materialPath) { + if (stageDestroyed()) { + return; + } + auto srw = UsdUtil::getFabricStageReaderWriter(); srw.setArrayAttributeSize(_pathFabric, FabricTokens::material_binding, 1); auto materialBindingFabric = srw.getArrayAttributeWr(_pathFabric, FabricTokens::material_binding); @@ -181,10 +203,6 @@ void FabricGeometry::initialize() { } void FabricGeometry::reset() { - if (!UsdUtil::hasStage()) { - return; - } - const auto hasTexcoords = _geometryDefinition.hasTexcoords(); const auto hasNormals = _geometryDefinition.hasNormals(); const auto hasVertexColors = _geometryDefinition.hasVertexColors(); @@ -243,6 +261,10 @@ void FabricGeometry::setGeometry( bool smoothNormals, bool hasImagery) { + if (stageDestroyed()) { + return; + } + const auto hasTexcoords = _geometryDefinition.hasTexcoords(); const auto hasNormals = _geometryDefinition.hasNormals(); const auto hasVertexColors = _geometryDefinition.hasVertexColors(); @@ -337,4 +359,11 @@ void FabricGeometry::setGeometry( } } +bool FabricGeometry::stageDestroyed() { + // Add this guard to all public member functions, including constructors and destructors. Tile render resources can + // continue to be processed asynchronously even after the tileset and USD stage have been destroyed, so prevent any + // operations that would modify the stage. + return _stageId != UsdUtil::getUsdStageId(); +} + }; // namespace cesium::omniverse diff --git a/src/core/src/FabricGeometryPool.cpp b/src/core/src/FabricGeometryPool.cpp index ce3171f46..a4b7b407a 100644 --- a/src/core/src/FabricGeometryPool.cpp +++ b/src/core/src/FabricGeometryPool.cpp @@ -8,11 +8,13 @@ FabricGeometryPool::FabricGeometryPool( int64_t poolId, const FabricGeometryDefinition& geometryDefinition, uint64_t initialCapacity, - bool debugRandomColors) + bool debugRandomColors, + long stageId) : ObjectPool() , _poolId(poolId) , _geometryDefinition(geometryDefinition) - , _debugRandomColors(debugRandomColors) { + , _debugRandomColors(debugRandomColors) + , _stageId(stageId) { setCapacity(initialCapacity); } @@ -22,7 +24,7 @@ const FabricGeometryDefinition& FabricGeometryPool::getGeometryDefinition() cons std::shared_ptr FabricGeometryPool::createObject(uint64_t objectId) { const auto path = pxr::SdfPath(fmt::format("/fabric_geometry_pool_{}_object_{}", _poolId, objectId)); - return std::make_shared(path, _geometryDefinition, _debugRandomColors); + return std::make_shared(path, _geometryDefinition, _debugRandomColors, _stageId); } void FabricGeometryPool::setActive(std::shared_ptr geometry, bool active) { diff --git a/src/core/src/FabricMaterial.cpp b/src/core/src/FabricMaterial.cpp index e85dbf5a2..0c3810bcc 100644 --- a/src/core/src/FabricMaterial.cpp +++ b/src/core/src/FabricMaterial.cpp @@ -26,15 +26,24 @@ namespace cesium::omniverse { FabricMaterial::FabricMaterial( pxr::SdfPath path, const FabricMaterialDefinition& materialDefinition, - pxr::SdfAssetPath defaultTextureAssetPath) + pxr::SdfAssetPath defaultTextureAssetPath, + long stageId) : _materialDefinition(materialDefinition) - , _defaultTextureAssetPath(std::move(defaultTextureAssetPath)) { + , _defaultTextureAssetPath(std::move(defaultTextureAssetPath)) + , _stageId(stageId) { + if (stageDestroyed()) { + return; + } initialize(std::move(path), materialDefinition); reset(); } FabricMaterial::~FabricMaterial() { + if (stageDestroyed()) { + return; + } + FabricUtil::destroyPrim(_materialPathFabric); FabricUtil::destroyPrim(_shaderPathFabric); @@ -44,6 +53,10 @@ FabricMaterial::~FabricMaterial() { } void FabricMaterial::setActive(bool active) { + if (stageDestroyed()) { + return; + } + if (!active) { reset(); } @@ -210,10 +223,6 @@ void FabricMaterial::initialize(pxr::SdfPath path, const FabricMaterialDefinitio } void FabricMaterial::reset() { - if (!UsdUtil::hasStage()) { - return; - } - auto srw = UsdUtil::getFabricStageReaderWriter(); setMaterialValues(GltfUtil::getDefaultMaterialInfo()); @@ -225,6 +234,10 @@ void FabricMaterial::reset() { } void FabricMaterial::setMaterial(int64_t tilesetId, const MaterialInfo& materialInfo) { + if (stageDestroyed()) { + return; + } + auto srw = UsdUtil::getFabricStageReaderWriter(); setMaterialValues(materialInfo); @@ -234,6 +247,9 @@ void FabricMaterial::setMaterial(int64_t tilesetId, const MaterialInfo& material void FabricMaterial::setBaseColorTexture( const std::shared_ptr& texture, const TextureInfo& textureInfo) { + if (stageDestroyed()) { + return; + } if (!_materialDefinition.hasBaseColorTexture()) { return; @@ -314,4 +330,11 @@ void FabricMaterial::setBaseColorTextureValues( *scaleFabric = UsdUtil::glmToUsdVector(glm::fvec2(scale)); } +bool FabricMaterial::stageDestroyed() { + // Add this guard to all public member functions, including constructors and destructors. Tile render resources can + // continue to be processed asynchronously even after the tileset and USD stage have been destroyed, so prevent any + // operations that would modify the stage. + return _stageId != UsdUtil::getUsdStageId(); +} + } // namespace cesium::omniverse diff --git a/src/core/src/FabricMaterialPool.cpp b/src/core/src/FabricMaterialPool.cpp index 774563410..c05f625bd 100644 --- a/src/core/src/FabricMaterialPool.cpp +++ b/src/core/src/FabricMaterialPool.cpp @@ -8,11 +8,13 @@ FabricMaterialPool::FabricMaterialPool( int64_t poolId, const FabricMaterialDefinition& materialDefinition, uint64_t initialCapacity, - pxr::SdfAssetPath defaultTextureAssetPath) + pxr::SdfAssetPath defaultTextureAssetPath, + long stageId) : ObjectPool() , _poolId(poolId) , _materialDefinition(materialDefinition) - , _defaultTextureAssetPath(std::move(defaultTextureAssetPath)) { + , _defaultTextureAssetPath(std::move(defaultTextureAssetPath)) + , _stageId(stageId) { setCapacity(initialCapacity); } @@ -22,7 +24,7 @@ const FabricMaterialDefinition& FabricMaterialPool::getMaterialDefinition() cons std::shared_ptr FabricMaterialPool::createObject(uint64_t objectId) { const auto path = pxr::SdfPath(fmt::format("/fabric_material_pool_{}_object_{}", _poolId, objectId)); - return std::make_shared(path, _materialDefinition, _defaultTextureAssetPath); + return std::make_shared(path, _materialDefinition, _defaultTextureAssetPath, _stageId); } void FabricMaterialPool::setActive(std::shared_ptr material, bool active) { diff --git a/src/core/src/FabricPrepareRenderResources.cpp b/src/core/src/FabricPrepareRenderResources.cpp index c7cf85297..807ef9f93 100644 --- a/src/core/src/FabricPrepareRenderResources.cpp +++ b/src/core/src/FabricPrepareRenderResources.cpp @@ -104,12 +104,14 @@ std::vector acquireFabricMeshes( fabricMeshes.reserve(meshes.size()); auto& fabricResourceManager = FabricResourceManager::getInstance(); + const auto stageId = UsdUtil::getUsdStageId(); for (const auto& mesh : meshes) { auto& fabricMesh = fabricMeshes.emplace_back(); const auto& primitive = model.meshes[mesh.meshId].primitives[mesh.primitiveId]; - const auto fabricGeometry = fabricResourceManager.acquireGeometry(model, primitive, mesh.smoothNormals); + const auto fabricGeometry = + fabricResourceManager.acquireGeometry(model, primitive, mesh.smoothNormals, stageId); fabricMesh.geometry = fabricGeometry; const auto shouldAcquireMaterial = FabricResourceManager::getInstance().shouldAcquireMaterial( @@ -118,7 +120,7 @@ std::vector acquireFabricMeshes( if (shouldAcquireMaterial) { const auto materialInfo = GltfUtil::getMaterialInfo(model, primitive); - const auto fabricMaterial = fabricResourceManager.acquireMaterial(materialInfo, hasImagery); + const auto fabricMaterial = fabricResourceManager.acquireMaterial(materialInfo, hasImagery, stageId); fabricMesh.material = fabricMaterial; fabricMesh.materialInfo = materialInfo; @@ -218,7 +220,7 @@ void freeFabricMeshes(const std::vector& fabricMeshes) { } // namespace FabricPrepareRenderResources::FabricPrepareRenderResources(const OmniTileset& tileset) - : _tileset(tileset) {} + : _tileset(&tileset) {} CesiumAsync::Future FabricPrepareRenderResources::prepareInLoadThread( @@ -239,7 +241,7 @@ FabricPrepareRenderResources::prepareInLoadThread( const auto hasImagery = tileLoadResult.rasterOverlayDetails.has_value(); - auto meshes = gatherMeshes(_tileset, transform, *pModel); + auto meshes = gatherMeshes(*_tileset, transform, *pModel); struct IntermediateLoadThreadResult { Cesium3DTilesSelection::TileLoadResult tileLoadResult; @@ -259,7 +261,7 @@ FabricPrepareRenderResources::prepareInLoadThread( } const auto pModel = std::get_if(&tileLoadResult.contentKind); - auto fabricMeshes = acquireFabricMeshes(*pModel, meshes, hasImagery, _tileset); + auto fabricMeshes = acquireFabricMeshes(*pModel, meshes, hasImagery, *_tileset); return IntermediateLoadThreadResult{ std::move(tileLoadResult), std::move(meshes), @@ -268,15 +270,14 @@ FabricPrepareRenderResources::prepareInLoadThread( }) .thenInWorkerThread([this, transform, hasImagery](IntermediateLoadThreadResult&& workerResult) mutable { auto tileLoadResult = std::move(workerResult.tileLoadResult); - - if (!tilesetExists()) { - return Cesium3DTilesSelection::TileLoadResultAndRenderResources{std::move(tileLoadResult), nullptr}; - } - auto meshes = std::move(workerResult.meshes); auto fabricMeshes = std::move(workerResult.fabricMeshes); const auto pModel = std::get_if(&tileLoadResult.contentKind); - setFabricTextures(*pModel, meshes, fabricMeshes); + + if (tilesetExists()) { + setFabricTextures(*pModel, meshes, fabricMeshes); + } + return Cesium3DTilesSelection::TileLoadResultAndRenderResources{ std::move(tileLoadResult), new TileLoadThreadResult{ @@ -295,12 +296,7 @@ void* FabricPrepareRenderResources::prepareInMainThread(Cesium3DTilesSelection:: } // Wrap in a unique_ptr so that pLoadThreadResult gets freed when this function returns - std::unique_ptr pTileLoadThreadResult{ - reinterpret_cast(pLoadThreadResult)}; - - if (!tilesetExists()) { - return nullptr; - } + std::unique_ptr pTileLoadThreadResult{static_cast(pLoadThreadResult)}; const auto& meshes = pTileLoadThreadResult->meshes; auto& fabricMeshes = pTileLoadThreadResult->fabricMeshes; @@ -315,7 +311,9 @@ void* FabricPrepareRenderResources::prepareInMainThread(Cesium3DTilesSelection:: const auto& model = pRenderContent->getModel(); - setFabricMeshes(model, meshes, fabricMeshes, hasImagery, _tileset); + if (tilesetExists()) { + setFabricMeshes(model, meshes, fabricMeshes, hasImagery, *_tileset); + } return new TileRenderResources{ tileTransform, @@ -328,13 +326,13 @@ void FabricPrepareRenderResources::free( void* pLoadThreadResult, void* pMainThreadResult) noexcept { if (pLoadThreadResult) { - const auto pTileLoadThreadResult = reinterpret_cast(pLoadThreadResult); + const auto pTileLoadThreadResult = static_cast(pLoadThreadResult); freeFabricMeshes(pTileLoadThreadResult->fabricMeshes); delete pTileLoadThreadResult; } if (pMainThreadResult) { - const auto pTileRenderResources = reinterpret_cast(pMainThreadResult); + const auto pTileRenderResources = static_cast(pMainThreadResult); freeFabricMeshes(pTileRenderResources->fabricMeshes); delete pTileRenderResources; } @@ -362,7 +360,7 @@ void* FabricPrepareRenderResources::prepareRasterInMainThread( // Wrap in a unique_ptr so that pLoadThreadResult gets freed when this function returns std::unique_ptr pImageryLoadThreadResult{ - reinterpret_cast(pLoadThreadResult)}; + static_cast(pLoadThreadResult)}; if (!tilesetExists()) { return nullptr; @@ -379,14 +377,14 @@ void FabricPrepareRenderResources::freeRaster( void* pMainThreadResult) noexcept { if (pLoadThreadResult) { - const auto pImageryLoadThreadResult = reinterpret_cast(pLoadThreadResult); + const auto pImageryLoadThreadResult = static_cast(pLoadThreadResult); const auto texture = pImageryLoadThreadResult->texture; FabricResourceManager::getInstance().releaseTexture(texture); delete pImageryLoadThreadResult; } if (pMainThreadResult) { - const auto pImageryRenderResources = reinterpret_cast(pMainThreadResult); + const auto pImageryRenderResources = static_cast(pMainThreadResult); const auto texture = pImageryRenderResources->texture; FabricResourceManager::getInstance().releaseTexture(texture); delete pImageryRenderResources; @@ -401,7 +399,7 @@ void FabricPrepareRenderResources::attachRasterInMainThread( const glm::dvec2& translation, const glm::dvec2& scale) { - auto pImageryRenderResources = reinterpret_cast(pMainThreadRendererResources); + auto pImageryRenderResources = static_cast(pMainThreadRendererResources); if (!pImageryRenderResources) { return; } @@ -418,7 +416,7 @@ void FabricPrepareRenderResources::attachRasterInMainThread( return; } - auto pTileRenderResources = reinterpret_cast(pRenderContent->getRenderResources()); + auto pTileRenderResources = static_cast(pRenderContent->getRenderResources()); if (!pTileRenderResources) { return; } @@ -454,7 +452,7 @@ void FabricPrepareRenderResources::detachRasterInMainThread( return; } - auto pTileRenderResources = reinterpret_cast(pRenderContent->getRenderResources()); + auto pTileRenderResources = static_cast(pRenderContent->getRenderResources()); if (!pTileRenderResources) { return; } @@ -482,7 +480,11 @@ void FabricPrepareRenderResources::detachRasterInMainThread( bool FabricPrepareRenderResources::tilesetExists() const { // When a tileset is deleted there's a short period between the prim being deleted and TfNotice notifying us about the change. // This function helps us know whether we should proceed with loading render resources. - return UsdUtil::hasStage() && UsdUtil::primExists(_tileset.getPath()); + return _tileset != nullptr && UsdUtil::primExists(_tileset->getPath()); +} + +void FabricPrepareRenderResources::detachTileset() { + _tileset = nullptr; } } // namespace cesium::omniverse diff --git a/src/core/src/FabricResourceManager.cpp b/src/core/src/FabricResourceManager.cpp index 38e67a2ea..a775b3deb 100644 --- a/src/core/src/FabricResourceManager.cpp +++ b/src/core/src/FabricResourceManager.cpp @@ -46,34 +46,45 @@ bool FabricResourceManager::shouldAcquireMaterial( std::shared_ptr FabricResourceManager::acquireGeometry( const CesiumGltf::Model& model, const CesiumGltf::MeshPrimitive& primitive, - bool smoothNormals) { + bool smoothNormals, + long stageId) { FabricGeometryDefinition geometryDefinition(model, primitive, smoothNormals); if (_disableGeometryPool) { const auto path = pxr::SdfPath(fmt::format("/fabric_geometry_{}", getNextGeometryId())); - return std::make_shared(path, geometryDefinition, _debugRandomColors); + return std::make_shared(path, geometryDefinition, _debugRandomColors, stageId); } std::scoped_lock lock(_poolMutex); - const auto geometryPool = getGeometryPool(geometryDefinition); + auto geometryPool = getGeometryPool(geometryDefinition); + + if (geometryPool == nullptr) { + geometryPool = createGeometryPool(geometryDefinition, stageId); + } + auto geometry = geometryPool->acquire(); return geometry; } std::shared_ptr -FabricResourceManager::acquireMaterial(const MaterialInfo& materialInfo, bool hasImagery) { +FabricResourceManager::acquireMaterial(const MaterialInfo& materialInfo, bool hasImagery, long stageId) { FabricMaterialDefinition materialDefinition(materialInfo, hasImagery, _disableTextures); if (_disableMaterialPool) { const auto path = pxr::SdfPath(fmt::format("/fabric_material_{}", getNextMaterialId())); - return std::make_shared(path, materialDefinition, _defaultTextureAssetPath); + return std::make_shared(path, materialDefinition, _defaultTextureAssetPath, stageId); } std::scoped_lock lock(_poolMutex); - const auto materialPool = getMaterialPool(materialDefinition); + auto materialPool = getMaterialPool(materialDefinition); + + if (materialPool == nullptr) { + materialPool = createMaterialPool(materialDefinition, stageId); + } + auto material = materialPool->acquire(); return material; @@ -87,7 +98,12 @@ std::shared_ptr FabricResourceManager::acquireTexture() { std::scoped_lock lock(_poolMutex); - const auto texturePool = getTexturePool(); + auto texturePool = getTexturePool(); + + if (texturePool == nullptr) { + texturePool = createTexturePool(); + } + auto texture = texturePool->acquire(); return texture; @@ -101,6 +117,7 @@ void FabricResourceManager::releaseGeometry(const std::shared_ptr lock(_poolMutex); const auto geometryPool = getGeometryPool(geometry->getGeometryDefinition()); + assert(geometryPool != nullptr); geometryPool->release(geometry); } @@ -112,6 +129,7 @@ void FabricResourceManager::releaseMaterial(const std::shared_ptr lock(_poolMutex); const auto materialPool = getMaterialPool(material->getMaterialDefinition()); + assert(materialPool != nullptr); materialPool->release(material); } @@ -123,6 +141,7 @@ void FabricResourceManager::releaseTexture(const std::shared_ptr& std::scoped_lock lock(_poolMutex); const auto texturePool = getTexturePool(); + assert(texturePool != nullptr); texturePool->release(texture); } @@ -183,9 +202,7 @@ FabricResourceManager::getGeometryPool(const FabricGeometryDefinition& geometryD } } - // Create a new pool - return _geometryPools.emplace_back(std::make_shared( - getNextPoolId(), geometryDefinition, _geometryPoolInitialCapacity, _debugRandomColors)); + return nullptr; } std::shared_ptr @@ -197,9 +214,7 @@ FabricResourceManager::getMaterialPool(const FabricMaterialDefinition& materialD } } - // Create a new pool - return _materialPools.emplace_back(std::make_shared( - getNextPoolId(), materialDefinition, _materialPoolInitialCapacity, _defaultTextureAssetPath)); + return nullptr; } std::shared_ptr FabricResourceManager::getTexturePool() { @@ -207,7 +222,22 @@ std::shared_ptr FabricResourceManager::getTexturePool() { return _texturePools.front(); } - // Create a new pool + return nullptr; +} + +std::shared_ptr +FabricResourceManager::createGeometryPool(const FabricGeometryDefinition& geometryDefinition, long stageId) { + return _geometryPools.emplace_back(std::make_shared( + getNextPoolId(), geometryDefinition, _geometryPoolInitialCapacity, _debugRandomColors, stageId)); +} + +std::shared_ptr +FabricResourceManager::createMaterialPool(const FabricMaterialDefinition& materialDefinition, long stageId) { + return _materialPools.emplace_back(std::make_shared( + getNextPoolId(), materialDefinition, _materialPoolInitialCapacity, _defaultTextureAssetPath, stageId)); +} + +std::shared_ptr FabricResourceManager::createTexturePool() { return _texturePools.emplace_back( std::make_shared(getNextPoolId(), _texturePoolInitialCapacity)); } diff --git a/src/core/src/FabricUtil.cpp b/src/core/src/FabricUtil.cpp index a140838d2..975c36a59 100644 --- a/src/core/src/FabricUtil.cpp +++ b/src/core/src/FabricUtil.cpp @@ -607,11 +607,6 @@ FabricStatistics getStatistics() { } void destroyPrim(const omni::fabric::Path& path) { - // Only delete prims if there's still a stage to delete them from - if (!UsdUtil::hasStage()) { - return; - } - auto srw = UsdUtil::getFabricStageReaderWriter(); srw.destroyPrim(path); diff --git a/src/core/src/OmniTileset.cpp b/src/core/src/OmniTileset.cpp index 511eba8d4..521cb67f9 100644 --- a/src/core/src/OmniTileset.cpp +++ b/src/core/src/OmniTileset.cpp @@ -39,7 +39,9 @@ OmniTileset::OmniTileset(const pxr::SdfPath& tilesetPath, const pxr::SdfPath& ge UsdUtil::setGeoreferenceForTileset(tilesetPath, georeferencePath); } -OmniTileset::~OmniTileset() = default; +OmniTileset::~OmniTileset() { + _renderResourcesPreparer->detachTileset(); +} pxr::SdfPath OmniTileset::getPath() const { return _tilesetPath; diff --git a/src/core/src/UsdUtil.cpp b/src/core/src/UsdUtil.cpp index c461d651f..4d6b7dbfb 100644 --- a/src/core/src/UsdUtil.cpp +++ b/src/core/src/UsdUtil.cpp @@ -27,19 +27,23 @@ pxr::UsdStageRefPtr getUsdStage() { return Context::instance().getStage(); } +long getUsdStageId() { + return Context::instance().getStageId(); +} + omni::fabric::StageReaderWriter getFabricStageReaderWriter() { return Context::instance().getFabricStageReaderWriter(); } omni::fabric::StageReaderWriterId getFabricStageReaderWriterId() { const auto iStageReaderWriter = carb::getCachedInterface(); - const auto stageId = Context::instance().getStageId(); + const auto stageId = getUsdStageId(); const auto stageReaderWriterId = iStageReaderWriter->get(omni::fabric::UsdStageId{static_cast(stageId)}); return stageReaderWriterId; } bool hasStage() { - return Context::instance().getStageId() != 0; + return getUsdStageId() != 0; } glm::dvec3 usdToGlmVector(const pxr::GfVec3d& vector) { From 0742c4bb732580d049e58db5ca1caf0b4a68fd95 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Wed, 2 Aug 2023 15:36:42 -0400 Subject: [PATCH 5/8] Remove empty pools --- .../include/cesium/omniverse/ObjectPool.h | 4 ++++ src/core/src/FabricResourceManager.cpp | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/src/core/include/cesium/omniverse/ObjectPool.h b/src/core/include/cesium/omniverse/ObjectPool.h index a6c31a4a7..44bf073ca 100644 --- a/src/core/include/cesium/omniverse/ObjectPool.h +++ b/src/core/include/cesium/omniverse/ObjectPool.h @@ -46,6 +46,10 @@ template class ObjectPool { return _queue.size(); } + [[nodiscard]] bool isEmpty() const { + return getNumberInactive() == getCapacity(); + } + [[nodiscard]] double computePercentActive() const { const auto numberActive = static_cast(getNumberActive()); const auto capacity = static_cast(getCapacity()); diff --git a/src/core/src/FabricResourceManager.cpp b/src/core/src/FabricResourceManager.cpp index a775b3deb..4d006a3e0 100644 --- a/src/core/src/FabricResourceManager.cpp +++ b/src/core/src/FabricResourceManager.cpp @@ -16,6 +16,18 @@ namespace cesium::omniverse { +namespace { +template void removePool(std::vector& pools, const T& pool) { + auto it = + std::find_if(pools.begin(), pools.end(), [&pool](const auto& other) { return pool.get() == other.get(); }); + + if (it != pools.end()) { + pools.erase(it); + } +} + +} // namespace + FabricResourceManager::FabricResourceManager() { const auto defaultTextureName = "fabric_default_texture"; _defaultTextureAssetPath = UsdUtil::getDynamicTextureProviderAssetPath(defaultTextureName); @@ -119,6 +131,10 @@ void FabricResourceManager::releaseGeometry(const std::shared_ptrgetGeometryDefinition()); assert(geometryPool != nullptr); geometryPool->release(geometry); + + if (geometryPool->isEmpty()) { + removePool(_geometryPools, geometryPool); + } } void FabricResourceManager::releaseMaterial(const std::shared_ptr& material) { @@ -131,6 +147,10 @@ void FabricResourceManager::releaseMaterial(const std::shared_ptrgetMaterialDefinition()); assert(materialPool != nullptr); materialPool->release(material); + + if (materialPool->isEmpty()) { + removePool(_materialPools, materialPool); + } } void FabricResourceManager::releaseTexture(const std::shared_ptr& texture) { @@ -143,6 +163,10 @@ void FabricResourceManager::releaseTexture(const std::shared_ptr& const auto texturePool = getTexturePool(); assert(texturePool != nullptr); texturePool->release(texture); + + if (texturePool->isEmpty()) { + removePool(_texturePools, texturePool); + } } void FabricResourceManager::setDisableMaterials(bool disableMaterials) { From b27e5707c802e8d7fd223fa0b63166763f96599a Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Fri, 4 Aug 2023 10:30:00 -0400 Subject: [PATCH 6/8] Remove cuda from build. No longer needed for Kit 105 --- extern/CMakeLists.txt | 49 ---------------------- extern/nvidia/deps/target-deps.packman.xml | 2 - src/core/CMakeLists.txt | 1 - 3 files changed, 52 deletions(-) diff --git a/extern/CMakeLists.txt b/extern/CMakeLists.txt index 6d560b373..295fb450d 100644 --- a/extern/CMakeLists.txt +++ b/extern/CMakeLists.txt @@ -71,7 +71,6 @@ set(USDRT_ROOT "${NVIDIA_BUILD_DIR}/target-deps/usdrt") set(CARB_ROOT "${NVIDIA_BUILD_DIR}/target-deps/carb_sdk_plugins") set(KIT_SDK_ROOT "${NVIDIA_BUILD_DIR}/target-deps/kit-sdk") set(PYBIND11_ROOT "${NVIDIA_BUILD_DIR}/target-deps/pybind11") -set(CUDA_ROOT "${NVIDIA_BUILD_DIR}/target-deps/cuda") set(NVIDIA_USD_LIBRARIES ar @@ -240,54 +239,6 @@ add_prebuilt_project_header_only( ) # cmake-format: on -if(WIN32) - # cmake-format: off - add_prebuilt_project( - RELEASE_INCLUDE_DIR - "${CUDA_ROOT}" - DEBUG_INCLUDE_DIR - "${CUDA_ROOT}" - RELEASE_LIBRARY_DIR - "${CUDA_ROOT}/cuda/lib/x64" - RELEASE_DLL_DIR - "${CUDA_ROOT}/cuda/bin" - DEBUG_LIBRARY_DIR - "${CUDA_ROOT}/cuda/lib/x64" - DEBUG_DLL_DIR - "${CUDA_ROOT}/cuda/bin" - RELEASE_LIBRARIES - cudart - DEBUG_LIBRARIES - cudart - RELEASE_DLL_LIBRARIES - cudart64_110 - DEBUG_DLL_LIBRARIES - cudart64_110 - TARGET_NAMES - cudart - ) - # cmake-format: on -else() - # cmake-format: off - add_prebuilt_project( - RELEASE_INCLUDE_DIR - "${CUDA_ROOT}" - DEBUG_INCLUDE_DIR - "${CUDA_ROOT}" - RELEASE_LIBRARY_DIR - "${CUDA_ROOT}/cuda/lib64" - DEBUG_LIBRARY_DIR - "${CUDA_ROOT}/cuda/lib64" - RELEASE_LIBRARIES - cudart - DEBUG_LIBRARIES - cudart - TARGET_NAMES - cudart - ) - # cmake-format: on -endif() - # cmake-format: off # omni.ui gives us access to DynamicTextureProvider.h add_prebuilt_project( diff --git a/extern/nvidia/deps/target-deps.packman.xml b/extern/nvidia/deps/target-deps.packman.xml index e160f0438..e93b5eda2 100644 --- a/extern/nvidia/deps/target-deps.packman.xml +++ b/extern/nvidia/deps/target-deps.packman.xml @@ -6,7 +6,6 @@ - @@ -18,5 +17,4 @@ - diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 2d3e883dd..f79bf0ccf 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -84,7 +84,6 @@ setup_lib( boost_python310 tbb carb - cudart omni_kit omni_ui pybind11 From 03edbfb94106243542bf5629d4af3d686c6bac77 Mon Sep 17 00:00:00 2001 From: Sean Lilley Date: Fri, 4 Aug 2023 10:55:32 -0400 Subject: [PATCH 7/8] Update cesium-native --- extern/cesium-native | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extern/cesium-native b/extern/cesium-native index 172ac5ddc..cb37dbfab 160000 --- a/extern/cesium-native +++ b/extern/cesium-native @@ -1 +1 @@ -Subproject commit 172ac5ddcce602c8b268ad342639554dea2f6004 +Subproject commit cb37dbfab0a4b3ae1aeb7a6172b018ffeff06326 From 69833c4f32375488ab80c1114ff0ba41c9bc74cd Mon Sep 17 00:00:00 2001 From: "Adam N. Morris" Date: Fri, 4 Aug 2023 12:12:53 -0500 Subject: [PATCH 8/8] Fixed Cesium Window & Fabric modal not showing in Code 2023.1.1 --- .../cesium.omniverse/cesium/omniverse/extension.py | 14 +++++++++++--- .../cesium/omniverse/utils/utils.py | 7 ++++++- exts/cesium.omniverse/config/extension.toml | 4 ++++ 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/exts/cesium.omniverse/cesium/omniverse/extension.py b/exts/cesium.omniverse/cesium/omniverse/extension.py index b605f5f84..2cab3f52c 100644 --- a/exts/cesium.omniverse/cesium/omniverse/extension.py +++ b/exts/cesium.omniverse/cesium/omniverse/extension.py @@ -1,6 +1,6 @@ from .bindings import acquire_cesium_omniverse_interface, release_cesium_omniverse_interface, Viewport from .install import perform_vendor_install -from .utils import wait_n_frames, dock_window_async +from .utils import wait_n_frames, dock_window_async, perform_action_after_n_frames_async from .ui.asset_window import CesiumOmniverseAssetWindow from .ui.debug_window import CesiumOmniverseDebugWindow from .ui.main_window import CesiumOmniverseMainWindow @@ -85,7 +85,7 @@ def on_startup(self): # Show the window. It will call `self.show_window` if show_on_startup: - ui.Workspace.show_window(CesiumOmniverseMainWindow.WINDOW_NAME) + asyncio.ensure_future(perform_action_after_n_frames_async(15, CesiumOmniverseExtension._open_window)) self._credits_viewport_controller = CreditsViewportController(_cesium_omniverse_interface) @@ -223,7 +223,7 @@ def _on_stage_event(self, event): # Show Fabric modal if Fabric is disabled. fabric_enabled = omni_settings.get_settings().get_as_bool("/app/useFabricSceneDelegate") if not fabric_enabled: - CesiumFabricModal() + asyncio.ensure_future(perform_action_after_n_frames_async(15, CesiumOmniverseExtension._open_modal)) elif event.type == int(omni.usd.StageEventType.CLOSED): _cesium_omniverse_interface.on_stage_change(0) if self._attributes_widget_controller is not None: @@ -413,3 +413,11 @@ def _destroy_credits_viewport_frames(self): for credits_viewport_frame in self._credits_viewport_frames: credits_viewport_frame.destroy() self._credits_viewport_frames.clear() + + @staticmethod + def _open_window(): + ui.Workspace.show_window(CesiumOmniverseMainWindow.WINDOW_NAME) + + @staticmethod + def _open_modal(): + CesiumFabricModal() diff --git a/exts/cesium.omniverse/cesium/omniverse/utils/utils.py b/exts/cesium.omniverse/cesium/omniverse/utils/utils.py index 53eb8aafa..75e6917da 100644 --- a/exts/cesium.omniverse/cesium/omniverse/utils/utils.py +++ b/exts/cesium.omniverse/cesium/omniverse/utils/utils.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import Optional, Callable import omni.kit import omni.ui as ui @@ -21,6 +21,11 @@ async def dock_window_async( window.focus() +async def perform_action_after_n_frames_async(n: int, action: Callable[[], None]): + await wait_n_frames(n) + action() + + def str_is_empty_or_none(s: Optional[str]): if s is None: return True diff --git a/exts/cesium.omniverse/config/extension.toml b/exts/cesium.omniverse/config/extension.toml index dd49a0989..0e3a4ea46 100644 --- a/exts/cesium.omniverse/config/extension.toml +++ b/exts/cesium.omniverse/config/extension.toml @@ -31,12 +31,16 @@ kit = ["105.*"] [dependencies] "cesium.usd.plugins" = {} "usdrt.scenegraph" = {} +"omni.ui" = {} +"omni.usd" = {} "omni.ui.scene" = {} "omni.usd.libs" = {} +"omni.kit.commands" = {} "omni.kit.pipapi" = {} "omni.kit.uiapp" = {} "omni.kit.viewport.utility" = {} "omni.kit.property.usd" = {} +"omni.kit.menu.utils" = {} # Main python module this extension provides, it will be publicly available as "import cesium.omniverse" [[python.module]]