ufe  2.0
Universal Front End is a DCC-agnostic component that will allow a DCC to browse and edit data in multiple data models
selectionUndoableCommands.h
Go to the documentation of this file.
1 #line 1 "S:/jenkins/workspace/ufe-full-windows/ufe/include/selectionUndoableCommands.h"
2 #ifndef _selectionUndoableCommands
3 #define _selectionUndoableCommands
4 // ===========================================================================
5 // Copyright 2018 Autodesk, Inc. All rights reserved.
6 //
7 // Use of this software is subject to the terms of the Autodesk license
8 // agreement provided at the time of installation or download, or which
9 // otherwise accompanies this software in either electronic or hard copy form.
10 // ===========================================================================
11 
12 #include "undoableCommand.h"
13 #include "globalSelection.h"
14 #include "sceneItem.h"
15 #include "path.h"
16 
17 UFE_NS_DEF {
18 
20 
26 {
27 public:
28 
31  static Ptr createAndExecute(
32  const GlobalSelection::Ptr& sn,
33  const SceneItem::Ptr& item
34  );
35 
38  const GlobalSelection::Ptr& sn,
39  const SceneItem::Ptr& item
40  );
41 
43  void undo() override;
45  void redo() override;
46 
47 private:
48 
50  // Store path instead of scene item.
51  // A valid scene item at command creation may be invalidated by a sequence
52  // of undos, followed by corresponding redos.
53  const Path fPath;
54 };
55 
57 
63 {
64 public:
65 
68  static Ptr createAndExecute(
69  const GlobalSelection::Ptr& sn,
70  const SceneItem::Ptr& item
71  );
72 
75  const GlobalSelection::Ptr& sn,
76  const SceneItem::Ptr& item
77  );
78 
80  void undo() override;
82  void redo() override;
83 
84 private:
85 
87  // Store path instead of scene item.
88  // A valid scene item at command creation may be invalidated by a sequence
89  // of undos, followed by corresponding redos.
90  const Path fPath;
91 };
92 
93 }
94 
95 #endif /* _selectionUndoableCommands */
virtual void redo()=0
std::shared_ptr< UndoableCommand > Ptr
std::shared_ptr< ObservableSelection > Ptr
Append an item to the argument selection.
Identify an object or 3D path in the scene.
Definition: path.h:37
Remove an item from the argument selection.
#define UFE_NS_DEF
Definition: ufe.h:35
Abstract base class for undoable commands.
std::shared_ptr< SceneItem > Ptr
Definition: sceneItem.h:40
const GlobalSelection::Ptr fSn
const GlobalSelection::Ptr fSn
virtual void undo()=0
#define UFE_SDK_DECL
Definition: ufeExport.h:36