Skip to content

Commit 91108f0

Browse files
committed
Fix formatting
1 parent 6ac228a commit 91108f0

File tree

5 files changed

+39
-21
lines changed

5 files changed

+39
-21
lines changed

src/core/src/Context.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ uint64_t getSecondsSinceEpoch() {
7171
Context::Context(const std::filesystem::path& cesiumExtensionLocation)
7272
: _cesiumExtensionLocation(cesiumExtensionLocation.lexically_normal())
7373
, _certificatePath(_cesiumExtensionLocation / "certs" / "cacert.pem")
74-
, _cesiumMdlPathToken(omni::fabric::Token::createImmortal((_cesiumExtensionLocation / "mdl" / "cesium.mdl").generic_string().c_str()))
74+
, _cesiumMdlPathToken(omni::fabric::Token::createImmortal(
75+
(_cesiumExtensionLocation / "mdl" / "cesium.mdl").generic_string().c_str()))
7576
, _pTaskProcessor(std::make_shared<TaskProcessor>())
7677
, _pAsyncSystem(std::make_unique<CesiumAsync::AsyncSystem>(_pTaskProcessor))
7778
, _pLogger(std::make_shared<Logger>())

src/core/src/FabricGeometry.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,8 @@ void FabricGeometry::setGeometry(
321321
fabricStage.setArrayAttributeSize(_path, FabricTokens::faceVertexIndices(), numVoxels * 6 * 2 * 3);
322322

323323
const auto pointsFabric = fabricStage.getArrayAttributeWr<glm::fvec3>(_path, FabricTokens::points());
324-
const auto faceVertexCountsFabric = fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexCounts());
324+
const auto faceVertexCountsFabric =
325+
fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexCounts());
325326
const auto faceVertexIndicesFabric =
326327
fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexIndices());
327328

