コード例 #1
0
    public static void DeleteKeyframe(int index, SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams)
    {
        List <Keyframe> tmpKeyframeList = animationParams.substanceCurve.keys.ToList();

        animationParams.keyFrameTimes.RemoveAt(index);
        substanceMaterialParams.MaterialVariableKeyframeList.RemoveAt(index);
        substanceMaterialParams.MaterialVariableKeyframeDictionaryList.RemoveAt(index);
        animationParams.keyframeSum = 0;
        for (int i = substanceMaterialParams.MaterialVariableKeyframeList.Count(); i >= 0; i--)
        {
            animationParams.substanceCurve.RemoveKey(i);
        }
        for (int i = 0; i <= substanceMaterialParams.MaterialVariableKeyframeList.Count() - 1; i++)
        {
            animationParams.substanceCurve.AddKey(new Keyframe(animationParams.keyframeSum, animationParams.keyframeSum, tmpKeyframeList[i].inTangent, tmpKeyframeList[i].outTangent));
            animationParams.keyframeSum += animationParams.keyFrameTimes[i];
        }
        ;
        animationParams.currentAnimationTime    = 0;
        animationParams.currentKeyframeIndex    = 0;
        animationParams.animationTimeRestartEnd = 0;
        animationParams.keyframeSum             = 0;
        if (animationParams.keyFrames > 0)
        {
            animationParams.keyFrames--;
        }
        animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
        SubstanceTweenAnimationUtility.CacheAnimatedProceduralVariables(substanceMaterialParams, animationParams);
        SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
    }
