private void DrawOptions()
        {
            GUIStyle bigStyle = new GUIStyle(GUI.skin.toggle);

            bigStyle.fontSize = 14;

            GUILayout.BeginHorizontal();
            GUILayout.FlexibleSpace();

            GUILayout.BeginVertical();
            GUILayout.Space(12);

            Daz3DDTUImporter.AutoImportDTUChanges          = GUILayout.Toggle(Daz3DDTUImporter.AutoImportDTUChanges, "Automatically import when DTU changes are detected", bigStyle);
            Daz3DDTUImporter.GenerateUnityPrefab           = GUILayout.Toggle(Daz3DDTUImporter.GenerateUnityPrefab, "Generate a Unity Prefab based on FBX and DTU", bigStyle);
            Daz3DDTUImporter.ReplaceSceneInstances         = GUILayout.Toggle(Daz3DDTUImporter.ReplaceSceneInstances, "Replace instances of Unity Prefab in active scene(s)", bigStyle);
            Daz3DDTUImporter.AutomateMecanimAvatarMappings = GUILayout.Toggle(Daz3DDTUImporter.AutomateMecanimAvatarMappings, "Automatically setup the Mecanim Avatar", bigStyle);
            Daz3DDTUImporter.ReplaceMaterials = GUILayout.Toggle(Daz3DDTUImporter.ReplaceMaterials, "Replace FBX materials with high quality Daz-shader materials", bigStyle);

            GUILayout.Space(12);
            if (GUILayout.Button("Reset All", GUILayout.Width(100)))
            {
                Daz3DDTUImporter.ResetOptions();
            }

            GUILayout.EndVertical();

            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();
        }
 void OnSelectionChange()
 {
     if (Daz3DDTUImporter.ValidateDTUSelected())
     {
         CurrentToolbarMode = ToolbarMode.Commands;
     }
     _needsRepaint = true;
 }
        private void DrawCommands()
        {
            GUIStyle bigStyle = new GUIStyle(GUI.skin.button);

            bigStyle.fontSize         = 14;
            bigStyle.normal.textColor = ThemedColor;
            bigStyle.padding          = new RectOffset(24, 24, 12, 12);
            bigStyle.margin           = new RectOffset(12, 12, 12, 12);

            if (CommandButton("Clear History", bigStyle))
            {
                Daz3DDTUImporter.EmptyEventQueue();
            }

            if (Daz3DDTUImporter.ValidateDTUSelected())
            {
                var dtu = Selection.activeObject;

                //the button
                if (CommandButton("Create Unity Prefab from '" + dtu.name + ".dtu'", bigStyle))
                {
                    var dtuPath = AssetDatabase.GetAssetPath(dtu);
                    var fbxPath = dtuPath.Replace(".dtu", ".fbx");
                    Daz3DDTUImporter.Import(dtuPath, fbxPath);
                }

                if (CommandButton("Extract Materials from '" + dtu.name + ".dtu'", bigStyle))
                {
                    DTUConverter.MenuItemConvert();
                }
            }
            else
            {
                GUILayout.Space(12);
                GUILayout.Label("Select a DTU file in project window for more commands...");
            }
        }