Exemplo n.º 1
0
        private bool ResetResource(string confirmTxt)
        {
            if (m_resAnimMesh != null &&
                confirmTxt.Length > 0)
            {
                if (DialogResult.OK !=
                    MessageBox.Show(this, confirmTxt, "Please Confirm", MessageBoxButtons.OKCancel))
                {
                    return(false);
                }
            }

            //--
            m_preview.Reset();

            if (m_resAnimMesh != null)
            {
                m_resAnimMesh.Dispose();
                m_resAnimMesh = null;
            }
            m_prop = null;
            this.propertyGridMtl.SelectedObject = null;
            this.propertyGridRes.SelectedObject = null;
            this.comboBoxLOD.Items.Clear();
            this.comboBoxSection.Items.Clear();
            this.listBoxAnim.Items.Clear();
            this.propertyGridSeq.SelectedObject = null;

            return(true);
        }
Exemplo n.º 2
0
        private void CreateResource()
        {
            ResetResource("");
            // 产生一个不重复的名称
            string resName = "NewAnimMesh";

            resName += DateTime.Now.ToFileTime();

            // 创建空白资源和内部数据
            m_resAnimMesh = NResourceManager.Instance.NewAnimMesh(resName);
            m_prop        = new ResAnimMeshProperty(m_resAnimMesh);

            // 更新界面
            RefreshLOD();
        }
Exemplo n.º 3
0
        public void LoadAnimMesh(string pkg, string file)
        {
            try
            {
                using (NexusEngineExtension.NWaitCursor wc = new NexusEngineExtension.NWaitCursor(this))
                {
                    NResourceLoc resLoc = new NResourceLoc(pkg, file);
                    m_resAnimMesh = NResourceManager.Instance.LoadAnimMesh(
                        resLoc,
                        EResourceIOMode.Block,
                        EResourceIOPriority.Normal
                        );
                    m_prop = new ResAnimMeshProperty(m_resAnimMesh);

                    this.propertyGridRes.SelectedObject = m_prop;
                    RefreshLOD();
                }
            }
            catch (System.Exception ex)
            {
                Program.ShowException(ex, "Load Anim Mesh FAILED!");
            }
        }