Skip to content

Commit

Permalink
Code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelliu-adsk committed Jun 29, 2023
1 parent 23fe578 commit 3a6abe8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/mayaUsd/fileio/primWriterRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ void UsdMayaPrimWriterRegistry::Poke(const std::string& mayaTypeName)
std::tie(first, last) = _reg.equal_range(mayaTypeName);

if (first == last) {
// The type name is not currently in our registry
// If the type name is not currently in our registry, check for plugin registry
static const TfTokenVector SCOPE = { _tokens->UsdMaya, _tokens->PrimWriter };
UsdMaya_RegistryHelper::FindAndLoadMayaPlug(SCOPE, mayaTypeName);
}
Expand Down
5 changes: 4 additions & 1 deletion lib/mayaUsd/fileio/primWriterRegistry.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ struct UsdMayaPrimWriterRegistry
using ContextPredicateFn
= std::function<UsdMayaPrimWriter::ContextSupport(const UsdMayaJobExportArgs&)>;

// TODO: Write new brief
/// \brief Register \p fn as a factory function providing a
/// UsdMayaPrimWriter subclass that can be used to write \p mayaType.
/// Provide a supportability of the primWriter. Use "supported" to
/// override the default primWriter
///
/// If you can't provide a valid UsdMayaPrimWriter for the given arguments,
/// return a null pointer from the factory function \p fn.
///
Expand Down Expand Up @@ -143,6 +145,7 @@ struct UsdMayaPrimWriterRegistry
static WriterFactoryFn
Find(const std::string& mayaTypeName, const UsdMayaJobExportArgs& exportArgs);

/// \brief Check for external primWriter for \p mayaTypeName.
MAYAUSD_CORE_PUBLIC
static void Poke(const std::string& mayaTypeName);

Expand Down
1 change: 0 additions & 1 deletion lib/mayaUsd/fileio/utils/adaptor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,6 @@ TfType UsdMayaAdaptor::GetUsdType() const
// The adaptor type mapping might be registered externally in a prim writer
// plugin. This simply pokes the prim writer registry to load the prim
// writer plugin in order to pull in the adaptor mapping.
//UsdMayaPrimWriterRegistry::Find(depNode.typeName().asChar(), *_jobExportArgs);
UsdMayaPrimWriterRegistry::Poke(depNode.typeName().asChar());
TfRegistryManager::GetInstance().SubscribeTo<UsdMayaAdaptor>();

Expand Down

0 comments on commit 3a6abe8

Please sign in to comment.