public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelAnimAssetTag afterChanges = new visualModelAnimAssetTag(); afterChanges.copy(mData); afterChanges.position = (decimal)floatSliderEdit1.Value; afterChanges.tobone = (string)toBoneComboBox.SelectedItem; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); // Update animation slider mVisualEditorPage.setAnimationControlState(AnimationControl.AnimControlStateEnum.ePaused); mVisualEditorPage.setAnimationControlNormalizedTime((float)afterChanges.position); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelComponentOrAnimAttach afterChanges = new visualModelComponentOrAnimAttach(); afterChanges.type = visualModelComponentOrAnimAttach.AttachType.ModelFile; afterChanges.name = modelFileBrowseControl.FileName; afterChanges.tobone = (string)toBoneComboBox.SelectedItem; afterChanges.frombone = (string)fromBoneComboBox.SelectedItem; afterChanges.disregardorient = disregardBoneOrientationCheckBox.Checked; // Load asset afterChanges.loadAsset(); // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualLogicData afterChanges = new visualLogicData(); afterChanges.value = "p" + System.Convert.ToString((int)floatSliderEdit.Value); // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visual afterChanges = new visual(); afterChanges.defaultmodel = (string)comboBox1.SelectedItem; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModel afterChanges = new visualModel(); afterChanges.name = textBoxName.Text; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelComponentAsset afterChanges = new visualModelComponentAsset(); afterChanges.type = visualModelComponentAsset.ComponentAssetType.Light; afterChanges.file = fileBrowseControl1.FileName; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelComponentPoint afterChanges = new visualModelComponentPoint(); afterChanges.pointType = (visualModelComponentPoint.ComponentPointType)typeComboBox.SelectedIndex; afterChanges.pointData = (visualModelComponentPoint.ComponentPointData)dataComboBox.SelectedIndex; afterChanges.bone = (string)toBoneComboBox.SelectedItem; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualLogicData afterChanges = new visualLogicData(); afterChanges.value = textBoxName.Text; afterChanges.modelref = (string)comboBox1.SelectedItem; afterChanges.weight = (int)weightNumericUpDown1.Value; // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelAnim afterChanges = new visualModelAnim(); afterChanges.type = comboBox1.Text; afterChanges.tweenTime = (int)tweenTimeNumericUpDown.Value; afterChanges.tweenToAnimation = tweenToAnimation.Text; if (transitionRadioButton.Checked) { tweenToAnimation.Enabled = true; afterChanges.exitAction = visualModelAnim.AnimExitAction.Transition; } else { tweenToAnimation.Enabled = false; if (loopRadioButton.Checked) { afterChanges.exitAction = visualModelAnim.AnimExitAction.Loop; } else if (freezeRadioButton.Checked) { afterChanges.exitAction = visualModelAnim.AnimExitAction.Freeze; } } // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }
public void updateData() { if ((mData == null) || (mNode == null)) { return; } // Move control data to data (CONTROL DATA -> DATA) // visualModelAnimAsset afterChanges = new visualModelAnimAsset(); afterChanges.file = fileBrowseControl1.FileName; afterChanges.weight = (int)weightNumericUpDown1.Value; // Create a progression copy if: // - progression is not null // - progression has 2 or more points // - if progression only has 2 points makes sure they are not the default values if ((mProgression != null) && (mProgression.Stages.Count >= 2)) //((mProgression.Stages.Count == 2) && (mProgression.Stages[0].Value != 1.0f) || (mProgression.Stages[1].Value != 1.0f)) { afterChanges.progression = new EditorCore.FloatProgression(); afterChanges.progression.Copy(mProgression); } else { afterChanges.progression = null; } // Load asset afterChanges.loadAsset(); // Add/Execute undo action UndoRedoChangeDataAction undoAction = new UndoRedoChangeDataAction(mData, afterChanges); mVisualEditorPage.mUndoRedoManager.addUndoRedoActionAndExecute(undoAction); }