private void btnAddWsNode_Click(object sender, EventArgs e) { GroundSceneCallbacks.AddUpdateLoopCall(() => { WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode("object/tangible/furniture/elegant/shared_chair_s01.iff", Game.Player.ObjectToParent); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } }); }
private void ConvertDragDropObjectToWorldSnapshotNode(string objectFilename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { if (!hasValidDragLocation) { // Cleanup the temporary DragDrop object CleanUpDragDropObject(); return; } WorldSnapshotReaderWriter.Node node = WorldSnapshot.CreateAddNode(objectFilename, dragDropObject.Transform); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } // Cleanup the temporary DragDrop object CleanUpDragDropObject(); }); }
public void AddNode(string objectFilename) { GroundSceneCallbacks.AddUpdateLoopCall(() => { var node = WorldSnapshot.CreateAddNode(objectFilename, Game.Player.ObjectToParent); if (node != null) { editorPlugin.AddUndoCommand(this, new AddUndoCommandEventArgs(new AddWorldSnapshotNodeCommand(node))); } }); }