Exemplo n.º 1
0
    void OnEnable()
    {
        window              = this;
        this.maxSize        = new Vector2(715f, 398f);
        this.minSize        = this.maxSize;
        this.wantsMouseMove = true;
        loadAnimatorData();
        oData = AMOptionsFile.loadFile();
        setupFilteredCategories();
        selectedIndex = getCategoryIndexForEase(key.easeType);
        if (selectedIndex < 0)
        {
            selectedIndex = key.easeType;
            category      = 0;
        }

        if (getSelectedEaseName(category, selectedIndex) == "Custom")
        {
            isCustomEase = true;
        }
        if (isCustomEase && key.customEase.Count > 0)
        {
            curve = key.getCustomEaseCurve();
        }
        else
        {
            setEasingCurve();
        }
    }
Exemplo n.º 2
0
    void OnEnable()
    {
        window       = this;
        this.title   = "Options";
        this.minSize = new Vector2(545f, 365f);
        this.maxSize = new Vector2(1000f, this.minSize.y);

        loadAnimatorData();
        oData = AMOptionsFile.loadFile();
        // setup skin popup
        skinIndex = 0;
        for (int i = 1; i < skin_ids.Length; i++)
        {
            if (skin_ids[i] == oData.skin)
            {
                skinIndex = i;
                break;
            }
        }

        if (aData)
        {
            exportTakeIndex = aData.getTakeIndex(aData.getCurrentTake());
        }
    }
Exemplo n.º 3
0
    void OnEnable()
    {
        window       = this;
        this.title   = "Export Take" + (take == null ? "s" : "");
        this.minSize = new Vector2(190f, 120f);

        oData = AMOptionsFile.loadFile();
    }
Exemplo n.º 4
0
    void OnEnable()
    {
        window            = this;
        this.titleContent = new GUIContent("Settings");
        this.minSize      = new Vector2(125f, 115f);
        this.maxSize      = this.minSize;

        oData = AMOptionsFile.loadFile();
        loadAnimatorData();
    }
Exemplo n.º 5
0
 void OnEnable()
 {
     window          = this;
     this.title      = "Code View";
     this.minSize    = new Vector2(/*380f*/ width_code_min + width_inspector_open_min, 102f);
     this.scrollView = new Vector2(0f, 0f);
     oData           = AMOptionsFile.loadFile();
     loadAnimatorData();
     refreshCode();
 }
Exemplo n.º 6
0
 void OnEnable()
 {
     window              = this;
     this.titleContent   = new GUIContent("Property");
     this.minSize        = new Vector2(273f, 102f);
     this.wantsMouseMove = true;
     oData = AMOptionsFile.loadFile();
     loadAnimatorData();
     scrollView = new Vector2(0f, 0f);
     // define styles
 }
Exemplo n.º 7
0
    void OnEnable()
    {
        this.titleContent = new GUIContent("Resolve Duplicates");
        this.minSize      = new Vector2(590f, 120f);
        actions           = new List <int>();
        for (int i = 0; i < newReference.Count; i++)
        {
            actions.Add(0);
        }

        oData = AMOptionsFile.loadFile();
    }
Exemplo n.º 8
0
    void OnEnable()
    {
        window = this;

        texRightArrow = (Texture)Resources.Load("am_nav_right"); // inspector right arrow
        texLeftArrow  = (Texture)Resources.Load("am_nav_left");  // inspector left arrow

        this.titleContent = new GUIContent("Code View");
        this.minSize      = new Vector2(/*380f*/ width_code_min + width_inspector_open_min, 102f);
        this.scrollView   = new Vector2(0f, 0f);
        oData             = AMOptionsFile.loadFile();
        loadAnimatorData();
        refreshCode();
    }
Exemplo n.º 9
0
    void OnEnable()
    {
        //curves[0] = new AnimationCurve(new Keyframe(0, 0), new Keyframe(1, 1));
        //curves[1] = new AnimationCurve(new Keyframe(0, 1), new Keyframe(1, 0));
        //curves[2] = new AnimationCurve(new Keyframe(0, 0.5f), new Keyframe(1, 0.5f));

        window = this;

        tex_orb = (Texture)Resources.Load("am_orb");

        this.maxSize        = new Vector2(715f, 398f);
        this.minSize        = this.maxSize;
        this.wantsMouseMove = true;
        loadAnimatorData();
        oData = AMOptionsFile.loadFile();
        setupFilteredCategories();
        selectedIndex = getCategoryIndexForEase(key.easeType);
        if (selectedIndex < 0)
        {
            selectedIndex = key.easeType;
            category      = 0;
        }

        if (getSelectedEaseName(category, selectedIndex) == "Custom")
        {
            isCustomEase = true;
        }
        if (isCustomEase && key.customEase.Count > 0)
        {
            curve = key.getCustomEaseCurve();
        }
        else
        {
            setEasingCurve();
        }
    }