コード例 #2
0
 public static void CreateKeyframe(SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams, SubstanceToolParams substanceToolParams)
 {
     //UnityEditor.Undo.RegisterCompleteObjectUndo(new UnityEngine.Object[] { substanceMaterialParams.substance, substanceToolParams.currentSelection }, "Create Keyframe " + substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Count().ToString());
     if (animationParams.keyFrameTimes.Count == 0)
     {
         substanceToolParams.DebugStrings.Add("Created Keyframe 1:");
         substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Add(new MaterialVariableDictionaryHolder());
         substanceMaterialParams.MaterialVariableKeyframeList.Add(new MaterialVariableListHolder());
         SubstanceTweenStorageUtility.AddProceduralVariablesToList(substanceMaterialParams.MaterialVariableKeyframeList[0], substanceMaterialParams, animationParams, substanceToolParams);
         SubstanceTweenStorageUtility.AddProceduralVariablesToDictionary(substanceMaterialParams.MaterialVariableKeyframeDictionaryList[0], substanceMaterialParams, animationParams, substanceToolParams);
         animationParams.keyFrames++;
         animationParams.keyFrameTimes.Add(substanceMaterialParams.MaterialVariableKeyframeList[0].animationTime);
         animationParams.substanceCurve.AddKey(new Keyframe(substanceMaterialParams.MaterialVariableKeyframeList[0].animationTime, substanceMaterialParams.MaterialVariableKeyframeList[0].animationTime));
         UnityEditor.AnimationUtility.SetKeyLeftTangentMode(animationParams.substanceCurve, 0, UnityEditor.AnimationUtility.TangentMode.Linear);
         UnityEditor.AnimationUtility.SetKeyRightTangentMode(animationParams.substanceCurve, 0, UnityEditor.AnimationUtility.TangentMode.Linear);
     }
     else if (animationParams.keyFrameTimes.Count > 0)
     {
         for (int i = 0; i <= animationParams.keyFrameTimes.Count - 1; i++)
         {     // Goes through each key frame and checks if the keyframe that you are trying to create has the same number of parameters as the rest and if they all save Output parameters or not.
             if (substanceMaterialParams.saveOutputParameters && substanceMaterialParams.MaterialVariableKeyframeList[i].hasParametersWithoutRange == false)
             { //Subsance designer can export special properties like '$randomSeed' that can be saved. this checks if you selected to save those objects and turned it off later
                 UnityEditor.EditorUtility.DisplayDialog("Error", "Could not save keyframe because you are saving Parameters without a range however keyframe " + (i + 1) + " does " +
                                                         "not save these variables. To fix this uncheck \"Save Output Parameters\" on this frame and try again or check \"Save Output Parameters\" then select and overWrite on every other frame. ", "OK");
                 return;
             }
             if (!substanceMaterialParams.saveOutputParameters && substanceMaterialParams.MaterialVariableKeyframeList[i].hasParametersWithoutRange == true)
             {
                 UnityEditor.EditorUtility.DisplayDialog("Error", "Could not save keyframe because you are not saving Parameters without a range however keyframe " + i + " does " +
                                                         "save these variables. To fix this check \"Save Output Parameters\" on this frame and try again or uncheck \"Save Output Parameters\" then select and overWrite on every other frame. ", "OK");
                 return;
             }
         }
         substanceMaterialParams.MaterialVariableKeyframeList.Add(new MaterialVariableListHolder());
         substanceToolParams.DebugStrings.Add("Created KeyFrame: " + substanceMaterialParams.MaterialVariableKeyframeList.Count);
         substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Add(new MaterialVariableDictionaryHolder());
         SubstanceTweenStorageUtility.AddProceduralVariablesToList(substanceMaterialParams.MaterialVariableKeyframeList[animationParams.keyFrames], substanceMaterialParams, animationParams, substanceToolParams);
         SubstanceTweenStorageUtility.AddProceduralVariablesToDictionary(substanceMaterialParams.MaterialVariableKeyframeDictionaryList[animationParams.keyFrames], substanceMaterialParams, animationParams, substanceToolParams);
         animationParams.keyFrameTimes.Add(substanceMaterialParams.MaterialVariableKeyframeList[animationParams.keyFrames].animationTime);
         animationParams.keyframeSum = 0;
         for (int i = 0; i < substanceMaterialParams.MaterialVariableKeyframeList.Count() - 1; i++)
         {
             animationParams.keyframeSum += substanceMaterialParams.MaterialVariableKeyframeList[i].animationTime;
         }
         animationParams.substanceCurve.AddKey(new Keyframe(animationParams.keyframeSum, animationParams.keyframeSum));
         if (animationParams.keyFrames > 0)
         {
             UnityEditor.AnimationUtility.SetKeyLeftTangentMode(animationParams.substanceCurve, animationParams.keyFrames, UnityEditor.AnimationUtility.TangentMode.Linear);
         }
         UnityEditor.AnimationUtility.SetKeyRightTangentMode(animationParams.substanceCurve, animationParams.keyFrames, UnityEditor.AnimationUtility.TangentMode.Linear);
         animationParams.keyFrames++;
     }
     animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
     substanceToolParams.lastAction            = MethodBase.GetCurrentMethod().Name.ToString();
     SubstanceTweenAnimationUtility.CacheAnimatedProceduralVariables(substanceMaterialParams, animationParams);
     SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
 }
