Click or drag to resize
Ab4d.SharpEngine logo

AssimpConverterCheckTextureFileName Method

CheckTextureFileName checks the texture file name and if file does not exist or is not in supported file format tries to find another file that can be used instead. Returns the file name that can be used to create a texture. If no file can be found, null is returned. The method can be overridden.

Namespace: Ab4d.SharpEngine.Assimp
Assembly: Ab4d.SharpEngine.Assimp (in Ab4d.SharpEngine.Assimp.dll) Version: 2.0.8956+4c7684e186ca1be74e7a284fbe739d9a1b843d3c
Syntax
C#
protected virtual string? CheckTextureFileName(
	string textureFileName
)

Parameters

textureFileName  String
full path and file name for texture file

Return Value

String
file name that can be used to create a texture or null if no file can be found
Remarks

CheckTextureFileName checks the texture file name and if file does not exist or is not in supported file format tries to find another file that can be used instead. Returns the file name that can be used to create a texture. If no file can be found, null is returned.

The method first checks if file extension is supported image format for the specified BitmapIO.

If file format is supported, then method checks if file exist on disk. If it exists then we can use this file and the original textureFileName is returned. If file does not exist, then it is checked if the file name was written in old 8.3 file name format, but on disk a file with longer name exist. In this case the existing file name is returned.

If file format is not supported, then it is checked if there is another file on disk with supported file format. In that case the supported file name is returned.

See Also