Exemplo n.º 10
0
    void OnGUI()
    {
        AMTimeline.loadSkin(oData, ref skin, ref cachedSkinName, position);
        GUIStyle textStyle = new GUIStyle(GUI.skin.label);

        textStyle.wordWrap  = false;
        textStyle.alignment = TextAnchor.UpperLeft;
        textStyle.padding   = new RectOffset(0, 0, 10, 0);
        GUIStyle styleLabelCentered = new GUIStyle(GUI.skin.label);

        styleLabelCentered.alignment = TextAnchor.MiddleCenter;
        if (!aData)
        {
            AMTimeline.MessageBox("Animator requires an AnimatorData component in your scene. Launch Animator to add the component.", AMTimeline.MessageBoxType.Warning);
            return;
        }
        if (!oData)
        {
            oData = AMOptionsFile.loadFile();
        }
        #region drag logic
        Event e = Event.current;
        currentMousePosition = e.mousePosition;
        Rect rectWindow = new Rect(0f, 0f, position.width, position.height);
        mouseOverElement = (int)ElementType.None;
        //bool wasDragging = false;
        if (e.type == EventType.mouseDrag && EditorWindow.mouseOverWindow == this)
        {
            isDragging = true;
        }
        else if (e.type == EventType.mouseUp || /*EditorWindow.mouseOverWindow!=this*/ Event.current.rawType == EventType.MouseUp /*|| e.mousePosition.y < 0f*/)
        {
            if (isDragging)
            {
                //wasDragging = true;
                isDragging = false;
            }
        }
        // set cursor
        if (dragType == (int)DragType.ResizeInspector)
        {
            EditorGUIUtility.AddCursorRect(rectWindow, MouseCursor.ResizeHorizontal);
        }
        #endregion
        #region resize inspector
        if (dragType == (int)DragType.ResizeInspector)
        {
            width_inspector_open = start_width_inspector_open + (startScrubMousePosition.x - e.mousePosition.x);
        }
        width_inspector_open = Mathf.Clamp(width_inspector_open, width_inspector_open_min, position.width - width_code_min);
        #endregion
        GUILayout.BeginHorizontal();
        #region code vertical
        GUILayout.BeginVertical(GUILayout.Height(position.height));
        GUILayout.Space(3f);
        if (aData.setCodeLanguage(GUILayout.SelectionGrid(aData.codeLanguage, selStrings, 2 /*,styleSelGrid*/)))
        {
            // save data
            EditorUtility.SetDirty(aData);
            refreshCode();
        }
        GUILayout.Space(3f);
        // set scrollview background
        GUIStyle styleScrollView = new GUIStyle(GUI.skin.scrollView);
        styleScrollView.normal.background = GUI.skin.GetStyle("GroupElementBG").onNormal.background;
        scrollView = EditorGUILayout.BeginScrollView(scrollView, false, false, GUI.skin.horizontalScrollbar, GUI.skin.verticalScrollbar, styleScrollView);
        Vector2 textSize = textStyle.CalcSize(new GUIContent(codeCache));
        GUILayout.BeginHorizontal();
        GUILayout.Space(10f);
        EditorGUILayout.SelectableLabel(codeCache, textStyle, GUILayout.ExpandHeight(true), GUILayout.ExpandWidth(true), GUILayout.MinWidth(textSize.x + 30f), GUILayout.MinHeight(textSize.y + 30f));
        GUILayout.EndHorizontal();
        EditorGUILayout.EndScrollView();
        GUILayout.Space(3f);
        GUILayout.BeginHorizontal();
        // refresh button
        if (shouldRefresh)
        {
            GUI.color = Color.green;
        }
        if (GUILayout.Button("" /*,styleButton*/))
        {
            refreshCode();
        }
        GUI.color = Color.white;
        GUI.Label(GUILayoutUtility.GetLastRect(), "Refresh", styleLabelCentered);
        // copy to clipboard button
        if (GUILayout.Button("Copy to Clipboard"))
        {
            ClipboardHelper.clipBoard  = codeCache;
            GUIUtility.keyboardControl = 0;
            GUIUtility.hotControl      = 0;
        }
        GUILayout.EndHorizontal();
        GUILayout.Space(3f);
        GUILayout.EndVertical();
        #endregion
        #region track list vertical
        GUILayout.BeginHorizontal(GUILayout.Width((isInspectorOpen ? width_inspector_open : width_inspector_closed)));
        //if(GUILayout.Button("O/C",GUILayout.Width(width_inspector_closed),GUILayout.Height(position.height))) {
        //isInspectorOpen = !isInspectorOpen;
        //}
        // properties button
        GUILayout.BeginVertical(GUILayout.Width(width_inspector_closed));
        GUILayout.Space(width_inspector_closed);
        Rect rectPropertiesButton = new Rect(position.width - (isInspectorOpen ? width_inspector_open : width_inspector_closed) - 1f, 0f, width_inspector_closed, position.height - 28f);
        if (GUI.Button(rectPropertiesButton, "", "label"))
        {
            isInspectorOpen = !isInspectorOpen;
        }
        GUI.color = AMTimeline.getSkinTextureStyleState("properties_bg").textColor;
        GUI.DrawTexture(rectPropertiesButton, AMTimeline.getSkinTextureStyleState("properties_bg").background);
        GUI.color = Color.white;
        GUI.DrawTexture(new Rect(rectPropertiesButton.x + 8f + (isInspectorOpen ? 1f : 0f), 12f, 22f, 19f), (isInspectorOpen ? texRightArrow : texLeftArrow));
        if (!isInspectorOpen)
        {
            int numSelected = 0;
            foreach (var pair in dictTracks)
            {
                if (pair.Value == true)
                {
                    numSelected++;
                }
            }
            if (numSelected < dictTracks.Count)
            {
                GUI.color = Color.red;
            }
            GUI.Label(new Rect(rectPropertiesButton.x, rectPropertiesButton.y + rectPropertiesButton.height, rectPropertiesButton.width, 28f), numSelected + "/" + dictTracks.Count, styleLabelCentered);
            GUI.color = Color.white;
        }
        GUILayout.EndVertical();
        if (isInspectorOpen)
        {
            GUILayout.BeginVertical(GUILayout.Width(width_inspector_open - width_inspector_closed));
            GUILayout.Space(inspector_space);
            GUILayout.Label("Track Selection");
            GUILayout.Space(inspector_space);
            GUILayout.BeginHorizontal();
            //GUILayout.Space(inspector_space);
            scrollPos = EditorGUILayout.BeginScrollView(scrollPos /*,styleScrollView*/);
            for (int i = 0; i < aData.getCurrentTake().rootGroup.elements.Count; i++)
            {
                int id = aData.getCurrentTake().rootGroup.elements[i];
                //float height_group_elements = 0f;
                showGroupElement(id, 0);
            }
            GUILayout.EndScrollView();
            GUILayout.Space(inspector_space);
            GUILayout.EndHorizontal();
            // buttons
            GUILayout.Space(inspector_space);
            GUILayout.BeginHorizontal();
            Rect rectResizeInspector = new Rect(rectPropertiesButton.x, position.height - 15f - 8f, 15f, 15f);
            GUI.Button(rectResizeInspector, "", GUI.skin.GetStyle("ResizeTrackThumb"));
            EditorGUIUtility.AddCursorRect(rectResizeInspector, MouseCursor.ResizeHorizontal);
            if (rectResizeInspector.Contains(e.mousePosition) && mouseOverElement == (int)ElementType.None)
            {
                mouseOverElement = (int)ElementType.ResizeInspector;
            }

            if (GUILayout.Button("All", GUILayout.Width(42f)))
            {
                foreach (var key in dictTracks.Keys.ToList())
                {
                    dictTracks[key] = true;
                }
                refreshCode();
            }
            if (GUILayout.Button("None", GUILayout.Width(42f)))
            {
                foreach (var key in dictTracks.Keys.ToList())
                {
                    dictTracks[key] = false;
                }
                refreshCode();
            }
            GUILayout.FlexibleSpace();
            if (GUILayout.Button("JSON...", GUILayout.Width(58f)))
            {
                // export json
                exportJSON();
            }
            GUILayout.EndHorizontal();
            GUILayout.Space(inspector_space);
            GUILayout.EndVertical();
        }
        GUILayout.EndHorizontal();
        #endregion
        GUILayout.EndHorizontal();
    }