コード例 #3
0
    public static void InsertKeyframe(int index, SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams, SubstanceToolParams substanceToolParams)
    {
        if (animationParams.keyFrameTimes.Count > 0)
        {
            for (int i = 0; i <= animationParams.keyFrameTimes.Count - 1; i++)
            {     // Goes through each key frame and checks if the keyframe that you are trying to create has the same number of parameters as the rest and if they all save Output parameters or not.
                if (substanceMaterialParams.saveOutputParameters && substanceMaterialParams.MaterialVariableKeyframeList[i].hasParametersWithoutRange == false)
                { //Substance designer can export special properties like '$randomSeed' that can be saved. this checks if you selected to save those objects and turned it off later
                    UnityEditor.EditorUtility.DisplayDialog("Error", "Could not save keyframe because you are saving Parameters without a range however keyframe " + (i + 1) + " does " +
                                                            "not save these variables. To fix this uncheck \"Save Output Parameters\" on this frame and try again or check \"Save Output Parameters\" then select and overWrite on every other frame. ", "OK");
                    return;
                }
                if (!substanceMaterialParams.saveOutputParameters && substanceMaterialParams.MaterialVariableKeyframeList[i].hasParametersWithoutRange == true)
                {
                    UnityEditor.EditorUtility.DisplayDialog("Error", "Could not save keyframe because you are not saving Parameters without a range however keyframe " + i + " does " +
                                                            "save these variables. To fix this check \"Save Output Parameters\" on this frame and try again or uncheck \"Save Output Parameters\" then select and overWrite on every other frame. ", "OK");
                    return;
                }
            }
            substanceMaterialParams.MaterialVariableKeyframeList.Insert(index, new MaterialVariableListHolder());
            substanceToolParams.DebugStrings.Add("Created KeyFrame: " + substanceMaterialParams.MaterialVariableKeyframeList.Count);
            substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Insert(index, new MaterialVariableDictionaryHolder());
            SubstanceTweenStorageUtility.AddProceduralVariablesToList(substanceMaterialParams.MaterialVariableKeyframeList[index], substanceMaterialParams, animationParams, substanceToolParams);
            SubstanceTweenStorageUtility.AddProceduralVariablesToDictionary(substanceMaterialParams.MaterialVariableKeyframeDictionaryList[index], substanceMaterialParams, animationParams, substanceToolParams);
            animationParams.keyframeSum = 0;
            for (int i = 0; i < index; i++)
            {
                animationParams.keyframeSum += substanceMaterialParams.MaterialVariableKeyframeList[i].animationTime;
            }
            if (index >= 1)
            {
                substanceMaterialParams.MaterialVariableKeyframeList[index - 1].animationTime = animationParams.currentAnimationTime;
                animationParams.keyFrameTimes[index - 1] = animationParams.currentAnimationTime;
            }
            else
            {
                substanceMaterialParams.MaterialVariableKeyframeList[index - 1].animationTime = animationParams.currentAnimationTime;
                animationParams.keyFrameTimes[index - 1] = animationParams.currentAnimationTime;
            }
            substanceMaterialParams.MaterialVariableKeyframeList[index].animationTime = animationParams.keyframeSum - animationParams.animationTimeRestartEnd;
            animationParams.keyFrameTimes.Insert(index, animationParams.substanceCurve.keys[index + 1].time - animationParams.substanceCurve.keys[index].time); // note: change animation time if inserting keyframe

            animationParams.keyFrames++;
        }
        animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
        SubstanceTweenAnimationUtility.CacheAnimatedProceduralVariables(substanceMaterialParams, animationParams);
        SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
    }
コード例 #4
0
 public static void  CheckForAddKeyFromCurveEditor(SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams, SubstanceToolParams substanceToolParams, SubstanceFlickerParams flickerValues)
 {
     for (int i = 0; i <= animationParams.substanceCurveBackup.keys.Count() - 1; i++)
     {
         if (i <= animationParams.substanceCurve.keys.Count() - 1 && animationParams.substanceCurve.keys[i].time != animationParams.substanceCurveBackup.keys[i].time) // find keyframe that has just been created or deleted in the curve editor
         {
             if (animationParams.substanceCurve.keys.Count() > animationParams.substanceCurveBackup.keys.Count())
             {
                 animationParams.substanceCurve.MoveKey(i, new Keyframe(animationParams.substanceCurve.keys[i].time, animationParams.substanceCurve.keys[i].time)); // lerp does not work correctly if the keyframe value is different than the time. i cant edit the key so i delete then add a new one
                 float tempKeyframeTime = animationParams.substanceCurve.keys[i].time;
                 SubstanceTweenSetParameterUtility.SetProceduralMaterialBasedOnAnimationTime(ref tempKeyframeTime, substanceMaterialParams, animationParams, substanceToolParams, flickerValues);
                 SubstanceTweenKeyframeUtility.InsertKeyframe(i, substanceMaterialParams, animationParams, substanceToolParams);
                 SubstanceTweenKeyframeUtility.SelectKeyframe(i, substanceMaterialParams, animationParams, substanceToolParams);
                 animationParams.currentAnimationTime      = 0;
                 animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
                 SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
                 return;
             }
         }
     }
 }
