Open 3D Engine LyShine Gem API Reference 23.10.0
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
HierarchyClipboard Class Reference

Static Public Member Functions

static SerializeHelpers::SerializedEntryList & Serialize (HierarchyWidget *widget, const QTreeWidgetItemRawPtrQList &selectedItems, HierarchyItemRawPtrList *optionalItemsToSerialize, SerializeHelpers::SerializedEntryList &entryList, bool isUndo)
 The return value is the same as the parameter entryList.
 
static bool Unserialize (HierarchyWidget *widget, SerializeHelpers::SerializedEntryList &entryList, bool isUndo)
 
static void CopySelectedItemsToClipboard (HierarchyWidget *widget, const QTreeWidgetItemRawPtrQList &selectedItems)
 
static void CreateElementsFromClipboard (HierarchyWidget *widget, const QTreeWidgetItemRawPtrQList &selectedItems, bool createAsChildOfSelection)
 
static AZStd::string GetXml (HierarchyWidget *widget, const LyShine::EntityArray &elements, bool isCopyOperation, AZStd::unordered_set< AZ::Data::AssetId > &referencedSliceAssets)
 
static AZStd::string GetXmlForDiff (AZ::EntityId canvasEntityId)
 
static void BeginUndoableEntitiesChange (EditorWindow *editorWindow, SerializeHelpers::SerializedEntryList &preChangeState)
 Record the state of all selected entities before a change.
 
static void EndUndoableEntitiesChange (EditorWindow *editorWindow, const char *commandName, SerializeHelpers::SerializedEntryList &preChangeState)
 Record an undo command of the changes to the selected entities.
 

Member Function Documentation

◆ GetXml()

static AZStd::string HierarchyClipboard::GetXml ( HierarchyWidget widget,
const LyShine::EntityArray elements,
bool  isCopyOperation,
AZStd::unordered_set< AZ::Data::AssetId > &  referencedSliceAssets 
)
static

Get the XML from the given elements (and their descendants)

Parameters
widgetthe HiearchyWidget in the Ui Editor editing the canvas
elementsthe elements to serialize
isCopyOperationTrue if this is a copy or cut operation, false if it is part of undo/redo
referencedSliceAssetsan out parameter listing the prefab assets used by the serialized elements
Returns
a string containing XML or empty

◆ GetXmlForDiff()

static AZStd::string HierarchyClipboard::GetXmlForDiff ( AZ::EntityId  canvasEntityId)
static

Get the XML from the given canvas. The output SHOULDN'T be serialized to disk. The output should ONLY be used to determine if any changes have occurred between a "before" and an "after" states.

Returns
a string containing XML or empty

The documentation for this class was generated from the following file: