mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-10 05:57:48 +00:00
Added support for script instance copy/paste in the World Editor
This commit is contained in:
29
src/Editor/Undo/CPasteNodesCommand.h
Normal file
29
src/Editor/Undo/CPasteNodesCommand.h
Normal 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
|
||||
|
||||
Reference in New Issue
Block a user