Announcements

The Autodesk Community Forums has a new look. Read more about what's changed on the Community Announcements board.

The animation disappeared, and the character returned to the starting position

rmarquesx
Explorer

The animation disappeared, and the character returned to the starting position

rmarquesx
Explorer
Explorer

I was working on the file and at some point I saved and closed it, when I opened it I had lost everything.
Animation is simple and I could redo it from scratch, but I would love to find a way to recover.
From what I understand this problem is related to the "namespace" but I don't know how to solve it, as I'm very layman on the subject.
But I would love to solve my problem and learn how to solve it so that in the future I know how to do it on my own.

I saved the file as an attachment.
If anyone can help me I would be very grateful. Thanks!!!

0 Likes
Reply
Accepted solutions (2)
2,990 Views
8 Replies
Replies (8)

Kahylan
Advisor
Advisor
Accepted solution

Hi!

First off, the bad news... I took a look at your file, and I was able to recover some of the animation, but sadly not all of it by far. You're probably better off redoing the animation.

Now I'm going to try to explain what the issue is and how I recovered the Animation that I could...

If you check off the box "Show DAG objects only" in your Outliners "Display Menu", you'll be able to see your Animation curves.

Bildschirmfoto 2021-11-22 um 18.15.31.png

 Everything with this red and white icon next to it, is an Animation curve. As you can see, there are some duplicates (every node that ends with "1"). I don't know how you did that, but because of those duplicates, the Reference has now miss connected the animation paths of all animation curves.

 

Now to how you can recover some of the Animation:
First off, I deleted the duplicates. The easiest way to do that is, to select all animationcurves in the Outliner, then open the Node editor, and then hitting the "Output Connections" button (small gray square with arrow facing right).
This will load in all your animation curves and display the objects they are connected to.
Then you can delete all objects in the Node editor that don't connect to anything.

Bildschirmfoto 2021-11-22 um 16.53.08.png

 Next i deleted all incomming connections on the Reference Node (just the connections, not the nodes that connect in)

Bildschirmfoto 2021-11-22 um 16.53.58.png

 I had to do this, because otherwise the animation that was not connected correctly got deleted when importing the Reference.
Then I imported the file from the Reference (Reference Editor-> rightclick on Reference-> File -> Import Objects From Reference).

And deleted the namespace (Windows-> General Editors -> Namespace Editor) select namespace of reference, Delete button, "merge with root" on popup window.

 

Now I had the unconnected Animation curves and needed to connect them to their respective attributes. I did this by using the script in "connect_AnimCurves.txt"

 

This recovered animation on the Head and the Fingers but sadly not the arms or the root or torso, which I assume should also be animated, given the chair and the Computer in the Scene.
Also since this Solution requires the Import of the Reference during the Animation process, I would not recommend it.

 

I have the File with the recovered Animation Attatched as well. But I'm using Maya 2022, and by the amount of VRAY Warnings I got on loading up, I'm assuming you're on Maya2016 or lower.

I hope this explains it. As to how to avoid this issue in the Future, I'd recommend increment saving multiple times daily, so you can fall back on a savety copy in case anything goes wrong.

Have a nice day

rmarquesx
Explorer
Explorer

Thank you very much for your time and attention, it's been a while since I've been entering this world of animations. But your explanation was very clear to me and it has already helped me a lot. Even if I can't recover, I'm happy to understand a little more about this issue. Thanks

aysenozgur
Community Visitor
Community Visitor

Hello i recently live the same problem. But i couldn't be able to use your solution to fix the problem. Is it possible for you to check out my files? I keep restoring the animations with different ways but they are just keep dissapearing

0 Likes

Kahylan
Advisor
Advisor

Hi!

 

Sure, just upload a zipped file with your animation file and whatever scenes are referenced in a reply here or direcly via PM. If the files are too big to upload here PM me a google drive or Wetransfer link. I'll take a look.

0 Likes

aysenozgur
Community Visitor
Community Visitor

thank you so much. And i've 8 other files which have exact same problem. So i will be  gratefull if u explain how you done things

0 Likes

Kahylan
Advisor
Advisor

I checked your file, there are a few problems with it.

 

First:

In your referenced rig, there are nan float values. "nan" stands for not a number. This usually happens if a value is too high. It doesn't seem to be a big issue here, still you should probably fix it.

You can fix it by opening the ascii file in a text editor, looking for " nan" and replacing it by " 0".

 

Then you had the same bug as the OP of this post, your Reference was missconnecting your animCurves while still maintaining a connection to the Reference.

 

This can be fixed with this script, to a certain degree:

import maya.cmds as mc

rigGrp = mc.ls(sl = True)[0]

ns = rigGrp.split(":")[-1]
ns = rigGrp[:-(len(ns))]

animCurves = mc.ls(typ = 'animCurve')

for a in animCurves:
    if ":" not in a:
        attr = a.split("_")[-1]
        node = ns + a[:-(len(attr)+1)]
        try:
            if mc.objExists(node):
                if mc.attributeQuery(attr, n = node, ex = True):
                    mc.connectAttr("{0}.output".format(a),"{0}.{1}".format(node,attr), f = True)
                elif mc.attributeQuery(attr[:-1], n = node, ex = True):
                    mc.connectAttr("{0}.output".format(a),"{0}.{1}".format(node,attr[:-1]), f = True)
                elif mc.attributeQuery(attr[:-2], n = node, ex = True):
                    mc.connectAttr("{0}.output".format(a),"{0}.{1}".format(node,attr[:-2]), f = True)
        except:
            print(a)

 

Now, this will connect all the anim curves it can and print out all the animCurves that could not be connected due to various errors. In your case the problems with the remaining curves is mainly due to double naming. There are two identically named controls on the thumbs for example.

The printed out curves you'll have to reconnect by hand.

 

I hope it helps!

giselleharvey1
Community Visitor
Community Visitor

I have the same problem, but it won't let me delete the duplicated curves like you just did. Is there another way to do it? I changed the namespace of my rig and saved afterwards, which removed my animation. Thank you!

0 Likes

3d165eric
Explorer
Explorer
Accepted solution
I just had a similar issue with a game cycle animation and using this method solved everything! Thank you so much!
0 Likes