Engines/FlatRedBallXNA/FlatRedBall.Content/AnimationChain/AnimationChainArrayProcessor.cs
/// <summary>
/// look at all of the textures in each frame and convert them into external references
/// </summary>
look at all of the textures in each frame and convert them into external references
look at all of the textures in each frame and convert them into external references
public override AnimationChainListSaveContent Process(AnimationChainListSaveContent input, ContentProcessorContext context)
        {
            string directory = System.IO.Path.GetDirectoryName(input.FileName) + @"\";
            BitmapTextureProcessor.ResizeToPowerOfTwo = ResizeToPowerOfTwo;
            BitmapTextureProcessor.TextureProcessorOutputFormat = TextureProcessorOutputFormat;
			BitmapTextureProcessor.GenerateMipmaps = GenerateMipmaps; 
            #region Loop through all AnimationChains and process them.
            for (int i = 0; i < input.AnimationChains.Count; i++)
            {
                AnimationChainSaveContent ach = input.AnimationChains[i];
                List<AnimationFrameSaveContent> newFrames = new List<AnimationFrameSaveContent>(ach.Frames.Count);
                for (int j = 0; j < ach.Frames.Count; j++)
                {
                    AnimationFrameSaveContent frameSave = ach.Frames[j];
                    frameSave.TextureReference = BitmapTextureProcessor.BuildTexture(
                        directory + frameSave.TextureName,
                        context);
                    newFrames.Add(frameSave);
                }
                ach.Frames = newFrames;
            }
            #endregion
            return input;
        }
public override AnimationChainListSaveContent Process ( AnimationChainListSaveContent input , ContentProcessorContext context ) { string directory = System . IO . Path . GetDirectoryName ( input . FileName ) + @"\" ; BitmapTextureProcessor . ResizeToPowerOfTwo = ResizeToPowerOfTwo ; BitmapTextureProcessor . TextureProcessorOutputFormat = TextureProcessorOutputFormat ; BitmapTextureProcessor . GenerateMipmaps = GenerateMipmaps ; region  Loop through all AnimationChains and process them. for ( int i = 0 ; i < input . AnimationChains . Count ; i ++ ) { AnimationChainSaveContent ach = input . AnimationChains [ i ] ; List < AnimationFrameSaveContent > newFrames = new List < AnimationFrameSaveContent > ( ach . Frames . Count ) ; for ( int j = 0 ; j < ach . Frames . Count ; j ++ ) { AnimationFrameSaveContent frameSave = ach . Frames [ j ] ; frameSave . TextureReference = BitmapTextureProcessor . BuildTexture ( directory + frameSave . TextureName , context ) ; newFrames . Add ( frameSave ) ; } ach . Frames = newFrames ; } endregion return input ; }
look at all of the textures in each frame and convert them into external references
look at all of the textures in each frame and convert them into external references
// This doesn't seem to be working......why? // new AnimationFrameSaveContent(ach.Frames[j]);
input
AnimationChainListSaveContent
context
ContentProcessorContext