Пример #1
0
        private void BtnImport_Click(object sender, EventArgs e)
        {
            object importedData = FileExport.import(FileIO.fileType.model);

            if (importedData != null)
            {
                renderer.models.model.AddRange((List <RenderBase.OModel>)importedData);
                foreach (RenderBase.OModel model in (List <RenderBase.OModel>)importedData)
                {
                    ModelList.addItem(model.name);
                }
                ModelList.Refresh();
            }
        }
Пример #2
0
        private void BtnImport_Click(object sender, EventArgs e)
        {
            var animation = FileExport.ImportAnimation <T>();

            if (animation != null)
            {
                animations.AddRange(animation);
                foreach (RenderBase.OAnimationBase anim in animation)
                {
                    AnimationsList.addItem(anim.name);
                }
                AnimationsList.Refresh();
            }
        }
Пример #3
0
        private void BtnImport_Click(object sender, System.EventArgs e)
        {
            object importedData = FileExport.import(FileIO.fileType.texture);

            if (importedData != null)
            {
                if (renderer != null)
                {
                    renderer.addTextureRange((List <RenderBase.OTexture>)importedData);
                }

                foreach (RenderBase.OTexture texture in (List <RenderBase.OTexture>)importedData)
                {
                    OList.listItemGroup item = new OList.listItemGroup();
                    item.columns.Add(new OList.listItem(null, texture.texture));
                    item.columns.Add(new OList.listItem(texture.name));
                    TextureList.addItem(item);
                }

                TextureList.Refresh();
            }
        }
Пример #4
0
 private void BtnExport_Click(object sender, EventArgs e)
 {
     switch (type)
     {
     case FileIO.fileType.skeletalAnimation:
         if (renderer.CurrentModel == -1)
         {
             MessageBox.Show(
                 "A skeleton is necessary to export an Skeletal Animation." + Environment.NewLine +
                 "You must select a model before exporting!",
                 "Warning",
                 MessageBoxButtons.OK,
                 MessageBoxIcon.Exclamation);
             return;
         }
         if (control.CurrentAnimation == -1)
         {
             return;
         }
         FileExport.export(type, renderer.models, renderer.CurrentModel, control.CurrentAnimation);
         break;
     }
 }
Пример #5
0
 private void BtnExport_Click(object sender, EventArgs e)
 {
     FileExport.export(FileIO.fileType.model, renderer.models, ModelList.SelectedIndex);
 }