1
0
mirror of synced 2024-12-14 00:23:03 +01:00
Switch-Toolbox/Switch_FileFormatsMain/FileFormats/BMD/BMDShapeWrapper.cs

52 lines
1.4 KiB
C#
Raw Normal View History

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using Switch_Toolbox.Library;
using Switch_Toolbox.Library.IO;
2019-07-12 01:38:29 +02:00
using Switch_Toolbox.Library.Rendering;
using Switch_Toolbox.Library.Forms;
using SuperBMDLib.Geometry;
namespace FirstPlugin
{
2019-07-12 01:38:29 +02:00
public class BMDShapeWrapper : GenericRenderedObject
{
2019-07-12 01:38:29 +02:00
SuperBMDLib.Model ParentModel;
Shape BMDShape;
2019-07-12 01:38:29 +02:00
private STGenericMaterial material;
2019-07-12 02:23:47 +02:00
public BMDShapeWrapper(Shape shape, SuperBMDLib.Model model, BMDMaterialWrapper mat)
{
BMDShape = shape;
2019-07-12 01:38:29 +02:00
ParentModel = model;
2019-07-12 02:23:47 +02:00
material = mat;
2019-07-12 01:38:29 +02:00
}
public override STGenericMaterial GetMaterial()
{
return material;
}
2019-07-12 21:28:14 +02:00
public void SetMaterial(STGenericMaterial mat)
{
material = mat;
}
public override void OnClick(TreeView treeView)
{
STPropertyGrid editor = (STPropertyGrid)LibraryGUI.GetActiveContent(typeof(STPropertyGrid));
if (editor == null)
{
editor = new STPropertyGrid();
LibraryGUI.LoadEditor(editor);
}
editor.Text = Text;
editor.Dock = DockStyle.Fill;
editor.LoadProperty(BMDShape, null);
}
}
}