From 9f2724a435b9b3a6fb3abf9960319f3bb161e0b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Arnaud?= <153240101+metaremi@users.noreply.github.com> Date: Tue, 6 May 2025 09:15:13 -0700 Subject: [PATCH] Update gltfExport.cpp remplaced | with || in bolean logic, avoiding compiler warnings and possible bug. --- gltf/src/gltfExport.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/gltf/src/gltfExport.cpp b/gltf/src/gltfExport.cpp index c215b23..26f27f9 100644 --- a/gltf/src/gltfExport.cpp +++ b/gltf/src/gltfExport.cpp @@ -1174,13 +1174,13 @@ exportClearcoatExtension(ExportGltfContext& ctx, { ExtMap ext; if (addTextureToExt( - ctx, inputTranslator, ext, m.clearcoat, "clearcoatTexture", "clearcoatFactor") | + ctx, inputTranslator, ext, m.clearcoat, "clearcoatTexture", "clearcoatFactor") || addTextureToExt(ctx, inputTranslator, ext, m.clearcoatRoughness, "clearcoatRoughnessTexture", - "clearcoatRoughnessFactor") | + "clearcoatRoughnessFactor") || addTextureToExt(ctx, inputTranslator, ext, m.clearcoatNormal, "clearcoatNormalTexture")) { addMaterialExt(ctx, gm, "KHR_materials_clearcoat", ext); return true; @@ -1226,7 +1226,7 @@ exportSheenExtension(ExportGltfContext& ctx, { ExtMap ext; if (addTextureToExt( - ctx, inputTranslator, ext, m.sheenColor, "sheenColorTexture", "sheenColorFactor") | + ctx, inputTranslator, ext, m.sheenColor, "sheenColorTexture", "sheenColorFactor") || addTextureToExt(ctx, inputTranslator, ext, @@ -1248,7 +1248,7 @@ exportSpecularExtension(ExportGltfContext& ctx, { ExtMap ext; if (addTextureToExt( - ctx, inputTranslator, ext, m.specularLevel, "specularTexture", "specularFactor", 1.0f) | + ctx, inputTranslator, ext, m.specularLevel, "specularTexture", "specularFactor", 1.0f) || addTextureToExt(ctx, inputTranslator, ext, @@ -1292,8 +1292,8 @@ exportVolumeExtension(ExportGltfContext& ctx, { ExtMap ext; if (addTextureToExt( - ctx, inputTranslator, ext, m.volumeThickness, "thicknessTexture", "thicknessFactor") | - addFloatValueToExt(ext, "attenuationDistance", m.absorptionDistance.value) | + ctx, inputTranslator, ext, m.volumeThickness, "thicknessTexture", "thicknessFactor") || + addFloatValueToExt(ext, "attenuationDistance", m.absorptionDistance.value) || addColorValueToExt(ext, "attenuationColor", m.absorptionColor.value, GfVec3f(1.0f))) { addMaterialExt(ctx, gm, "KHR_materials_volume", ext); return true; @@ -1315,7 +1315,7 @@ exportAdobeClearcoatSpecularExtension(ExportGltfContext& ctx, m.clearcoatSpecular, "clearcoatSpecularTexture", "clearcoatSpecularFactor", - 1.0f) | + 1.0f) || addFloatValueToExt(ext, "clearcoatIor", m.clearcoatIor.value, 1.5f)) { addMaterialExt(ctx, gm, "ADOBE_materials_clearcoat_specular", ext); return true;