コード例 #5
0
    public static void CheckForRemoveOrEditFromCurveEditor(SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams, SubstanceToolParams substanceToolParams, SubstanceFlickerParams flickerValues)
    {
        bool         inEditKeysMode                     = false;
        int          keyframesModifiedSoFar             = 0;                                                                                               //number of keyframes deleted edited so far
        int          curvePointsCountDifference         = animationParams.substanceCurveBackup.keys.Count() - animationParams.substanceCurve.keys.Count(); // difference between number of points before the change compared to the number of points after the change
        List <float> BackupKeyframePointTimes           = new List <float>();                                                                              // points on curve before change
        List <float> CurrentKeyframePointTimes          = new List <float>();                                                                              // points on curve after change
        Keyframe     firstEditedKeyframeBeforeEdit      = new Keyframe(-1, -1);                                                                            //the first keyframe in the list that has been edited ore deleted
        int          firstEditedKeyframeIndexBeforeEdit = -1;                                                                                              // index of the first edited keyframe

        if (animationParams.substanceCurve.keys[0].time != 0)
        {
            animationParams.substanceCurve.keys[0].time = 0;
        }
        for (int i = 0; i <= animationParams.substanceCurveBackup.keys.Count() - 1; i++)
        {
            BackupKeyframePointTimes.Add(animationParams.substanceCurveBackup.keys[i].time);
        }
        for (int i = 0; i <= animationParams.substanceCurve.keys.Count() - 1; i++)
        {
            CurrentKeyframePointTimes.Add(animationParams.substanceCurve.keys[i].time);
        }

        for (int i = 0; i <= BackupKeyframePointTimes.Count() - 2; i++)
        {
            if (!CurrentKeyframePointTimes.Contains(BackupKeyframePointTimes[i]))
            { // find index of the first key that has ben edited using context menu
                firstEditedKeyframeBeforeEdit = animationParams.substanceCurveBackup.keys[i];
                float tempKeyframeTime = firstEditedKeyframeBeforeEdit.time;
                firstEditedKeyframeIndexBeforeEdit = i;
                SubstanceTweenSetParameterUtility.SetProceduralMaterialBasedOnAnimationTime(ref tempKeyframeTime, substanceMaterialParams, animationParams, substanceToolParams, flickerValues);
                break;
            }
        }

        for (int i = 0; i <= CurrentKeyframePointTimes.Count() - 2; i++)
        {
            if (!BackupKeyframePointTimes.Contains(CurrentKeyframePointTimes[i]))
            {// if  i use the context menu to edit multiple keyframes to a value that is not already on the graph i can find that new keyframe here.
             // I can tell when i have EDITED a keyframe to a new value because when deleting keyframes, every new point's time should also exist in the backup
                inEditKeysMode = true;
                float tempKeyframeTime = firstEditedKeyframeBeforeEdit.time;
                SubstanceTweenSetParameterUtility.SetProceduralMaterialBasedOnAnimationTime(ref tempKeyframeTime, substanceMaterialParams, animationParams, substanceToolParams, flickerValues); // find/set material based on first edited keyframe
                if (firstEditedKeyframeIndexBeforeEdit != -1)                                                                                                                                    // if multiple keyframes has been edited using context menu
                {
                    SubstanceTweenKeyframeUtility.OverWriteKeyframe(firstEditedKeyframeIndexBeforeEdit, substanceMaterialParams, animationParams, substanceToolParams);                          // overwrite new keyframe with material of the first edited keyframe
                }
            }
        }

        for (int i = BackupKeyframePointTimes.Count() - 1; i > 0; i--)            // Go through every key in the backup list(Before the keys got deleted)
        {
            if (!CurrentKeyframePointTimes.Contains(BackupKeyframePointTimes[i])) // if the current list of curve points does not contain this value(it was deleted in the curve editor)
            {                                                                     //Find the index of the value and delete any information that has not already been deleted in the curve editor
               // get the index of the deleted point and delete the Dictionary/List associated with that index
                keyframesModifiedSoFar++;
                animationParams.keyFrameTimes.RemoveAt(BackupKeyframePointTimes.IndexOf(BackupKeyframePointTimes[i]));
                substanceMaterialParams.MaterialVariableKeyframeList.RemoveAt(BackupKeyframePointTimes.IndexOf(BackupKeyframePointTimes[i]));
                substanceMaterialParams.MaterialVariableKeyframeDictionaryList.RemoveAt(BackupKeyframePointTimes.IndexOf(BackupKeyframePointTimes[i]));
                if (animationParams.keyFrames > 0)
                {
                    animationParams.keyFrames--;
                }
            }
            if (inEditKeysMode && i == 1 && keyframesModifiedSoFar > 0)
            { // if i edited multiple keyframes at the same time using the context menu I insert a keyframe when i reach the end of the for loop
                SubstanceTweenKeyframeUtility.InsertKeyframe(i, substanceMaterialParams, animationParams, substanceToolParams);
            }
        }
        for (int i = 0; i <= animationParams.substanceCurve.keys.Count() - 2; i++)
        {                                                                                                                                     // rebuild/refresh animation times
            animationParams.keyFrameTimes[i] = animationParams.substanceCurve.keys[i + 1].time - animationParams.substanceCurve.keys[i].time; // this keyframe time = (next keyframe time - This keyframe time)
            substanceMaterialParams.MaterialVariableKeyframeList[i].animationTime = animationParams.substanceCurve.keys[i + 1].time - animationParams.substanceCurve.keys[i].time;
        }

        if (curvePointsCountDifference != keyframesModifiedSoFar)
        { // Because curvePoint EditDifference != keyframes Edited/changed, I know that keyframes have been changed with 'Edit Keys..' and not 'Delete'
          // when editing multipule keyframes to a new singular time that is not already on the list,
          // there should always be more edited keyframes then the difference between current curve points and backup curve points.
            if (animationParams.substanceCurve.keys[animationParams.substanceCurve.keys.Count() - 1].time > animationParams.substanceCurveBackup.keys[animationParams.substanceCurveBackup.keys.Count() - 1].time)
            {// Edited multiple keyframes to a new time that is more than the length of the backup curve
                SubstanceTweenKeyframeUtility.CreateKeyframe(substanceMaterialParams, animationParams, substanceToolParams);
            }
        }
        animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
        SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
        inEditKeysMode = false;
    }