Exemplo n.º 11
0
    void OnGUI()
    {
        AMTimeline.loadSkin(oData, ref skin, ref cachedSkinName, position);
        if (!aData)
        {
            AMTimeline.MessageBox("Animator requires an AnimatorData component in your scene. Launch Animator to add the component.", AMTimeline.MessageBoxType.Warning);
            return;
        }
        if (!oData)
        {
            oData = AMOptionsFile.loadFile();
        }
        GUILayout.BeginHorizontal();
        #region tab selection
        //GUI.DrawTexture(new Rect(0f,0f,120f,position.height),GUI.skin.GetStyle("GroupElementBG")/*GUI.skin.GetStyle("GroupElementBG").onNormal.background*/);
        GUIStyle styleTabSelectionBG = new GUIStyle(GUI.skin.GetStyle("GroupElementBG"));
        styleTabSelectionBG.normal.background = EditorStyles.toolbar.normal.background;
        GUILayout.BeginVertical(/*GUI.skin.GetStyle("GroupElementBG")*/ styleTabSelectionBG, GUILayout.Width(121f));
        EditorGUIUtility.LookLikeControls();
        GUIStyle styleTabButton = new GUIStyle(EditorStyles.toolbarButton);
        styleTabButton.fontSize             = 12;
        styleTabButton.fixedHeight          = 30;
        styleTabButton.onNormal.background  = styleTabButton.onActive.background;
        styleTabButton.onFocused.background = null;
        styleTabButton.onHover.background   = null;
        tabIndex = GUILayout.SelectionGrid(tabIndex, tabNames, 1, styleTabButton);
        GUILayout.EndVertical();
        #endregion
        #region options
        GUILayout.BeginVertical();
        EditorGUIUtility.LookLikeControls();

        GUIStyle styleArea = new GUIStyle(GUI.skin.textArea);
        scrollView = GUILayout.BeginScrollView(scrollView, styleArea);
        List <string> takeNames = getTakeNames();

        GUIStyle styleTitle = new GUIStyle(GUI.skin.label);
        styleTitle.fontSize  = 20;
        styleTitle.fontStyle = FontStyle.Bold;

        // tab title
        GUILayout.BeginHorizontal();
        GUILayout.Space(width_indent);
        GUILayout.Label(tabNames[tabIndex], styleTitle);
        GUILayout.EndHorizontal();
        GUILayout.Space(10f);

        #region general
        if (tabIndex == (int)tabType.General)
        {
            List <string> takeNamesWithNone = new List <string>(takeNames);
            takeNamesWithNone.Insert(0, "None");
            // play on start
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.Space(1f);
            GUILayout.Label("Play On Start");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (setPlayOnStartIndex(EditorGUILayout.Popup(playOnStartIndex, takeNamesWithNone.ToArray(), GUILayout.Width(200f))))
            {
                if (playOnStartIndex == 0)
                {
                    aData.playOnStart = null;
                }
                else
                {
                    aData.playOnStart = aData.getTake(takeNames[playOnStartIndex - 1]);
                }
            }
            GUILayout.EndHorizontal();
            // gizmo size
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f), GUILayout.Width(80f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Gizmo size", GUILayout.Width(80f));
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (aData.setGizmoSize(GUILayout.HorizontalSlider(aData.gizmo_size, 0f, 0.1f, GUILayout.ExpandWidth(true))))
            {
                GUIUtility.keyboardControl = 0;
                EditorUtility.SetDirty(aData);
            }
            GUILayout.BeginVertical(GUILayout.Height(26f), GUILayout.Width(75f));
            GUILayout.FlexibleSpace();
            if (aData.setGizmoSize(EditorGUILayout.FloatField(aData.gizmo_size, GUI.skin.textField, GUILayout.Width(75f))))
            {
                EditorUtility.SetDirty(aData);
            }
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
            // time instead of frame numbers
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Show time instead of frame numbers");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setTimeNumbering(GUILayout.Toggle(oData.time_numbering, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
            // scrubby zoom cursor
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Scrubby zoom cursor");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setScrubbyZoomCursor(GUILayout.Toggle(oData.scrubby_zoom_cursor, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
            // scrubby zoom slider
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Scrubby zoom slider");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setScrubbyZoomSlider(GUILayout.Toggle(oData.scrubby_zoom_slider, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
            // show warning for lost references

            /*GUILayout.BeginHorizontal();
             *      GUILayout.Space(width_indent);
             *      GUILayout.BeginVertical(GUILayout.Height(26f));
             *              GUILayout.FlexibleSpace();
             *              GUILayout.Label ("Show warning for lost references");
             *              GUILayout.FlexibleSpace();
             *      GUILayout.EndVertical();
             *      if(oData.setShowWarningForLostReferences(GUILayout.Toggle(oData.showWarningForLostReferences,""))) {
             *              // save
             *              EditorUtility.SetDirty(oData);
             *      }
             * GUILayout.EndHorizontal();*/
            // ignore minimum window size warning
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Ignore minimum window size warning");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setIgnoreMinimumSizeWarning(GUILayout.Toggle(oData.ignoreMinSize, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
            // show frames for collapsed tracks
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Show frames for collapsed tracks");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setShowFramesForCollapsedTracks(GUILayout.Toggle(oData.showFramesForCollapsedTracks, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
            // disable timeline actions
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Hide Timeline Actions (May increase editor performance)");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.setDisableTimelineActions(GUILayout.Toggle(oData.disableTimelineActions, "")))
            {
                // save
                EditorUtility.SetDirty(oData);
                AMTimeline.recalculateNumFramesToRender();
            }
            GUILayout.EndHorizontal();
            // disable timeline actions tooltip
            if (oData.disableTimelineActions)
            {
                GUI.enabled = false;
            }
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.FlexibleSpace();
            GUILayout.Label("Enable Timeline Actions tooltip");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            if (oData.disableTimelineActions)
            {
                GUILayout.Toggle(false, "");
            }
            else
            {
                if (oData.setDisableTimelineActionsTooltip(!GUILayout.Toggle(!oData.disableTimelineActionsTooltip, "")))
                {
                    // save
                    EditorUtility.SetDirty(oData);
                }
            }
            GUILayout.EndHorizontal();
            GUI.enabled = true;
            // skin
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical(GUILayout.Height(26f));
            GUILayout.Space(1f);
            GUILayout.Label("Skin");
            GUILayout.FlexibleSpace();
            GUILayout.EndVertical();
            skinIndex = EditorGUILayout.Popup(skinIndex, skin_names, GUILayout.Width(200f));
            if (oData.setSkin(skin_ids[skinIndex]))
            {
                //if(playOnStartIndex == 0) aData.playOnStart = null;
                //else aData.playOnStart = aData.getTake(takeNames[playOnStartIndex-1]);
            }
            GUILayout.EndHorizontal();
        }
        #endregion
        #region quick add
        else if (tabIndex == (int)tabType.QuickAdd)
        {
            EditorGUIUtility.LookLikeControls();
            GUILayout.Space(3f);
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.Label("Combinations");
            GUILayout.EndHorizontal();
            if (oData.quickAdd_Combos == null)
            {
                oData.quickAdd_Combos = new List <List <int> >();
            }
            for (int j = 0; j < oData.quickAdd_Combos.Count; j++)
            {
                GUILayout.Space(3f);
                GUILayout.BeginHorizontal();
                GUILayout.Space(width_indent);
                for (int i = 0; i < oData.quickAdd_Combos[j].Count; i++)
                {
                    if (oData.setQuickAddCombo(j, i, EditorGUILayout.Popup(oData.quickAdd_Combos[j][i], AMTimeline.TrackNames, GUILayout.Width(80f))))
                    {
                        oData.flatten_quickAdd_Combos();
                        EditorUtility.SetDirty(oData);
                    }
                    if (i < oData.quickAdd_Combos[j].Count - 1)
                    {
                        GUILayout.Label("+");
                    }
                }
                GUILayout.FlexibleSpace();
                if (oData.quickAdd_Combos[j].Count > 0)
                {
                    if (GUILayout.Button("-", GUILayout.Width(20f), GUILayout.Height(20f)))
                    {
                        oData.quickAdd_Combos[j].RemoveAt(oData.quickAdd_Combos[j].Count - 1);
                        if (oData.quickAdd_Combos[j].Count == 0)
                        {
                            oData.quickAdd_Combos.RemoveAt(j);
                            j--;
                        }
                        oData.flatten_quickAdd_Combos();
                        EditorUtility.SetDirty(oData);
                    }
                }
                if (GUILayout.Button("+", GUILayout.Width(20f), GUILayout.Height(20f)))
                {
                    oData.quickAdd_Combos[j].Add((int)AMTimeline.Track.Translation);
                    oData.flatten_quickAdd_Combos();
                    EditorUtility.SetDirty(oData);
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.Space(3f);
            GUILayout.BeginHorizontal();
            if (oData.quickAdd_Combos.Count <= 0)
            {
                GUILayout.Space(width_indent);
                GUILayout.Label("Click '+' to add a new combination");
            }
            GUILayout.FlexibleSpace();
            // new combo
            if (GUILayout.Button("+", GUILayout.Width(20f), GUILayout.Height(20f)))
            {
                oData.quickAdd_Combos.Add(new List <int> {
                    (int)AMTimeline.Track.Translation
                });
                oData.flatten_quickAdd_Combos();
                EditorUtility.SetDirty(oData);
            }
            GUILayout.EndHorizontal();
        }
        #endregion
        #region import / export
        else if (tabIndex == (int)tabType.ImportExport)
        {
            GUIStyle labelRight = new GUIStyle(GUI.skin.label);
            labelRight.alignment = TextAnchor.MiddleRight;
            GUILayout.Space(10f);
            GUILayout.BeginHorizontal(GUILayout.Width(300f));
            GUILayout.Space(width_indent);
            GUILayout.BeginVertical();
            GUILayout.Space(1f);
            GUILayout.Label("Take(s):", labelRight, GUILayout.Width(55f));
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            GUILayout.Space(1f);
            if (GUILayout.Button("Import", GUILayout.Width(60f)))
            {
                AMTimeline.registerUndo("Import Take(s)");
                string importTakesPath = EditorUtility.OpenFilePanel("Import Take(s)", "Assets/", "unity");
                if (importTakesPath != "")
                {
                    AMTakeImport.openAdditiveAndDeDupe(importTakesPath);
                }
            }
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            GUILayout.Space(1f);
            if (GUILayout.Button("Export:", GUILayout.Width(60f)))
            {
                if (!exportAllTakes)
                {
                    AMTakeExport.take = aData.getTake(takeNames[exportTakeIndex]);
                }
                else
                {
                    AMTakeExport.take = null;
                }
                //AMTakeExport.aData = aData;
                //EditorWindow.GetWindow (typeof (AMTakeExport)).ShowUtility();
                EditorWindow windowExport = ScriptableObject.CreateInstance <AMTakeExport>();
                windowExport.ShowUtility();
            }
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            exportAllTakes = (GUILayout.Toggle(!exportAllTakes, "") ? false : exportAllTakes);
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            GUILayout.Space(4f);
            setExportTakeIndex(EditorGUILayout.Popup(exportTakeIndex, takeNames.ToArray(), GUILayout.Width(100f)));
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            exportAllTakes = (GUILayout.Toggle(exportAllTakes, "") ? true : exportAllTakes);
            GUILayout.EndVertical();
            GUILayout.BeginVertical();
            GUILayout.Space(2f);
            GUILayout.Label("All Takes");
            GUILayout.EndVertical();

            GUILayout.EndHorizontal();
            GUILayout.Space(3f);
            GUILayout.BeginHorizontal();
            GUILayout.Space(width_indent);
            GUILayout.Label("Options:", labelRight, GUILayout.Width(55f));
            if (GUILayout.Button("Import", GUILayout.Width(60f)))
            {
                AMTimeline.registerUndo("Import Options");
                string importOptionsPath = EditorUtility.OpenFilePanel("Import Options", "Assets/Animator", "unitypackage");
                if (importOptionsPath != "")
                {
                    AssetDatabase.ImportPackage(importOptionsPath, true);
                    this.Close();
                }
            }
            if (GUILayout.Button("Export", GUILayout.Width(60f)))
            {
                AMOptionsFile.export();
            }
            GUILayout.EndHorizontal();
        }
        #endregion
        #region about
        else if (tabIndex == (int)tabType.About)
        {
            GUILayout.Space(3f);

            string message = "Animator v" + version + ", Created by Abdulla Ameen (c) 2012.\nAMTween is derived from Bob Berkebile's iTween which falls under the MIT license.\n\nPlease have a look at the documentation if you need help, or e-mail [email protected] for further assistance.";
            message += "\n\nAdditional code contributions by:\nQuick Fingers, Eric Haines";
            GUIStyle styleInfo = new GUIStyle(GUI.skin.label);
            GUILayout.BeginHorizontal();
            GUILayout.Space(5);
            styleInfo.wordWrap = true;
            GUILayout.Label(message, styleInfo);
            GUILayout.EndHorizontal();
        }
        #endregion
        GUILayout.EndScrollView();
        GUILayout.EndVertical();
        #endregion
        GUILayout.EndHorizontal();
    }