Example #1
0
		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;
		}
Example #2
0
        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);
        }
Example #3
0
		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();
		}