Skip to content

Commit

Permalink
Model groups.
Browse files Browse the repository at this point in the history
Added model group support, you can now have multiple meshes in one export.
Removed OBJ and mesh replace export options.
Mesh replace didn't work, might get added again in the feature.
OBJ needs to be rewritten as well to support the multiple meshes, and Unity now has model export options in engine.
Version 1.8.0+ is now only supports Unity2018.3+.
  • Loading branch information
maxartz15 committed Apr 20, 2020
1 parent 3532465 commit 8ff2db7
Show file tree
Hide file tree
Showing 20 changed files with 493 additions and 477 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#if UNITY_EDITOR
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MA_TextureAtlasserPro
{
[System.Serializable]
public class MA_ModelGroup
{
public string name = "Model";
public List<Mesh> meshes = new List<Mesh>();
}
}
#endif

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class MA_TextureAtlasserProAtlas : ScriptableObject
public List<MA_TextureAtlasserProQuad> textureQuads;
public MA_TextureAtlasserProQuad selectedTextureQuad;
private Rect editorWorkRect;
public bool showTextures = false;
public bool showTextures = true;
public MA_TextureAtlasserProExportSettings exportSettings;

//Data
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ public class MaterialExportSettings
public enum ModelFormat
{
None,
UnityMeshPrefab,
ReplaceMesh,
Obj
UnityMeshPrefab
}

public enum TextureFormat
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,28 @@ namespace MA_TextureAtlasserPro
public class MA_TextureAtlasserProQuad : ScriptableObject
{
//Editor
public bool isSelected = false; //Is this thing selected
public Rect rect; //The internal rect
public Rect guiRect; //The visual clamped and snapped rect
public bool debugMode = false; //Are we debugging, for showing some other things (like handles)

private bool isDragging = false; //Are we editing the pos or size
[HideInInspector]
public bool isSelected = false; //Is this thing selected
public Rect rect; //The internal rect
[HideInInspector]
public Rect guiRect; //The visual clamped and snapped rect
[HideInInspector]
public bool debugMode = false; //Are we debugging, for showing some other things (like handles)

private bool isDragging = false; //Are we editing the pos or size
private bool isDraggingRectHeigt = false;
[HideInInspector]
public Rect dragRectHeight;
private bool isDraggingRectWidth = false;
[HideInInspector]
public Rect dragRectWidth;
private bool isDraggingRectPos = false;
[HideInInspector]
public Rect dragRectPos;

//Data
public List<MA_TextureGroup> textureGroups;
public List<Mesh> meshes;
public List<MA_ModelGroup> modelGroups;

public void UpdateTextureQuad(Event e, Rect editorViewRect, Rect editorWorkRect, Vector2 zoomCoordsOrigin, bool useEvents, bool showTexture)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ public class MA_TextureAtlasserProSettings : ScriptableObject
public KeyCode zoomOutHotKey = KeyCode.Minus;

[Header("Duplication:")]
public bool copySelectedQuadData = true;
public string duplicatedQuadNamePrefix = "new ";

[Header("Selection")]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,9 +96,9 @@ private static void LoadToolTips(MA_TextureAtlasserProSettings settings)
exportAtlasGC.tooltip = "Opens the export window.";
if (settings.useHotkeys)
{
createQuadGC.tooltip = string.Format("({0} + {1}), Creates a new quad.", settings.modifierKey, settings.addQuadHotKey);
removeQuadGC.tooltip = string.Format("({0} + {1}), Removes the selected quad.", settings.modifierKey, settings.removeQuadHotKey);
duplicateQuadGC.tooltip = string.Format("({0} + {1}), Duplicates the selected quad.", settings.modifierKey, settings.duplicateHotKey);
createQuadGC.tooltip = string.Format("({0}+{1}), Creates a new quad.", settings.modifierKey, settings.addQuadHotKey);
removeQuadGC.tooltip = string.Format("({0}+{1}), Removes the selected quad.", settings.modifierKey, settings.removeQuadHotKey);
duplicateQuadGC.tooltip = string.Format("({0}+{1}), Duplicates the selected quad.", settings.modifierKey, settings.duplicateHotKey);
}
else
{
Expand Down
Loading

0 comments on commit 8ff2db7

Please sign in to comment.