Scripting API
Scripting API
ModelImages
Class in Abyss.Core.Scenes, from Abyss.Core.
Where the images a model names in files of their own are in the project: where the model says they are, or, where it names a folder the project does not have, the image of its name in the folder nearest the model.
public static class ModelImagesRemarks
A model names its images as they were where it was made: an FBX by the folders of the machine it was made on, ..\Face\Dino_Face01.png, where a project may keep them in a textures folder beside the model's. So an image not where the model says is looked for by its name in every folder of the project, and the one nearest the model is taken: fewest folders up from the model's, then fewest down again, then the first by name. An image of the same name with another image's ending, a .png where a .tga is named, is taken where none has the ending named.
Spelled as the project spells it, each folder's capitals as they are on the disk, so it is found on a disk that tells them apart as well as on one that does not.
Methods
WithImagesFound
public static ModelDescription WithImagesFound(this ModelDescription described, string model, AssetDatabase database)What described says, each image in a file of its own named where it is in the project now, relative to the model; one found nowhere left where the model names it and said to be missing.
Parameters
described: What a model's import says of it.model: The model, by its path under the asset root.database: The project's files.
Find
public static string? Find(AssetDatabase database, string model, string file)The image a model names, by its path under the asset root as the project spells it: where the model says it is, or the one of its name nearest the model; null where the project has none.
Parameters
database: The project's files.model: The model, by its path under the asset root.file: The image, as the model's import names it, relative to the model.
