Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Usd] Add debug information for schema reg. #478

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pxr/usd/lib/usd/debugCodes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ TF_REGISTRY_FUNCTION(TfDebug)
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_PATH_RESOLUTION, "Usd path resolution diagnostics");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_PAYLOADS, "Usd payload load/unload messages");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_PRIM_LIFETIMES, "Usd prim ctor/dtor messages");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_SCHEMA_REGISTRATION, "Usd schema registration details.");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_STAGE_CACHE, "Usd stage cache details");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_STAGE_LIFETIMES, "Usd stage ctor/dtor messages");
TF_DEBUG_ENVIRONMENT_SYMBOL(USD_STAGE_OPEN, "Usd stage opening details");
Expand Down
1 change: 1 addition & 0 deletions pxr/usd/lib/usd/debugCodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ TF_DEBUG_CODES(
USD_PATH_RESOLUTION,
USD_PAYLOADS,
USD_PRIM_LIFETIMES,
USD_SCHEMA_REGISTRATION,
USD_STAGE_CACHE,
USD_STAGE_LIFETIMES,
USD_STAGE_OPEN,
Expand Down
8 changes: 8 additions & 0 deletions pxr/usd/lib/usd/schemaRegistry.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "pxr/pxr.h"
#include "pxr/usd/usd/schemaRegistry.h"

#include "pxr/usd/usd/debugCodes.h"
#include "pxr/usd/usd/clip.h"
#include "pxr/usd/usd/typed.h"
#include "pxr/usd/usd/schemaBase.h"
Expand Down Expand Up @@ -124,6 +125,13 @@ _GetGeneratedSchema(const PlugPluginPtr &plugin)
// Look for generatedSchema in Resources.
const string fname = TfStringCatPaths(plugin->GetResourcePath(),
"generatedSchema.usda");
TF_DEBUG(USD_SCHEMA_REGISTRATION).Msg(
"Looking up generated schema for plugin %s at path %s. "
"Generated schema %s.\n",
plugin->GetName().c_str(),
fname.c_str(),
(TfIsFile(fname) ? "found" : "not found")
);
return TfIsFile(fname) ? SdfLayer::OpenAsAnonymous(fname) : TfNullPtr;
}

Expand Down