BlockBenchModel - Add export property to class 'Element'

This commit is contained in:
miku-666
2024-08-15 13:54:50 +02:00
parent 86fb119dd7
commit 7791876f07
2 changed files with 5 additions and 4 deletions

View File

@@ -63,6 +63,10 @@ namespace PckStudio.External.Format
[JsonProperty("locked")]
internal bool Locked;
[DefaultValue(true)]
[JsonProperty("export", DefaultValueHandling = DefaultValueHandling.Ignore)]
internal bool Export { get; } = true;
[JsonProperty("inflate")]
internal float Inflate;
@@ -329,9 +333,6 @@ namespace PckStudio.External.Format
[JsonProperty("model_identifier")]
internal string ModelIdentifier { get; set; } = "";
[JsonProperty("visible_box")]
internal int[] VisibleBox;
[JsonProperty("resolution")]
internal TextureRes TextureResolution;

View File

@@ -140,7 +140,7 @@ namespace PckStudio.Internal
private static void LoadElement(string boxType, Element element, ref SkinModelInfo modelInfo)
{
if (element.Type != "cube" || !element.UseBoxUv || !element.IsVisibile)
if (element.Type != "cube" || !element.UseBoxUv || !element.Export)
return;
boxType = TryConvertToSkinBoxType(boxType);