0

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?

  • You might have to read into the source code of the usd importer but it's written in C/C++ AFAIK so not the friendliest endeavour. Or you can tap into the console output with https://blender.stackexchange.com/a/34218/86891 – Gorgious Feb 14 '24 at 07:43

0 Answers0