Export presets, wrap uv's, bugfixes and formatting.

[MA_TextureAtlas] Updated export window to use scriptable asset export presets. The option to wrap uv's (default = true). Bigfixes and code formatting.
This commit is contained in:
max
2019-11-06 18:08:01 +01:00
parent e81a4ec119
commit a728366035
12 changed files with 507 additions and 261 deletions

View File

@ -16,7 +16,7 @@ namespace MA_TextureAtlasserPro
public MA_TextureAtlasserProQuad selectedTextureQuad;
private Rect editorWorkRect;
public bool showTextures = false;
public MA_TextureAtlasserProExportSettings exportSettings;
//Data
public Vector2 textureAtlasSize;

View File

@ -0,0 +1,63 @@
using UnityEngine;
using System.Collections;
using MA_Texture;
namespace MA_TextureAtlasserPro
{
[System.Serializable]
public class MA_TextureAtlasserProExportSettings : ScriptableObject
{
[HideInInspector]
public bool canModify = true;
public ModelExportSettings modelExportSettings = new ModelExportSettings();
public TextureExportSettings textureExportSettings = new TextureExportSettings();
}
[System.Serializable]
public class ModelExportSettings
{
[Header("Model settings:")]
public ModelFormat modelFormat = ModelFormat.Obj;
public bool replaceModel = false;
public bool uvFlipY = true;
public int uvChannel = 0;
public bool uvWrap = true;
}
[System.Serializable]
public class TextureExportSettings
{
[Header("Texture settings:")]
public TextureFormat textureFormat = TextureFormat.Png;
public TextureType textureType = TextureType.Default;
public MA_TextureUtils.TextureScaleMode textureScaleMode = MA_TextureUtils.TextureScaleMode.Bilinear;
}
public enum ExportPreset
{
Custom,
Default,
Sprites,
ReplaceObjMeshes
}
public enum ModelFormat
{
None,
Obj
}
public enum TextureFormat
{
None,
Png
}
public enum TextureType
{
Default,
Sprite,
SpriteSliced
}
}