Skip to content

Commit

Permalink
[usdImaging] add a coding error message about duplicate prim adapters
Browse files Browse the repository at this point in the history
(Internal change: 2253357)
  • Loading branch information
tgvarik authored and pixar-oss committed Oct 26, 2022
1 parent ddc01aa commit 1f15312
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pxr/usdImaging/usdImaging/adapterRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,16 @@ UsdImagingAdapterRegistry::UsdImagingAdapterRegistry() {
const TfToken primTypeName(it->second.Get<std::string>());

TF_DEBUG(USDIMAGING_PLUGINS).Msg("[PluginDiscover] Plugin discovered "
"'%s'\n",
typeIt->GetTypeName().c_str());
"'%s' for primType '%s'\n",
typeIt->GetTypeName().c_str(), primTypeName.GetText());
if (_typeMap.count(primTypeName) != 0) {
TF_CODING_ERROR("[PluginDiscover] A prim adapter for primType '%s' "
"already exists! Overriding prim adapters at runtime is not "
"supported. The last discovered adapter (%s) will be used. The "
"previously discovered adapter (%s) will be discarded.",
primTypeName.GetText(), typeIt->GetTypeName().c_str(),
_typeMap[primTypeName].GetTypeName().c_str());
}
_typeMap[primTypeName] = *typeIt;

// Adapters can opt in to being used as the adapter for any derived
Expand Down

0 comments on commit 1f15312

Please sign in to comment.