public void AddTexIdAndStoreSize(PathForImage image, int number, SortedDictionary <string, int> texAndInd) { var tempTexInfo = new TextureInformation(); var absolutePath = image.AbsolutePath; if (_convertLoadingFilePath != null) { absolutePath = _convertLoadingFilePath(absolutePath); } if (!texAndInd.ContainsKey(image.RelativePath) || !tempTexInfo.Load(absolutePath)) { AddInt(-1); return; } if (_value.UVTextureReferenceTarget.Value != Data.UVTextureReferenceTargetType.None && number == (int)_value.UVTextureReferenceTarget.Value) { _texInfo.Load(absolutePath); } AddInt(texAndInd[image.RelativePath]); }
private void AddTexIdAndInfo(bool isEnabled, PathForImage path, SortedDictionary <string, int> texAndInd, ref TextureInformation textureInfo) { var value = isEnabled ? GetTexIdAndInfo(path, texAndInd, ref textureInfo) : -1; AddInt(value); }
private int GetTexIdAndInfo(PathForImage image, SortedDictionary <string, int> texAndInd, ref TextureInformation texInfoRef) { var tempTexInfo = new TextureInformation(); if (!texAndInd.ContainsKey(image.RelativePath) || !tempTexInfo.Load(image.AbsolutePath)) { return(-1); } texInfoRef.Load(image.AbsolutePath); return(texAndInd[image.RelativePath]); }