mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 20:08:53 -05:00
rename
This commit is contained in:
@@ -56,7 +56,7 @@ namespace UniGLTF
|
||||
s_foldTextures = EditorGUILayout.Foldout(s_foldTextures, "Remapped Textures");
|
||||
if (s_foldTextures)
|
||||
{
|
||||
importer.DrawRemapGUI<UnityEngine.Texture>(textureSetImporter.GetTextureSet().GetTextureParamsDistinct().Select(x => x.SubAssetKey));
|
||||
importer.DrawRemapGUI<UnityEngine.Texture>(textureSetImporter.GetTextureImportParamSet().GetTextureParamsDistinct().Select(x => x.SubAssetKey));
|
||||
}
|
||||
|
||||
if (GUILayout.Button("Clear"))
|
||||
|
||||
@@ -44,7 +44,7 @@ namespace UniGLTF
|
||||
using (var loader = new ImporterContext(parser, extractedObjects))
|
||||
{
|
||||
// Configure TextureImporter to Extracted Textures.
|
||||
foreach (var textureInfo in loader.TextureSetImporter.GetTextureSet().GetTextureParamsDistinct())
|
||||
foreach (var textureInfo in loader.TextureSetImporter.GetTextureImportParamSet().GetTextureParamsDistinct())
|
||||
{
|
||||
TextureImporterConfigurator.Configure(textureInfo, loader.TextureFactory.ExternalTextures);
|
||||
}
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace UniGLTF
|
||||
Action<IEnumerable<UnityPath>> onCompleted = null)
|
||||
{
|
||||
var extractor = new TextureExtractor(parser, textureDirectory, subAssets);
|
||||
foreach (var param in textureSetImporter.GetTextureSet().GetTextureParamsDistinct())
|
||||
foreach (var param in textureSetImporter.GetTextureImportParamSet().GetTextureParamsDistinct())
|
||||
{
|
||||
extractor.Extract(param.SubAssetKey, param);
|
||||
}
|
||||
|
||||
@@ -183,7 +183,7 @@ namespace UniGLTF
|
||||
|
||||
public async Task LoadTexturesAsync()
|
||||
{
|
||||
var textures = TextureSetImporter.GetTextureSet().GetTextureParamsDistinct();
|
||||
var textures = TextureSetImporter.GetTextureImportParamSet().GetTextureParamsDistinct();
|
||||
foreach (var param in textures)
|
||||
{
|
||||
var tex = await TextureFactory.GetTextureAsync(param);
|
||||
|
||||
@@ -28,24 +28,24 @@ namespace UniGLTF
|
||||
public sealed class GltfTextureSetImporter : ITextureSetImporter
|
||||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private TextureSet _textureSet;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
|
||||
public GltfTextureSetImporter(GltfParser parser)
|
||||
{
|
||||
m_parser = parser;
|
||||
}
|
||||
|
||||
public TextureSet GetTextureSet()
|
||||
public TextureImportParamSet GetTextureImportParamSet()
|
||||
{
|
||||
if (_textureSet == null)
|
||||
if (_textureImportParamSet == null)
|
||||
{
|
||||
_textureSet = new TextureSet();
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser))
|
||||
{
|
||||
_textureSet.Add(param);
|
||||
_textureImportParamSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureSet;
|
||||
return _textureImportParamSet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -9,6 +9,6 @@ namespace UniGLTF
|
||||
/// </summary>
|
||||
public interface ITextureSetImporter
|
||||
{
|
||||
TextureSet GetTextureSet();
|
||||
TextureImportParamSet GetTextureImportParamSet();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,7 +10,7 @@ namespace VRM
|
||||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private readonly glTF_VRM_extensions m_vrm;
|
||||
private TextureSet _textureSet;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
|
||||
public VRMTextureSetImporter(GltfParser parser, glTF_VRM_extensions vrm)
|
||||
{
|
||||
@@ -18,17 +18,17 @@ namespace VRM
|
||||
m_vrm = vrm;
|
||||
}
|
||||
|
||||
public TextureSet GetTextureSet()
|
||||
public TextureImportParamSet GetTextureImportParamSet()
|
||||
{
|
||||
if (_textureSet == null)
|
||||
if (_textureImportParamSet == null)
|
||||
{
|
||||
_textureSet = new TextureSet();
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser, m_vrm))
|
||||
{
|
||||
_textureSet.Add(param);
|
||||
_textureImportParamSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureSet;
|
||||
return _textureImportParamSet;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -10,24 +10,24 @@ namespace UniVRM10
|
||||
public sealed class Vrm10TextureSetImporter : ITextureSetImporter
|
||||
{
|
||||
private readonly GltfParser m_parser;
|
||||
private TextureSet _textureSet;
|
||||
private TextureImportParamSet _textureImportParamSet;
|
||||
|
||||
public Vrm10TextureSetImporter(GltfParser parser)
|
||||
{
|
||||
m_parser = parser;
|
||||
}
|
||||
|
||||
public TextureSet GetTextureSet()
|
||||
public TextureImportParamSet GetTextureImportParamSet()
|
||||
{
|
||||
if (_textureSet == null)
|
||||
if (_textureImportParamSet == null)
|
||||
{
|
||||
_textureSet = new TextureSet();
|
||||
_textureImportParamSet = new TextureImportParamSet();
|
||||
foreach (var (_, param) in EnumerateAllTextures(m_parser))
|
||||
{
|
||||
_textureSet.Add(param);
|
||||
_textureImportParamSet.Add(param);
|
||||
}
|
||||
}
|
||||
return _textureSet;
|
||||
return _textureImportParamSet;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
namespace VRMShaders
|
||||
{
|
||||
public sealed class TextureSet
|
||||
public sealed class TextureImportParamSet
|
||||
{
|
||||
private readonly Dictionary<SubAssetKey, TextureImportParam> _params = new Dictionary<SubAssetKey, TextureImportParam>();
|
||||
|
||||
Reference in New Issue
Block a user