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);
        }
        private void CreateResource()
        {
            ResetResource("");
            // 产生一个不重复的名称
            string resName = "NewAnimMesh";

            resName += DateTime.Now.ToFileTime();

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

            // 更新界面
            RefreshLOD();
        }
        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!");
            }
        }