<commit_before>﻿using UnityEngine;
using UnityEditor;
using System.Collections;

namespace UMA
{
    [InitializeOnLoad]
    public class Data
    {
        //
        // Unconfigurable Data
        //

        public const string PACKAGE_NAME = "UMA";
        public const string AUTOSAVE_FOLDER = "umasaves";

        public const int WINDOW_CONFIG_PRIORITY = 1;
        public const int VIEW_PRIORITY = 101;
        public const int RESET_TRANSFORM_PRIORITY = 102;
        public const int HIDE_OBJECTS_PRIORITY = 201;
        public const int OTHERS_PRIORITY = 301;

        // Keys for the Transform Edit. Not const cause at least rotation can change.
        public static KeyCode TranslateKey = KeyCode.G;
        public static KeyCode RotateKey = KeyCode.T;
        public static KeyCode ScaleKey = KeyCode.S;

        //
        // Configurable data.
        //

        //
        // Auto Save
        //

        public static bool AutoSaveEnabled = true;
        public static float AutoSaveFrequency = 5f; // Minutes

        //
        // Hiding
        //

        public static bool HidingEnabled = true;

        //
        // Reset Transforms
        //

        public static bool ResetTransformsEnabled = true;

        //
        // Transform Editing
        //

        public static bool TransformEditingEnabled = true;
        public static bool SnappingEnabledByDefault = false;
        public static float TranslateSnapIncrement = 1;
        public static float RotateSnapIncrement = 45;
        public static float ScaleSnapIncrement = 1;
        public static bool UseRInsteadOfT = false;
        public static bool EnableMouseConfirmCancel = false;

        //
        // Camera Control
        //

        public static bool CameraControlEnabled = true;
        public static bool RotateAroundSelected = false;

        static Data()
        {
            // Loaded up, load up da settings.
            Data.LoadData();
        }

        public static void SaveData()
        {
            // TODO: I bet there's a way to do this easier with SerializeObject, explore later. If not, consider a cool solution
            //       using reflection later. This is currently a little unwieldy.
            EditorPrefs.SetBool(PACKAGE_NAME + " - AS", AutoSaveEnabled);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - AS Freq", AutoSaveFrequency);
            EditorPrefs.SetBool(PACKAGE_NAME + " - Hide", HidingEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - ResetT", ResetTransformsEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE", TransformEditingEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE Snap", SnappingEnabledByDefault);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE T Snap", TranslateSnapIncrement);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE R Snap", RotateSnapIncrement);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE S Snap", ScaleSnapIncrement);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE TiR", UseRInsteadOfT);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE Mouse", EnableMouseConfirmCancel);
            EditorPrefs.SetBool(PACKAGE_NAME + " - CC", CameraControlEnabled);

            UpdateInternalData();
        }<commit_msg>Removing config option for rotate camera around selected...Decided not to implement<commit_after>﻿using UnityEngine;
using UnityEditor;
using System.Collections;

namespace UMA
{
    [InitializeOnLoad]
    public class Data
    {
        //
        // Unconfigurable Data
        //

        public const string PACKAGE_NAME = "UMA";
        public const string AUTOSAVE_FOLDER = "umasaves";

        public const int WINDOW_CONFIG_PRIORITY = 1;
        public const int VIEW_PRIORITY = 101;
        public const int RESET_TRANSFORM_PRIORITY = 102;
        public const int HIDE_OBJECTS_PRIORITY = 201;
        public const int OTHERS_PRIORITY = 301;

        // Keys for the Transform Edit. Not const cause at least rotation can change.
        public static KeyCode TranslateKey = KeyCode.G;
        public static KeyCode RotateKey = KeyCode.T;
        public static KeyCode ScaleKey = KeyCode.S;

        //
        // Configurable data.
        //

        //
        // Auto Save
        //

        public static bool AutoSaveEnabled = true;
        public static float AutoSaveFrequency = 5f; // Minutes

        //
        // Hiding
        //

        public static bool HidingEnabled = true;

        //
        // Reset Transforms
        //

        public static bool ResetTransformsEnabled = true;

        //
        // Transform Editing
        //

        public static bool TransformEditingEnabled = true;
        public static bool SnappingEnabledByDefault = false;
        public static float TranslateSnapIncrement = 1;
        public static float RotateSnapIncrement = 45;
        public static float ScaleSnapIncrement = 1;
        public static bool UseRInsteadOfT = false;
        public static bool EnableMouseConfirmCancel = false;

        //
        // Camera Control
        //

        public static bool CameraControlEnabled = true;

        static Data()
        {
            // Loaded up, load up da settings.
            Data.LoadData();
        }

        public static void SaveData()
        {
            // TODO: I bet there's a way to do this easier with SerializeObject, explore later. If not, consider a cool solution
            //       using reflection later. This is currently a little unwieldy.
            EditorPrefs.SetBool(PACKAGE_NAME + " - AS", AutoSaveEnabled);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - AS Freq", AutoSaveFrequency);
            EditorPrefs.SetBool(PACKAGE_NAME + " - Hide", HidingEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - ResetT", ResetTransformsEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE", TransformEditingEnabled);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE Snap", SnappingEnabledByDefault);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE T Snap", TranslateSnapIncrement);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE R Snap", RotateSnapIncrement);
            EditorPrefs.SetFloat(PACKAGE_NAME + " - TE S Snap", ScaleSnapIncrement);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE TiR", UseRInsteadOfT);
            EditorPrefs.SetBool(PACKAGE_NAME + " - TE Mouse", EnableMouseConfirmCancel);
            EditorPrefs.SetBool(PACKAGE_NAME + " - CC", CameraControlEnabled);

            UpdateInternalData();
        }
{'fraction_non_alphanumeric': 0.07718172092312395, 'fraction_numerical': 0.005502063273727648, 'mean_word_length': 2.0608044901777363, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7361393', 'n_tokens_mistral': 1825, 'n_tokens_neox': 1712, 'n_words': 491}