On 17/02/2015 at 03:21, xxxxxxxx wrote:
Hi,
I need to extract the full file path for all textures using python scripting. So I was iterating over all the textures and trying to extract the file path. But in some cases eg. when the texture file is in the project path or in tex folder or in any of the search paths, we get only the file name and not the full file path.
So I wrote my code such that in cases where only file name is available, look for the file in the below order -
- in project path
- in tex folder
- in all the search paths
If the file is found in any of these, save the full path.
This works when the file names in all these paths are unique. But if there are duplicate names, it is not possible to determine which path to save. How do I handle such cases? Or is there a simpler way to extract texture paths which I am missing out?
Thanks.