diff --git a/src/FBX2glTF.cpp b/src/FBX2glTF.cpp index 7d44777..459100d 100644 --- a/src/FBX2glTF.cpp +++ b/src/FBX2glTF.cpp @@ -120,10 +120,10 @@ int main(int argc, char* argv[]) { "Use KHR_materials_unlit extension to request an unlit shader.") ->group("Materials"); - app.add_flag( - "--khr-lights-punctual", - gltfOptions.useKHRLightsPunctual, - "Use KHR_lights_punctual extension to request an unlit shader."); + app.add_flag_function( + "--no-khr-lights-punctual", + [&](size_t count) { gltfOptions.useKHRLightsPunctual = (count == 0); }, + "Don't use KHR_lights_punctual extension to export FBX lights."); app.add_flag( "--user-properties", diff --git a/src/gltf/Raw2Gltf.cpp b/src/gltf/Raw2Gltf.cpp index 6542641..eac53e4 100644 --- a/src/gltf/Raw2Gltf.cpp +++ b/src/gltf/Raw2Gltf.cpp @@ -729,14 +729,14 @@ ModelData* Raw2Gltf( light.innerConeAngle, light.outerConeAngle)); } - } - for (int i = 0; i < raw.GetNodeCount(); i++) { - const RawNode& node = raw.GetNode(i); - const auto nodeData = gltf->nodes.ptrs[i]; + for (int i = 0; i < raw.GetNodeCount(); i++) { + const RawNode& node = raw.GetNode(i); + const auto nodeData = gltf->nodes.ptrs[i]; - if (node.lightIx >= 0) { - // we lean on the fact that in this simple case, raw and gltf indexing are aligned - nodeData->SetLight(node.lightIx); + if (node.lightIx >= 0) { + // we lean on the fact that in this simple case, raw and gltf indexing are aligned + nodeData->SetLight(node.lightIx); + } } } }