예제 #1
0
 void SelectModel(PositionedModel model)
 {
     mModelEditor = new ModelEditor(model);
     modelPropertyGrid.SelectedObject = mModelEditor;
 }
예제 #2
0
        void SelectModel(PositionedModel selectingmodel)
        {
            #region Store and set the model

            // store the current model
            mCurrentModel = selectingmodel;

            mModelEditor = new ModelEditor(mCurrentModel);
            modelPropGrid.SelectedObject = mModelEditor;

            // Set the model
            foreach (PositionedModel model in mModelDictionary.Values)
            {
                model.Visible = (model == mCurrentModel);
            }

            modelViewControl1.CurrentModel = mCurrentModel;

            #endregion

            #region Create the material

            mMaterial = new MaterialEditor(mCurrentModel.XnaModel);
            InitializeAssets();

            #endregion

            #region Mesh part selection

            meshPartBox.Items.Clear();
            for (int i = 0; i < mMaterial.PartCount; i++)
            {
                meshPartBox.Items.Add(i);
            }
            meshPartBox.SelectedIndex = 0;

            #endregion
        }