zturtleman / mm3d

Maverick Model 3D is a 3D model editor and animator for games.
https://clover.moe/mm3d
GNU General Public License v2.0
114 stars 22 forks source link

Sometimes copying skeletal anim and pasting simply won't work #120

Closed 77ZaRR77 closed 2 years ago

77ZaRR77 commented 4 years ago

Sometimes when I copy skeletal bones in animation mode and switching to other anim and trying to paste, I relize that it wasn't copied. Or if it was, then it paste without changed animation, like T-Pose(not copying rotations). Doesn't matter, with one bone or whole skeleton.(Also tried with keyboard shortucts) Very weird. I am sorry for telling such lack info, but I really have no idea, looks like it happends random in some anim groups. I wonder if it's just me or others also have such weirdness?

m-7761 commented 4 years ago

The relevant code:

https://github.com/zturtleman/mm3d/blob/ebbf3bb1951aa5f7e3617a2bce208fb5bf98b91d/src/implui/animwidget.cc#L338-L491

Make sure you select all the joints before copying. It might be hard to tell what's selected since downstream joints get highlighted. I don't see an explanation.

m-7761 commented 4 years ago

I noticed the code only copies defined keyframe data:

https://github.com/zturtleman/mm3d/blob/ebbf3bb1951aa5f7e3617a2bce208fb5bf98b91d/src/implui/animwidget.cc#L371-L375

This can be a nuisance since it won't overwrite keyframe data that's present in the destination but not in the source. E.g. if the destination has a rotation but the copied joint doesn't then it won't change the rotation on paste.

Plus you have to keep in mind that joints that aren't keyframes are filled in by interpolation. That's the definition of a keyframe versus a non-keyframe. So you can't just copy any frame. It must be highlighted with the green color when selected.

zturtleman commented 2 years ago

Skeleton animation copy/paste and splitting animations are retain pose from interpolated joints. 838a1e56bdfe937a8515c53636b43104186e808a...f2528481419d9b221ae281a232aedb2e34851116