@@ -334,7 +335,8 @@ void FabricGeometry::setGeometry(
334335

335336
if (hasVertexIds) {
336337
fabricStage.setArrayAttributeSize(_path, FabricTokens::primvars_vertexId(), numVoxels * 8);
337-
const auto vertexIdsFabric = fabricStage.getArrayAttributeWr<float>(_path, FabricTokens::primvars_vertexId());
338+
const auto vertexIdsFabric =
339+
fabricStage.getArrayAttributeWr<float>(_path, FabricTokens::primvars_vertexId());
338340
vertexIds.fill(vertexIdsFabric, 8);
339341
}
340342

@@ -418,7 +420,8 @@ void FabricGeometry::setGeometry(
418420
fabricStage.setArrayAttributeSize(_path, FabricTokens::faceVertexIndices(), indices.size());
419421
fabricStage.setArrayAttributeSize(_path, FabricTokens::points(), positions.size());
420422

421-
const auto faceVertexCountsFabric = fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexCounts());
423+
const auto faceVertexCountsFabric =
424+
fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexCounts());
422425
const auto faceVertexIndicesFabric =
423426
fabricStage.getArrayAttributeWr<int>(_path, FabricTokens::faceVertexIndices());
424427
const auto pointsFabric = fabricStage.getArrayAttributeWr<glm::fvec3>(_path, FabricTokens::points());
@@ -465,7 +468,8 @@ void FabricGeometry::setGeometry(
465468
if (hasVertexIds) {
466469
fabricStage.setArrayAttributeSize(_path, FabricTokens::primvars_vertexId(), vertexIds.size());
467470

468-
const auto vertexIdsFabric = fabricStage.getArrayAttributeWr<float>(_path, FabricTokens::primvars_vertexId());
471+
const auto vertexIdsFabric =
472+
fabricStage.getArrayAttributeWr<float>(_path, FabricTokens::primvars_vertexId());
469473

470474
vertexIds.fill(vertexIdsFabric);
471475
}

src/core/src/FabricMaterial.cpp

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,8 @@ void createConnection(
164164
const omni::fabric::Path& outputPath,
165165
const omni::fabric::Path& inputPath,
166166
const omni::fabric::Token& inputName) {
167-
fabricStage.createConnection(inputPath, inputName, omni::fabric::Connection{outputPath, FabricTokens::outputs_out()});
167+
fabricStage.createConnection(
168+
inputPath, inputName, omni::fabric::Connection{outputPath, FabricTokens::outputs_out()});
168169
}
169170

170171
void destroyConnection(
@@ -280,7 +281,8 @@ void setTextureValuesCommon(
280281
scale = {scale.x, scale.y};
281282
}
282283

283-
const auto textureFabric = fabricStage.getAttributeWr<omni::fabric::AssetPath>(path, FabricTokens::inputs_texture());
284+
const auto textureFabric =
285+
fabricStage.getAttributeWr<omni::fabric::AssetPath>(path, FabricTokens::inputs_texture());
284286
const auto texCoordIndexFabric = fabricStage.getAttributeWr<int>(path, FabricTokens::inputs_tex_coord_index());
285287
const auto wrapSFabric = fabricStage.getAttributeWr<int>(path, FabricTokens::inputs_wrap_s());
286288
const auto wrapTFabric = fabricStage.getAttributeWr<int>(path, FabricTokens::inputs_wrap_t());
@@ -719,7 +721,8 @@ void FabricMaterial::initializeDefaultMaterial() {
719721
createConnection(fabricStage, rasterOverlayPath, shaderPath, FabricTokens::inputs_alpha_clip());
720722
} else if (clippingRasterOverlayCount > 1) {
721723
// Create connection from raster overlay resolver to shader
722-
createConnection(fabricStage, _clippingRasterOverlayResolverPath, shaderPath, FabricTokens::inputs_alpha_clip());
724+
createConnection(
725+
fabricStage, _clippingRasterOverlayResolverPath, shaderPath, FabricTokens::inputs_alpha_clip());
723726

724727
// Create connections from raster overlays to raster overlay resolver
725728
for (uint64_t i = 0; i < clippingRasterOverlayCount; ++i) {
@@ -853,7 +856,8 @@ void FabricMaterial::createRasterOverlayResolverCommon(
853856
}
854857

855858
void FabricMaterial::createRasterOverlayResolver(const omni::fabric::Path& path, uint64_t rasterOverlayCount) {
856-
createRasterOverlayResolverCommon(path, rasterOverlayCount, FabricTokens::cesium_internal_raster_overlay_resolver());
859+
createRasterOverlayResolverCommon(
860+
path, rasterOverlayCount, FabricTokens::cesium_internal_raster_overlay_resolver());
857861
}
858862

859863
void FabricMaterial::createClippingRasterOverlayResolver(
@@ -1658,16 +1662,19 @@ void FabricMaterial::createConnectionsToCopiedPaths() {
16581662
}
16591663

16601664
for (const auto& copiedPath : _copiedRasterOverlayPaths) {
1661-
const auto indexFabric = fabricStage.getAttributeRd<int>(copiedPath, FabricTokens::inputs_raster_overlay_index());
1665+
const auto indexFabric =
1666+
fabricStage.getAttributeRd<int>(copiedPath, FabricTokens::inputs_raster_overlay_index());
16621667
const auto index = static_cast<uint64_t>(CppUtil::defaultValue(indexFabric, 0));
16631668

16641669
if (index < rasterOverlay) {
1665-
createConnection(fabricStage, _rasterOverlayPaths[index], copiedPath, FabricTokens::inputs_raster_overlay());
1670+
createConnection(
1671+
fabricStage, _rasterOverlayPaths[index], copiedPath, FabricTokens::inputs_raster_overlay());
16661672
}
16671673
}
16681674

16691675
for (const auto& copiedPath : _copiedFeatureIdPaths) {
1670-
const auto indexFabric = fabricStage.getAttributeRd<int>(copiedPath, FabricTokens::inputs_feature_id_set_index());
1676+
const auto indexFabric =
1677+
fabricStage.getAttributeRd<int>(copiedPath, FabricTokens::inputs_feature_id_set_index());
16711678
const auto index = static_cast<uint64_t>(CppUtil::defaultValue(indexFabric, 0));
16721679

16731680
if (index < featureIdCount) {
@@ -1729,7 +1736,8 @@ void FabricMaterial::createConnectionsToProperties() {
17291736

17301737
const auto& propertyPathInternal = _propertyPaths[index];
17311738

1732-
createConnection(fabricStage, propertyPathInternal, propertyPathExternal, FabricTokens::inputs_property_value());
1739+
createConnection(
1740+
fabricStage, propertyPathInternal, propertyPathExternal, FabricTokens::inputs_property_value());
17331741
}
17341742
}
17351743

src/core/src/FabricUtil.cpp

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -577,13 +577,15 @@ omni::fabric::Token toFabricToken(const pxr::TfToken& token) {
577577
}
578578

579579
omni::fabric::Path joinPaths(const omni::fabric::Path& absolutePath, const omni::fabric::Token& relativePath) {
580-
return omni::fabric::Path::createImmortal(fmt::format("{}/{}", absolutePath.getString(), relativePath.getText()).c_str());
580+
return omni::fabric::Path::createImmortal(
581+
fmt::format("{}/{}", absolutePath.getString(), relativePath.getText()).c_str());
581582
}
582583

583584
omni::fabric::Path getCopiedShaderPath(const omni::fabric::Path& materialPath, const omni::fabric::Path& shaderPath) {
584585
// materialPath is the FabricMaterial path
585586
// shaderPath is the USD shader path
586-
return FabricUtil::joinPaths(materialPath, omni::fabric::Token::createImmortal(UsdUtil::getSafeName(shaderPath.getString()).c_str()));
587+
return FabricUtil::joinPaths(
588+
materialPath, omni::fabric::Token::createImmortal(UsdUtil::getSafeName(shaderPath.getString()).c_str()));
587589
}
588590

589591
namespace {
@@ -740,7 +742,8 @@ std::vector<omni::fabric::Path> copyMaterial(
740742
dstPath = dstMaterialPath;
741743
} else {
742744
const auto name = omni::fabric::Token::createImmortal(std::strrchr(srcPath.getString().c_str(), '/') + 1);
743-
dstPath = FabricUtil::getCopiedShaderPath(dstMaterialPath, srcMaterialPath.appendChild(fabricStage.getFabricId(), name));
745+
dstPath = FabricUtil::getCopiedShaderPath(
746+
dstMaterialPath, srcMaterialPath.appendChild(fabricStage.getFabricId(), name));
744747
}
745748

746749
dstPaths.push_back(dstPath);
@@ -776,8 +779,7 @@ std::vector<omni::fabric::Path> copyMaterial(
776779
for (const auto& connection : connections) {
777780
const auto index = CppUtil::indexOf(srcPaths, connection.pConnection->path);
778781
assert(index != srcPaths.size()); // Ensure that all connections are part of the material network
779-
const auto dstConnection =
780-
omni::fabric::Connection{dstPaths[index], connection.pConnection->attrName};
782+
const auto dstConnection = omni::fabric::Connection{dstPaths[index], connection.pConnection->attrName};
781783
fabricStage.createConnection(dstPath, connection.attributeName, dstConnection);
782784
}
783785
}
@@ -807,8 +809,10 @@ bool isCesiumNode(const omni::fabric::Token& mdlIdentifier) {
807809
}
808810

809811
bool isCesiumPropertyNode(const omni::fabric::Token& mdlIdentifier) {
810-
return mdlIdentifier == FabricTokens::cesium_property_int() || mdlIdentifier == FabricTokens::cesium_property_int2() ||
811-
mdlIdentifier == FabricTokens::cesium_property_int3() || mdlIdentifier == FabricTokens::cesium_property_int4() ||
812+
return mdlIdentifier == FabricTokens::cesium_property_int() ||
813+
mdlIdentifier == FabricTokens::cesium_property_int2() ||
814+
mdlIdentifier == FabricTokens::cesium_property_int3() ||
815+
mdlIdentifier == FabricTokens::cesium_property_int4() ||
812816
mdlIdentifier == FabricTokens::cesium_property_float() ||
813817
mdlIdentifier == FabricTokens::cesium_property_float2() ||
814818
mdlIdentifier == FabricTokens::cesium_property_float3() ||

tests/src/tilesetTests.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ void setUpTilesetTests(Context* pContext, const pxr::SdfPath& rootPath) {
5353
auto bus = app->getMessageBusEventStream();
5454
auto tilesetLoadedEvent = carb::events::typeFromString("cesium.omniverse.TILESET_LOADED");
5555
tilesetLoadListener = std::make_unique<TilesetLoadListener>();
56-
endToEndTilesetSubscriptionPtr = bus->createSubscriptionToPushByType(tilesetLoadedEvent, tilesetLoadListener.get(), carb::events::kDefaultOrder);
56+
endToEndTilesetSubscriptionPtr =
57+
bus->createSubscriptionToPushByType(tilesetLoadedEvent, tilesetLoadListener.get(), carb::events::kDefaultOrder);
5758

5859
// Load a local test tileset
5960
endToEndTilesetPath = UsdUtil::makeUniquePath(pContext->getUsdStage(), rootPath, "endToEndTileset");

0 commit comments

Comments
 (0)