예제 #1
0
        public void Init()
        {
            for (int i = 0; i < 1; i++)
            {
                var mtl = MaterialsManager.MTLs.ElementAt(i).Value;

                foreach (var mat in mtl.Materials)
                {
                    var          matValue  = mat.Value;
                    TextureEntry textEntry = new TextureEntry();
                    textEntry.SetMaterialName(matValue.MaterialName);
                    textEntry.SetMaterialTexture(GetThumbnail(matValue));
                    flowLayoutPanel1.Controls.Add(textEntry);
                }
            }
        }
예제 #2
0
        public void Init()
        {
            for (int i = 0; i < 1; i++)
            {
                var mtl = MaterialsManager.MaterialLibraries.ElementAt(i).Value;

                for (int x = 0; x < 20; x++)
                {
                    var          mat       = mtl.Materials.ElementAt(x).Value;
                    TextureEntry textEntry = new TextureEntry();
                    textEntry.SetMaterialName(mat.MaterialName);
                    textEntry.SetMaterialTexture(GetThumbnail(mat));
                    flowLayoutPanel1.Controls.Add(textEntry);
                }
            }
        }
예제 #3
0
        private void SelectedIndexChanged(object sender, EventArgs e)
        {
            Panel.Controls.Clear();
            if (FrameResource.IsFrameType(currentObject))
            {
                if (currentObject is FrameObjectSingleMesh)
                {
                    var entry = (currentObject as FrameObjectSingleMesh);
                    for (int i = 0; i != entry.Material.NumLods; i++)
                    {
                        for (int x = 0; x != entry.Material.Materials[i].Length; x++)
                        {
                            var          mat       = entry.Material.Materials[i][x];
                            TextureEntry textEntry = new TextureEntry();

                            textEntry.SetMaterialName(mat.MaterialName);
                            textEntry.SetMaterialTexture(GetThumbnail(mat));
                            Panel.Controls.Add(textEntry);
                        }
                    }
                }
            }
        }