I'm trying to import USD assets that have textures, but I don't know the textures used until I open the file; for example if I import a USD file using:
bpy.ops.wm.usd_import(filepath=fileName)
I get a warning message:
WARNING: Couldn't open image file '/Users/pallen/Workspaces/testBlender/textures/Penguin_Albedo.png' for Texture Image node.
WARNING: Couldn't open image file '/Users/pallen/Workspaces/testBlender/textures/Penguin_Metalness.png' for Texture Image node.
WARNING: Couldn't open image file '/Users/pallen/Workspaces/testBlender/textures/Penguin_Roughness.png' for Texture Image node.
WARNING: Couldn't open image file '/Users/pallen/Workspaces/testBlender/textures/Penguin_Normal.png' for Texture Image node.
I need to know in advance a list of required texture files so I can fetch them from source control. Is there a way to catch the warnings (so I can reattempt the import) or better probe the file to find the dependencies?