public idMD5Anim GetAnimation(string name) { idMD5Anim anim; if(_animations.ContainsKey(name) == true) { anim = _animations[name]; } else { if(Path.GetExtension(name) != idRenderModel_MD5.MeshAnimationExtension) { return null; } anim = new idMD5Anim(); if(anim.LoadAnimation(name) == false) { idConsole.Warning("Couldn't load anim: '{0}'", name); anim = null; } _animations.Add(name, anim); } return anim; }
public idMD5Anim GetAnimation(string name) { idMD5Anim anim; if (_animations.ContainsKey(name) == true) { anim = _animations[name]; } else { if (Path.GetExtension(name) != idRenderModel_MD5.MeshAnimationExtension) { return(null); } anim = new idMD5Anim(); if (anim.LoadAnimation(name) == false) { idConsole.Warning("Couldn't load anim: '{0}'", name); anim = null; } _animations.Add(name, anim); } return(anim); }
public void SetAnimation(idDeclModel modelDef, string sourceName, string animName, idMD5Anim[] md5anims) { _modelDef = modelDef; _anims = md5anims; _realName = sourceName; _name = animName; _animFlags = new AnimationFlags(); _frameCommands.Clear(); _frameLookups.Clear(); }