Search code examples
scenekitcolladacaanimation

SceneKit DAE animation not appearing in attributes


I'm trying to carefully word this question because the problem doesn't appear to be that the animation isn't being imported. I can see the animation as <untitled animation> in the scene graph, and I can play the animation in Xcode; the issue is then locating the animation as an attribute to any of the objects. This is what I can see in the scene graph: scene graph

But, when I try and locate the animation here:

enter image description here

... nothing appears. So, it seems that it isn't importing the animation as a CAAnimation object with a key.

I have tried to programmatically enumerate through the child nodes to find any CAAnimation objects, but it doesn't see any. Other scenes work perfectly however.

What do I need to add to the DAE file to get it to build the CAAnimation object properly?

Worth pointing out that the 3D model and animation was exported from 3DS Max using OpenCollada. I don't know what the best practices are for exporting collada to SceneKit, and if anyone has any useful information that would be great. Apple don't seem to have anything.


Solution

  • The SceneKit editor in Xcode does not display the root node in the scene graph view, and it might be the one that holds the animation.

    You should be able to retrieve the root node's animation programmatically.