usdSchemaExamples confusion

I’m new to USD and trying to understand the intended use of parts of
usdSchemaExamples. I can’t find an explanation in the docs.

Firstly, why is schema.usda installed under
when there’s already resources/generatedSchema.usda, which I thought
was sufficient? Is schema.usda still required for a non-codeless

Second, are there circumstances under which is

Here’s where the confusion arises…

I can see the Python extension module links
against (found relative to $ORIGIN).

  python3 build_scripts/ -v ~/dev/usd_build_default
  cd ~/dev/usd_build_default
  readelf -d ./lib/python/pxr/UsdSchemaExamples/ | grep -e 'NEEDED.*Schema' -e RUNPATH
  0x0000000000000001 (NEEDED)             Shared library: []
  0x000000000000001d (RUNPATH)            Library runpath: [$ORIGIN/../../../../share/usd/examples/plugin:$ORIGIN/../../..:/home/craig/dev/usd_build_default/lib]

It’s been called and placed under a plugin/
subdir, which suggests it’s a plug-in that’s dlopened by a core USD
library, rather than being called and living
under an lib/ subdir as I’d expect for a shared library that’s
explicitly linked to.

If I set PXR_PLUGINPATH_NAME to the resources dir,
TF_DEBUG=“PLUG_* TF_DLOPEN”, then usdview a test.usda containing an
Xform prim with the ParamsAPI schema applied, only the
generatedSchema.usda and plugInfo.json are loaded. is never dlopened, despite it being
“registered” as a “plugin”. The TF_DEBUG output, missing TfDlopen:

  Will read plugin info /home/craig/dev/usd_build_default/share/usd/examples/plugin/usdSchemaExamples/resources/plugInfo.json
   Did read plugin info /home/craig/dev/usd_build_default/share/usd/examples/plugin/usdSchemaExamples/resources/plugInfo.json
  Registering shared library plugin 'usdSchemaExamples' at '/home/craig/dev/usd_build_default/share/usd/examples/plugin/'.

According to strace, only the files for a “codeless schema” are opened:

  strace -f -e trace=openat usdview ./test.usda 2>&1 | grep examples
  [pid 20707] openat(AT_FDCWD, "/home/craig/dev/usd_build_default/share/usd/examples/plugin/usdSchemaExamples/resources/plugInfo.json", O_RDONLY) = 3
  [pid 20707] openat(AT_FDCWD, "/home/craig/dev/usd_build_default/share/usd/examples/plugin/usdSchemaExamples/resources/generatedSchema.usda", O_RDONLY) = 22

Is supposed to be dlopened at some point? Or
it’s only required by the Python module ( and
the Unix “lib” naming convention has been disregarded there for some

Adding to the confusion, there are other DSOs which are dlopened:

Loading plugin 'hgiGL'.
TfDlopen: [opening] '/home/craig/dev/usd_build_default/lib/' (flag=2)...
TfDlopen: [opened] '/home/craig/dev/usd_build_default/lib/' (handle=0x55f776173d60)
Loading plugin 'hdStorm'.
TfDlopen: [opening] '/home/craig/dev/usd_build_default/plugin/usd/' (flag=2)...
TfDlopen: [opened] '/home/craig/dev/usd_build_default/plugin/usd/' (handle=0x55f7773d46c0)

Despite being a “plugin” is also required by other libs:

  readelf -d ./lib/ | grep 'NEEDED.*GL'
  0x0000000000000001 (NEEDED)             Shared library: []

So it seems the choice of lib/ vs plugin/ directory names and “lib” as
a soname prefix has no meaning anymore, and there’s no separation
between required/needed shared libraries and dlopened plug-ins in USD?