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