File path processing and resolution. More...
Enumerations | |
enum class | AtFileType { Custom , Texture , OSL , Procedural , Plugin } |
Functions | |
AI_API AtString | AiResolveFilePath (const char *file_path, AtFileType file_type, const char *custom_path=NULL) |
Processes a file path and resolves it against search paths. More... | |
File path processing and resolution.
AI_API AtString AiResolveFilePath | ( | const char * | file_path, |
AtFileType | file_type, | ||
const char * | custom_path = NULL |
||
) |
Processes a file path and resolves it against search paths.
This function will first expand any environment variable references in the file path, and apply any existing path remapping to it. After that, if the custom_path string containes one or more paths, it will search for the file in those paths. If not found, and file_type is not "Custom", if will continue searching on the corresponding default path(s) for that type.
file_path | Initial file path to be processed and resolved |
file_type | Used to select one of the default search paths (or Custom for none of them) |
custom_path | A custom search path or paths can be given here |