Search Unity

Bug Changing import settings on animation will corrupt the fbx.

Discussion in 'Editor & General Support' started by TheVirtualMunk, Aug 27, 2020.

  1. TheVirtualMunk

    TheVirtualMunk

    Joined:
    Sep 6, 2019
    Posts:
    150
    As title says.

    I think the issue might be with import presets or meta files, or something in the editor memory being applied. It's like the editor is putting in a clip from another fbx.

    This was my workflow:
    1. Imported a bunch of animations, and applied a preset to all.
    2. Changed a bunch of clips to have baked root motion.
    3. Continued work on the project over a few days (with a couple git commits)
    4. Now wanted to add Loop Time and Loop Pose to some of the clips.
      This is what the video attached shows.
    5. This screws with the fbx file - showing another clip being imported >>>which doesn't even exist in the fbx file<<<.
    6. Error thrown - shown in video.
    7. I try to save it through git discard.
    8. The correct clip is now imported, but all the import settings on the animation tab is reset as well.
      But the "Rig" tab still contains my global settings i set from the import preset.
    9. Now when i try to set both "root bake into pose" and "loop time" + "loop pose", it works correctly.
    But of course I'm worried its gonna break again at some point, hence I'm writing this for a resolution.

    Unity 2019.4.8f1

    Here's the video;
    Import settings fucking up animation.gif

    Import settings fucking up animation.gif

    The only way for me to restore the actual clip (named "A_IF.2.POS" ) from the import is through VCS.

    Also, while we're at it, currently having more than 3 (of our humanoid fbx animations) files in a folder completely tanks performance in the editor making work impossible - I have to split them into subfolders...


    Errors:
    Code (CSharp):
    1. MissingReferenceException: The object of type 'AnimationClip' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. UnityEditor.AnimationClipEditor.InitController () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    4. UnityEditor.AnimationClipEditor.OnInteractivePreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    5. UnityEditor.ModelImporterClipEditor.OnInteractivePreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    6. UnityEditor.AssetImporterTabbedEditor.OnInteractivePreviewGUI (UnityEngine.Rect r, UnityEngine.GUIStyle background) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    7. UnityEditor.ObjectPreview.DrawPreview (UnityEditor.IPreviewable defaultPreview, UnityEngine.Rect previewArea, UnityEngine.Object[] targets) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    8. UnityEditor.Editor.DrawPreview (UnityEngine.Rect previewArea) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    9. UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    10. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <a9183b39766a483caf86aaa926f3554c>:0)
    11. UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
    And;

    Code (CSharp):
    1. InvalidOperationException: The operation is not possible when moved past all properties (Next returned false)
    2. UnityEditor.SerializedProperty.Verify (UnityEditor.SerializedProperty+VerifyFlags verifyFlags) (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    3. UnityEditor.SerializedProperty.get_stringValue () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    4. UnityEditor.AnimationClipInfoProperties.get_name () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    5. UnityEditor.ModelImporterClipEditor.get_selectedClipName () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    6. UnityEditor.ModelImporterEditor.GetPreviewTitle () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    7. UnityEditor.InspectorWindow.DrawPreviewAndLabels () (at <d7545a46516941d4b2f2dec578cd41ee>:0)
    8. UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <a9183b39766a483caf86aaa926f3554c>:0)
    9. UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <a9183b39766a483caf86aaa926f3554c>:0)
    10. UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <a9183b39766a483caf86aaa926f3554c>:0)
    11. UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Boolean straightY, System.Single pixelsPerPoint, System.Exception& immediateException) (at <a9183b39766a483caf86aaa926f3554c>:0)
    12. Rethrow as ImmediateModeException
    13. UnityEngine.UIElements.UIR.RenderChain.Render (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection, UnityEngine.UIElements.PanelClearFlags clearFlags) (at <a9183b39766a483caf86aaa926f3554c>:0)
    14. UnityEngine.UIElements.UIRRepaintUpdater.DrawChain (UnityEngine.Rect viewport, UnityEngine.Matrix4x4 projection) (at <a9183b39766a483caf86aaa926f3554c>:0)
    15. UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <a9183b39766a483caf86aaa926f3554c>:0)
    16. UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <a9183b39766a483caf86aaa926f3554c>:0)
    17. UnityEngine.UIElements.Panel.UpdateForRepaint () (at <a9183b39766a483caf86aaa926f3554c>:0)
    18. UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <a9183b39766a483caf86aaa926f3554c>:0)
    19. UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <a9183b39766a483caf86aaa926f3554c>:0)
    20. UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <a9183b39766a483caf86aaa926f3554c>:0)
    21. UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <819de1aa368e45faa4f78e26c97c62b0>:0)
     
    Last edited: Aug 27, 2020