Hello Olivier,
Unfortunately, there is indeed no way to directly the data in Designer's library database through the Python API.
To list the identifiers of graphs from Designer's default library, you may manually load its content and read it, which can be slow dependending on what you access.
Here is a sample script that does just that:
import os
from os import path
import sd
from sd.api.sdapplication import SDApplicationPath
from sd.api import SDSBSCompGraph
app = sd.getContext().getSDApplication()
pkgMgr = app.getPackageMgr()
pkgDirPath = os.path.join(app.getPath(SDApplicationPath.DefaultResourcesDir), "packages")
for pkgFilename in os.listdir(pkgDirPath):
if pkgFilename[0] == "a":
pkgPath = os.path.join(pkgDirPath, pkgFilename)
pkg = pkgMgr.loadUserPackage(pkgPath)
print(pkgFilename)
for rsc in pkg.getChildrenResources(isRecursive=True):
if isinstance(rsc, SDSBSCompGraph):
print(f" - {rsc.getIdentifier()}")
pkgMgr.unloadUserPackage(pkg)
Alternatively, you may read from the database directly in Python, without going through the API. The database uses the simple JSON format which is easy to parse. It is the resources.json file in Designer's user data:
(Windows) %LOCALAPPDATA%/Adobe/Adobe Substance 3D Designer/databases/resources.json
(macOS) ~/Library/Application Support/Adobe/Adobe Substance 3D Designer/databases/resources.json
The graph identifiers are stored in the "basename" key.
I hope this is helpful!