Skip to content

Commit

Permalink
Allow alternative values for emitMtlx Sdf file format argument
Browse files Browse the repository at this point in the history
Values that evaluate to 'true': true, 1, yes, on.
  • Loading branch information
pablode committed Jul 14, 2024
1 parent 72e5cd4 commit 44b2d72
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libguc/src/fileFormat.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include <pxr/base/arch/fileSystem.h>
#include <pxr/base/tf/registryManager.h>
#include <pxr/base/tf/envSetting.h>
#include <pxr/base/tf/stringUtils.h>
#include <pxr/usd/ar/defaultResolverContext.h>
#include <pxr/usd/ar/resolverContext.h>
#include <pxr/usd/ar/resolverContextBinder.h>
Expand Down Expand Up @@ -103,7 +104,7 @@ SdfAbstractDataRefPtr UsdGlTFFileFormat::InitData(const FileFormatArguments& arg
auto emitMtlxIt = args.find(_tokens->emitMtlx.GetText());
if (emitMtlxIt != args.end())
{
data->emitMtlx = (emitMtlxIt->second == "true");
data->emitMtlx = TfUnstringify<bool>(emitMtlxIt->second);
}

return data;
Expand Down

0 comments on commit 44b2d72

Please sign in to comment.