Exemple #1
0
        public static int GetPresetIndex <T>(string name) where T : PumkinPreset
        {
            int i = -1;

            if (typeof(T) == typeof(PumkinsCameraPreset))
            {
                i = CameraPresets.FindIndex(o => o.name.ToLower() == name.ToLower());
            }
            else if (typeof(T) == typeof(PumkinsPosePreset))
            {
                i = PosePresets.FindIndex(o => o.name.ToLower() == name.ToLower());
            }
            else if (typeof(T) == typeof(PumkinsBlendshapePreset))
            {
                i = BlendshapePresets.FindIndex(o => o.name.ToLower() == name.ToLower());
            }

            return(i);
        }