mirror of
https://git.huckle.dev/Huckles-Minecraft-Archive/PCK-Studio.git
synced 2026-06-16 18:32:00 +00:00
ModelEditor - Add 'GetModelContainer' function
This commit is contained in:
@@ -39,6 +39,8 @@ namespace PckStudio.Forms.Editor
|
||||
modelTreeView.ImageList.Images.AddRange(ApplicationScope.EntityImages);
|
||||
}
|
||||
|
||||
internal ModelContainer GetModelContainer() => _models;
|
||||
|
||||
private const int InvalidImageIndex = 127;
|
||||
// TODO: move to json file. -miku
|
||||
private static Dictionary<string, int> ModelImageIndex = new Dictionary<string, int>()
|
||||
|
||||
@@ -755,6 +755,9 @@ namespace PckStudio
|
||||
var editor = new ModelEditor(modelContainer, TryGetSet<string, Image>.FromDelegates(tryGetTexture, trySetTexture), TryGet<string, MaterialContainer.Material>.FromDelegate(entityMaterials.TryGetValue));
|
||||
if (editor.ShowDialog() == DialogResult.OK)
|
||||
{
|
||||
asset.SetData(new ModelFileWriter(editor.GetModelContainer(), modelContainer.Version));
|
||||
BuildMainTreeView();
|
||||
wasModified = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user