Пример #1
0
        public SpeedTreeViewer()
        {
            InitializeComponent();

            m_finalClose = false;

            //--
            m_preview = new ResourcePreview("SpeedTreePreview_LV");
            this.splitContainer1.Panel1.Controls.Add(m_preview);
        }
Пример #2
0
        public ResStaticMeshEditor()
        {
            InitializeComponent();

            m_finalClose = false;

            m_importDefault = new ResStaticMeshImportDefault();
            m_preview       = new ResourcePreview("ResStaticMeshPreview_LV");
            this.splitContainer1.Panel1.Controls.Add(m_preview);
        }
Пример #3
0
        public ResSFXEditor()
        {
            m_realtimeMode = true;
            m_elementsCtrl = new List <SFXElement>();

            InitializeComponent();

            m_res     = NResourceManager.Instance.NewSpecialEffect("DefaultSFXRes");
            m_preview = new ResourcePreview("ResSFXPreview_LV");
            m_preview.ShowSpecialEffect(m_res);
            this.splitContainerV.Panel1.Controls.Add(m_preview);
            this.splitContainerH.Panel2.Enabled = true;

            NControl.NCurveEditorCtrl curveCtrl = new NexusEditor.NControl.NCurveEditorCtrl();
            this.groupBoxCurve.Controls.Add(curveCtrl);
            curveCtrl.Dock = DockStyle.Fill;

            //-- 根据特效元素子类型,创建菜单内容
            System.Collections.ArrayList nativeClassList = NEffectElement.GetNativeClassNameList();
            foreach (String className in nativeClassList)
            {
                ToolStripItem menuItem = this.contextMenuStripCreate.Items.Add("new " + className);
                menuItem.Tag    = className;
                menuItem.Click += new EventHandler(effectMenuItem_Click);
            }

            //-- 取得所有Distribution相关的class
            m_distributionClasses = new List <Type>();
            Type     baseDistType = typeof(NexusEngine.NDistribution);
            Assembly engineDll    = baseDistType.Assembly;

            foreach (Type t in engineDll.GetTypes())
            {
                if (t.IsSubclassOf(baseDistType) &&
                    !t.IsAbstract)
                {
                    m_distributionClasses.Add(t);
                }
            }

            m_Timeline.TooltipDelegate = this.OnTimelineTooltip;
        }
Пример #4
0
        public MaterialEditor()
        {
            InitializeComponent();

            m_finalClose = false;
            m_realTime   = false;

            m_Location = new NResourceLoc("", "");

            m_preview = new ResourcePreview("MaterialPreview_LV");
            this.splitContainer1.Panel1.Controls.Add(m_preview);

            //新建材质
            NResourceLoc resLoc = new NResourceLoc("engine_data", "material/standard.hlsl");
            NMtlStatic   mtl    = new NMtlStatic(resLoc.ToString());

            mtl.DefaultCreate(resLoc);
            m_Material = mtl;
            MaterialProperty mtlProp = new MaterialProperty(m_Material);

            mtlProp.ApplyChange();
            this.propertyGridMtl.SelectedObject = mtlProp;
            LoadSphere();
        }