Added support for script instance copy/paste in the World Editor

This commit is contained in:
parax0
2016-03-20 06:31:23 -06:00
parent d961545309
commit 5009c08c87
21 changed files with 463 additions and 46 deletions

View File

@@ -0,0 +1,29 @@
#ifndef CPASTENODESCOMMAND
#define CPASTENODESCOMMAND
#include "IUndoCommand.h"
#include "ObjReferences.h"
#include "Editor/CNodeCopyMimeData.h"
#include "Editor/WorldEditor/CWorldEditor.h"
#include <QClipboard>
class CPasteNodesCommand : public IUndoCommand
{
CWorldEditor *mpEditor;
CScriptLayer *mpLayer;
CVector3f mPastePoint;
CNodeCopyMimeData *mpMimeData;
CNodePtrList mPastedNodes;
CNodePtrList mOriginalSelection;
public:
CPasteNodesCommand(CWorldEditor *pEditor, CScriptLayer *pLayer, CVector3f PastePoint);
~CPasteNodesCommand();
void undo();
void redo();
bool AffectsCleanState() const { return true; }
};
#endif // CPASTENODESCOMMAND