Ejemplo n.º 1
0
        public void TestShadingModes()
        {
            CommonSubtestInit(@"HavokBinding\JointMuseum.scene");
            int iFrameCount = 20;

            AssetInfo[] allAssets = VisionAssetManager.GetAllResources();

            // render frames
            foreach (AssetInfo asset in allAssets)
            {
                EditorManager.EngineManager.SetResourcePreview(asset.NativePtr, asset.AssetType.TypeName, true);
                for (int i = 0; i < iFrameCount; i++)
                {
                    EditorManager.ActiveView.UpdateView(true);
                }
            }
            EditorManager.EngineManager.SetResourcePreview(IntPtr.Zero, null, false);
            CommonSubtestDeInit();
        }
Ejemplo n.º 2
0
        // Deactivated test, as since the introduction of the asset system, generation of
        // asset thumbnails via vForge is no relevant functionality any more.
        //[Test]
        public void DontTestThumbnailGeneration()
        {
            CommonSubtestInit(@"HavokBinding\JointMuseum.scene");

            AssetInfo[] allAssets = VisionAssetManager.GetAllResources();

            // delete all thumbnails
            foreach (AssetInfo asset in allAssets)
            {
                EditorManager.EngineManager.DeleteThumbnail(asset.NativePtr, asset.AssetType.TypeName, true);
            }

            // begin automated thumbnail generation
            EditorManager.EngineManager.BeginThumbnailGeneration();

            // automatically generate and save thumbnails
            foreach (AssetInfo asset in allAssets)
            {
                EditorManager.EngineManager.DoThumbnailGeneration(asset.NativePtr, asset.AssetType.TypeName, true);
            }

            // end automated thumbnail generation
            EditorManager.EngineManager.EndThumbnailGeneration();

            // check if thumbnails have been saved
            String filename = "";

            foreach (AssetInfo asset in allAssets)
            {
                EditorManager.EngineManager.GetThumbnailFilename(asset.NativePtr, ref filename, asset.AssetType.TypeName, true);
                if (filename != "")
                {
                    Assert.IsTrue(System.IO.File.Exists(filename));
                }
            }

            CommonSubtestDeInit();
        }