glTF2: Fix animation export
authorjamesgk <jamesgk19@gmail.com>
Wed, 26 Jul 2017 21:20:53 +0000 (14:20 -0700)
committerjamesgk <jamesgk19@gmail.com>
Wed, 26 Jul 2017 21:20:53 +0000 (14:20 -0700)
code/glTF2AssetWriter.inl

index 2c3f2ff..03e73eb 100644 (file)
@@ -113,13 +113,12 @@ namespace glTF2 {
             Value valChannel;
             valChannel.SetObject();
             {
-                Animation::AnimSampler& s = a.Samplers[c.sampler];
-                valChannel.AddMember("sampler", s.id, w.mAl);
+                valChannel.AddMember("sampler", c.sampler, w.mAl);
 
                 Value valTarget;
                 valTarget.SetObject();
                 {
-                    valTarget.AddMember("id", StringRef(c.target.node->id), w.mAl);
+                    valTarget.AddMember("node", c.target.node->index, w.mAl);
                     valTarget.AddMember("path", c.target.path, w.mAl);
                 }
                 valChannel.AddMember("target", valTarget, w.mAl);