mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-12 10:17:22 +01:00
Bone and Material Limit updates.
Fix UI in Models tab to allow for more than 4 Materials per DT spec.
This commit is contained in:
parent
ac64b4db24
commit
b0a8b1baa5
2 changed files with 8 additions and 8 deletions
|
|
@ -208,10 +208,10 @@ public partial class ModelImporter(ModelRoot model, IoNotifier notifier)
|
|||
if (index >= 0)
|
||||
return (ushort)index;
|
||||
|
||||
// If there's already 4 materials, we can't add any more.
|
||||
// If there's already 10 materials, we can't add any more.
|
||||
// TODO: permit, with a warning to reduce, and validation in MdlTab.
|
||||
var count = _materials.Count;
|
||||
if (count >= 4)
|
||||
if (count >= 10)
|
||||
return 0;
|
||||
|
||||
_materials.Add(materialName);
|
||||
|
|
@ -234,10 +234,10 @@ public partial class ModelImporter(ModelRoot model, IoNotifier notifier)
|
|||
boneIndices.Add((ushort)boneIndex);
|
||||
}
|
||||
|
||||
if (boneIndices.Count > 64)
|
||||
throw notifier.Exception("XIV does not support meshes weighted to a total of more than 64 bones.");
|
||||
if (boneIndices.Count > 128)
|
||||
throw notifier.Exception("XIV does not support meshes weighted to a total of more than 128 bones.");
|
||||
|
||||
var boneIndicesArray = new ushort[64];
|
||||
var boneIndicesArray = new ushort[128];
|
||||
Array.Copy(boneIndices.ToArray(), boneIndicesArray, boneIndices.Count);
|
||||
|
||||
var boneTableIndex = _boneTables.Count;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ namespace Penumbra.UI.AdvancedWindow;
|
|||
|
||||
public partial class ModEditWindow
|
||||
{
|
||||
private const int MdlMaterialMaximum = 4;
|
||||
private const int MdlMaterialMaximum = 10;
|
||||
|
||||
private const string MdlImportDocumentation =
|
||||
@"https://github.com/xivdev/Penumbra/wiki/Model-IO#user-content-9b49d296-23ab-410a-845b-a3be769b71ea";
|
||||
|
|
@ -93,7 +93,7 @@ public partial class ModEditWindow
|
|||
|
||||
tab.Mdl.ConvertV5ToV6();
|
||||
_modelTab.SaveFile();
|
||||
}
|
||||
}
|
||||
|
||||
private void DrawImportExport(MdlTab tab, bool disabled)
|
||||
{
|
||||
|
|
@ -427,7 +427,7 @@ public partial class ModEditWindow
|
|||
|
||||
private static void DrawInvalidMaterialMarker()
|
||||
{
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
using (ImRaii.PushFont(UiBuilder.IconFont))
|
||||
ImGuiUtil.TextColored(0xFF0000FF, FontAwesomeIcon.TimesCircle.ToIconString());
|
||||
|
||||
ImGuiUtil.HoverTooltip(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue