Skip to content

Commit

Permalink
Fix animation name and remove parameters property
Browse files Browse the repository at this point in the history
  • Loading branch information
alvani committed Mar 3, 2017
1 parent c3dc980 commit 3190f7b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions GlTF_Animation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

public class GlTF_Animation : GlTF_Writer {
public List<GlTF_Channel> channels = new List<GlTF_Channel>();
public GlTF_Parameters parameters;
public List<GlTF_AnimSampler> animSamplers = new List<GlTF_AnimSampler>();
bool gotTranslation = false;
bool gotRotation = false;
Expand Down Expand Up @@ -154,13 +153,12 @@ public void PopulateAccessor(AnimationClipCurveData cd, Keyframe[] refKeyFrames)
Dictionary<string, BoneAnimData> boneAnimData = new Dictionary<string, BoneAnimData>();
GlTF_Accessor timeAccessor;

public GlTF_Animation (string n) {
name = n;
parameters = new GlTF_Parameters(n);
public GlTF_Animation () {
}

public void Populate (AnimationClip c, Transform tr)
{
name = "anim_" + c.name + "_" + GlTF_Writer.GetNameFromObject(tr, true);
// AnimationUtility.GetCurveBindings(c);
// look at each curve
// if position, rotation, scale detected for first time
Expand Down
2 changes: 1 addition & 1 deletion SceneToGlTFWiz.cs
Original file line number Diff line number Diff line change
Expand Up @@ -860,7 +860,7 @@ public static BoundsDouble Export(string path, Transform[] trs, Transform root,
// int nClips = a.GetClipCount();
for (int i = 0; i < nClips; i++)
{
GlTF_Animation anim = new GlTF_Animation(a.name);
GlTF_Animation anim = new GlTF_Animation();
anim.Populate (clips[i], tr);
GlTF_Writer.animations.Add (anim);
}
Expand Down

0 comments on commit 3190f7b

Please sign in to comment.