コード例 #1
0
    public static void Init()
    {
        var wnd = (DaeExporterEditor)GetWindow(typeof(DaeExporterEditor));

        EUtil.SetEditorWindowTitle(wnd, "DAE Exporter");

        // auto-init
        wnd._AutoInit();
    }
コード例 #2
0
        public static void OpenWindow()
        {
            var wnd = GetWindow(typeof(AnimatorDebugger)) as AnimatorDebugger;

            EUtil.SetEditorWindowTitle(wnd, "AnimDebugger");
            wnd.autoRepaintOnSceneChange = true;
            wnd.OnSelectionChange();
            wnd.minSize = new Vector2(300f, 300f);
        }
コード例 #3
0
        public static void OpenWindow()
        {
            if (ms_Instance == null)
            {
                var inst = ms_Instance = (AnimCompressEditorWindow)GetWindow(typeof(AnimCompressEditorWindow));
                EditorApplication.playmodeStateChanged += inst.OnPlayModeChanged;

                EUtil.SetEditorWindowTitle(inst, "Compressor");
                inst.minSize = new Vector2(300, 150);
                inst.Show();
            }
        }
コード例 #4
0
        public static void OpenWindow()
        {
            var wnd = EditorWindow.GetWindow <BipedConstraintSetupWindow>();

            EUtil.SetEditorWindowTitle(wnd, "SetupConstraint");
            wnd._bones.Resize((int)Bones.END);

            var tr = Selection.activeTransform;

            if (tr != null)
            {
                var ator = tr.GetComponentInParent <Animator>();
                if (ator != null)
                {
                    wnd._bones[(int)Bones.Root] = ator.transform;
                    wnd._ClearBonesRefExceptRoot();
                    wnd._TryFindBones();
                }
            }
        }
コード例 #5
0
        public static void OpenWindow()
        {
            var wnd = EditorWindow.GetWindow(typeof(AnimationBaker));

            EUtil.SetEditorWindowTitle(wnd, "AnimationBaker");
        }
コード例 #6
0
        public static void OpenWindow()
        {
            var wnd = GetWindow(typeof(EDataInspector));

            EUtil.SetEditorWindowTitle(wnd, "EData");
        }
コード例 #7
0
        public override void OnInspectorGUI()
        {
            ConstraintStack cstack = (ConstraintStack)target;

            serializedObject.Update();

            GUILayout.Space(3f);

            // constraints
            for (int i = 0; i < cstack.constraintCount; ++i)
            {
                BaseConstraint c = cstack.Get(i);
                if (!c)
                { //remove broken reference
                    cstack.RemoveAt(i);
                    --i;
                    continue;
                }

                // draw constraint & buttons
                EditorGUILayout.BeginHorizontal();
                {
                    Color btnColor = c.IsActiveConstraint ? Color.white : Color.red;
                    EUtil.PushBackgroundColor(btnColor);
                    var  content = new GUIContent(c.GetType().Name, "Click to fold other components");
                    Rect rc      = GUILayoutUtility.GetRect(content, EditorStyles.toolbarButton);
                    if (GUI.Button(rc, content, EditorStyles.toolbarButton))
                    {
                        _FoldComponents(cstack);
                        var wnd = EditorEditorWindow.OpenWindowWithActivatorRect(c, rc);
                        EUtil.SetEditorWindowTitle(wnd, content.text);
                    }
                    EditorGUI.ProgressBar(rc, c.Influence, content.text);
                    EUtil.PopBackgroundColor();

                    if (GUILayout.Button(new GUIContent(c.IsActiveConstraint ? EConUtil.activeBtn : EConUtil.inactiveBtn, "Toggle constraint active state"), EditorStyles.toolbarButton, GUILayout.Height(20), GUILayout.Width(20)))
                    {
                        c.IsActiveConstraint = !c.IsActiveConstraint;
                        EditorUtility.SetDirty(cstack);
                    }

                    EUtil.PushGUIEnable(i != 0);
                    if (GUILayout.Button(new GUIContent(EConUtil.upBtn, "move up"), EditorStyles.toolbarButton, GUILayout.Height(20), GUILayout.Width(20)))
                    {
                        cstack.Swap(i, i - 1);
                        EditorUtility.SetDirty(cstack);
                        //ComponentUtility.MoveComponentUp(c);
                    }
                    EUtil.PopGUIEnable();

                    EUtil.PushGUIEnable(i != cstack.constraintCount - 1);
                    if (GUILayout.Button(new GUIContent(EConUtil.downBtn, "move down"), EditorStyles.toolbarButton, GUILayout.Height(20), GUILayout.Width(20)))
                    {
                        cstack.Swap(i, i + 1);
                        EditorUtility.SetDirty(cstack);
                        //ComponentUtility.MoveComponentDown(c);
                    }
                    EUtil.PopGUIEnable();

                    if (GUILayout.Button(new GUIContent(EConUtil.deleteBtn, "delete the constraint from stack"), EditorStyles.toolbarButton, GUILayout.Height(20), GUILayout.Width(20)))
                    {
                        MUndo.RecordObject(cstack, "Remove Constraint");
                        cstack.RemoveAt(i);
                        EditorUtility.SetDirty(cstack);
                        _FoldComponents(cstack);
                        EditorGUIUtility.ExitGUI();
                    }
                }
                EditorGUILayout.EndHorizontal();
            } //for(int i=0; i<cstack.constraintCount; ++i)

            GUILayout.Space(2f);

            EditorGUI.BeginChangeCheck();
            int newOrder = EditorGUILayout.IntField(new GUIContent("Exec Order", "used to help decide evaluation order, the smaller the earlier"), cstack.ExecOrder);

            if (EditorGUI.EndChangeCheck())
            {
                cstack.ExecOrder = newOrder;
            }

            { //new constraint window
                EUtil.DrawSplitter(new Color(1, 1, 1, 0.3f));

                EditorGUILayout.BeginHorizontal();
                GUILayout.Space(15f);
                var  content = new GUIContent("Add Constraint", "Add new constraint into current stack");
                Rect btnRc   = GUILayoutUtility.GetRect(content, GUI.skin.button);
                if (GUI.Button(btnRc, content))
                {
                    var  wnd   = ScriptableObject.CreateInstance <ConstraintsWindow>();
                    Rect wndRc = EUtil.GetRectByActivatorRect(wnd.position, btnRc);
                    wnd.position = wndRc;
                    wnd.SetConstraintStack(cstack);
                    wnd.ShowPopup();
                    wnd.Focus();
                }
                GUILayout.Space(15f);
                EditorGUILayout.EndHorizontal();
            }


            if (Pref.ShowInitInfos)
            {
                EditorGUILayout.PropertyField(m_spInitInfo, true);
            }



            serializedObject.ApplyModifiedProperties();
        }
コード例 #8
0
 public static void OpenWindow()
 {
     ms_Instance = (AnimCurvePropEditor)GetWindow(typeof(AnimCurvePropEditor));
     EUtil.SetEditorWindowTitle(ms_Instance, "AnimCurvePropEditor");
 }
コード例 #9
0
//#endif
        public static void OpenWindow()
        {
            ms_Instance = (AnimMirrorEditorWindow)GetWindow(typeof(AnimMirrorEditorWindow));
            EUtil.SetEditorWindowTitle(ms_Instance, "Animation Mirror Tool");
        }