コード例 #6
0
    } //Writes all keyframes to JSON files

    public static void ReadAllJSON(SubstanceMaterialParams substanceMaterialParams, SubstanceAnimationParams animationParams, SubstanceToolParams substanceToolParams) // Read JSON files and create keyframes from them.
    {
        string JsonReadFolderPath = EditorUtility.OpenFolderPanel("Load JSON files from folder", "", ""); //Creates 'Open Folder' Dialog

        if (JsonReadFolderPath.Length != 0)
        {
            string[] JsonReadFiles = Directory.GetFiles(JsonReadFolderPath);//array of selected xml file paths
            if (JsonReadFiles.Count() > 0)
            {
                animationParams.keyFrames = animationParams.keyFrameTimes.Count();
                foreach (string jsonReadFile in JsonReadFiles) //for each xml file path in the list.
                {
                    if (jsonReadFile.EndsWith(".json"))
                    {
                        string dataAsJson = File.ReadAllText(jsonReadFile);
                        var    stream     = new FileStream(jsonReadFile, FileMode.Open);                                                                                // defines how to use the file at the selected path
                        MaterialVariableListHolder jsonContainer = JsonUtility.FromJson <MaterialVariableListHolder>(dataAsJson);
                        SubstanceTweenSetParameterUtility.SetProceduralVariablesFromList(jsonContainer, substanceMaterialParams, animationParams, substanceToolParams); //Sets current substance values from list
                        substanceMaterialParams.MainTexOffset = jsonContainer.MainTex;
                        Color jsonEmissionColor = new Color(0, 0, 0, 0);
                        jsonEmissionColor = jsonContainer.emissionColor;
                        if (substanceMaterialParams.rend.sharedMaterial.HasProperty("_EmissionColor"))
                        {
                            substanceMaterialParams.emissionInput = jsonEmissionColor;
                            if (substanceToolParams.selectedPrefabScript)
                            {
                                substanceToolParams.selectedPrefabScript.emissionInput = substanceMaterialParams.emissionInput;
                            }
                            substanceMaterialParams.rend.sharedMaterial.SetColor("_EmissionColor", jsonEmissionColor);
                        }
                        stream.Close();                               //Close Xml reader
                        substanceMaterialParams.substance.RebuildTexturesImmediately();
                        if (animationParams.keyFrameTimes.Count == 0) // Create keyframe from list containing XML variables
                        {
                            if (animationParams.substanceCurve.keys.Count() > 0)
                            {
                                animationParams.substanceCurve.RemoveKey(0);
                                animationParams.substanceCurve.AddKey(0, 0);
                            }
                            substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Add(new MaterialVariableDictionaryHolder());
                            substanceMaterialParams.MaterialVariableKeyframeList.Add(new MaterialVariableListHolder());
                            substanceMaterialParams.MaterialVariableKeyframeList[0] = jsonContainer;
                            animationParams.keyFrames++;
                            animationParams.keyFrameTimes.Add(substanceMaterialParams.MaterialVariableKeyframeList[0].animationTime);
                            AnimationUtility.SetKeyBroken(animationParams.substanceCurve, 0, true);
                            AnimationUtility.SetKeyLeftTangentMode(animationParams.substanceCurve, 0, AnimationUtility.TangentMode.Linear);
                            AnimationUtility.SetKeyRightTangentMode(animationParams.substanceCurve, 0, AnimationUtility.TangentMode.Linear);
                        }
                        else if (animationParams.keyFrameTimes.Count > 0)
                        {
                            substanceMaterialParams.MaterialVariableKeyframeList.Add(new MaterialVariableListHolder());
                            substanceMaterialParams.MaterialVariableKeyframeList[animationParams.keyFrames] = jsonContainer;
                            substanceMaterialParams.MaterialVariableKeyframeDictionaryList.Add(new MaterialVariableDictionaryHolder());
                            substanceMaterialParams.MaterialVariableKeyframeDictionaryList[animationParams.keyFrames] = new MaterialVariableDictionaryHolder();
                            animationParams.keyFrameTimes.Add(jsonContainer.animationTime);
                            animationParams.keyframeSum = 0;
                            for (int i = 0; i < substanceMaterialParams.MaterialVariableKeyframeList.Count() - 1; i++)  //  -1 to count here 6/10/17
                            {
                                animationParams.keyframeSum += substanceMaterialParams.MaterialVariableKeyframeList[i].animationTime;
                            }
                            if (jsonContainer.AnimationCurveKeyframeList.Count() >= 1)
                            {
                                animationParams.substanceCurve.AddKey(new Keyframe(animationParams.keyframeSum, animationParams.keyframeSum, jsonContainer.AnimationCurveKeyframeList[0].inTangent, jsonContainer.AnimationCurveKeyframeList[0].outTangent));
                            }
                            else
                            {
                                animationParams.substanceCurve.AddKey(new Keyframe(animationParams.keyframeSum, animationParams.keyframeSum));
                            }
                            if (animationParams.keyFrames >= 1)
                            {
                                AnimationUtility.SetKeyBroken(animationParams.substanceCurve, animationParams.keyFrames, true);
                            }
                            animationParams.keyFrames++;
                        }
                    }
                    substanceToolParams.DebugStrings.Add("Read keyframe from: " + jsonReadFile);
                }
                substanceToolParams.DebugStrings.Add(animationParams.keyFrames - 1 + " Keyframes created from XML files ");
                animationParams.substanceCurveBackup.keys = animationParams.substanceCurve.keys;
                substanceToolParams.lastAction            = MethodBase.GetCurrentMethod().Name.ToString();
            }
            else
            {
                EditorUtility.DisplayDialog("Empty Folder", "No Files were found in the selected folder", "Ok");
            }
            SubstanceTweenAnimationUtility.CacheAnimatedProceduralVariables(substanceMaterialParams, animationParams);
            SubstanceTweenAnimationUtility.CalculateAnimationLength(substanceMaterialParams, animationParams);
        }
    }