XII Release 0.1.0
Loading...
Searching...
No Matches
xiiScene2Document Class Reference
Inheritance diagram for xiiScene2Document:
[legend]

Public Member Functions

 xiiScene2Document (xiiStringView sDocumentPath)
 
Scene Data Accessors
const xiiDocumentObjectManagerGetSceneObjectManager () const
 
xiiDocumentObjectManagerGetSceneObjectManager ()
 
xiiSelectionManagerGetSceneSelectionManager () const
 
xiiCommandHistoryGetSceneCommandHistory () const
 
xiiObjectAccessorBaseGetSceneObjectAccessor () const
 
const xiiObjectMetaData< xiiUuid, xiiDocumentObjectMetaData > * GetSceneDocumentObjectMetaData () const
 
xiiObjectMetaData< xiiUuid, xiiDocumentObjectMetaData > * GetSceneDocumentObjectMetaData ()
 
const xiiObjectMetaData< xiiUuid, xiiGameObjectMetaData > * GetSceneGameObjectMetaData () const
 
xiiObjectMetaData< xiiUuid, xiiGameObjectMetaData > * GetSceneGameObjectMetaData ()
 
Layer Functions
xiiSelectionManagerGetLayerSelectionManager () const
 
xiiStatus CreateLayer (xiiStringView sName, xiiUuid &out_layerGuid)
 
xiiStatus DeleteLayer (const xiiUuid &layerGuid)
 
const xiiUuidGetActiveLayer () const
 
xiiStatus SetActiveLayer (const xiiUuid &layerGuid)
 
bool IsLayerLoaded (const xiiUuid &layerGuid) const
 
xiiStatus SetLayerLoaded (const xiiUuid &layerGuid, bool bLoaded)
 
void GetAllLayers (xiiDynamicArray< xiiUuid > &out_layerGuids)
 
void GetLoadedLayers (xiiDynamicArray< xiiSceneDocument * > &out_layers) const
 
bool IsLayerVisible (const xiiUuid &layerGuid) const
 
xiiStatus SetLayerVisible (const xiiUuid &layerGuid, bool bVisible)
 
const xiiDocumentObjectGetLayerObject (const xiiUuid &layerGuid) const
 
xiiSceneDocumentGetLayerDocument (const xiiUuid &layerGuid) const
 
virtual xiiGameObjectDocumentGetRedirectedGameObjectDoc () override
 In case a document consists of multiple layers, this redirection is necessary to execute actions on the active layer.
 
bool IsAnyLayerModified () const
 
Base Class Functions
virtual void InitializeAfterLoading (bool bFirstTimeCreation) override
 
virtual void InitializeAfterLoadingAndSaving () override
 
virtual const xiiDocumentObjectGetSettingsObject () const override
 
virtual void HandleEngineMessage (const xiiEditorEngineDocumentMsg *pMsg) override
 Handles all messages received from the corresponding xiiEngineProcessDocumentContext on the engine process.
 
virtual xiiTaskGroupID InternalSaveDocument (AfterSaveCallback callback) override
 Overrides the base function to call UpdateAssetDocumentInfo() to update the settings hash.
 
virtual void SendGameWorldToEngine () override
 Sends the current state of the scene to the engine process. This is typically done after scene load or when the world might have deviated on the engine side (after play the game etc.)
 
virtual xiiTransformStatus InternalTransformAsset (xiiStringView sTargetFile, xiiStringView sOutputTag, const xiiPlatformProfile *pAssetProfile, const xiiAssetFileHeader &assetHeader, xiiBitflags< xiiTransformFlags > transformFlags) override
 Only override this function, if the transformed file for the given szOutputTag must be written from another process.
 
Selection Specific Functions
void PreventDoubleSelectionChange (bool b)
 
virtual void UndoSelection () override
 
- Public Member Functions inherited from xiiSceneDocument
 xiiSceneDocument (xiiStringView sDocumentPath, DocumentType documentType)
 
void GroupSelection ()
 Creates a new object and attaches all currently selected objects to it.
 
void SelectParentObject ()
 Changes the selection to the parent object.
 
void SetSelectedAsActiveParent ()
 Sets the last selected object as the 'active parent'.
 
void ClearActiveParent ()
 Clears the 'active parent' object.
 
void DuplicateSpecial ()
 Opens the Duplicate Special dialog.
 
void DeltaTransform ()
 Opens the 'Delta Transform' dialog.
 
void SnapObjectToCamera ()
 Moves all selected objects to the editor camera position.
 
void AttachToObject ()
 Attaches all selected objects to the selected object.
 
void DetachFromParent ()
 Detaches all selected objects from their current parent.
 
void CopyReference ()
 Puts the GUID of the single selected object into the clipboard.
 
xiiStatus CreateEmptyObject (bool bAttachToParent, bool bAtPickedPosition, bool bComponentSelectionMenu)
 Creates a new empty object, either top-level (selection empty) or as a child of the selected item.
 
void DuplicateSelection ()
 
void ShowOrHideSelectedObjects (ShowOrHide action)
 
void ShowOrHideAllObjects (ShowOrHide action)
 
void HideUnselectedObjects ()
 
bool IsPrefab () const
 Whether this document represents a prefab or a scene.
 
bool IsObjectEditorPrefab (const xiiUuid &object, xiiUuid *out_pPrefabAssetGuid=nullptr) const
 Determines whether the given object is an editor prefab.
 
bool IsObjectEnginePrefab (const xiiUuid &object, xiiUuid *out_pPrefabAssetGuid=nullptr) const
 Determines whether the given object is an engine prefab.
 
virtual bool ArePrefabsAllowed () const override
 Nested prefabs are not allowed.
 
virtual void GetSupportedMimeTypesForPasting (xiiHybridArray< xiiString, 4 > &out_mimeTypes) const override
 Whether this document supports pasting the given mime format into it.
 
virtual bool CopySelectedObjects (xiiAbstractObjectGraph &out_objectGraph, xiiStringBuilder &out_sMimeType) const override
 Creates the abstract graph of data to be copied and returns the mime type for the clipboard to identify the data.
 
virtual bool Paste (const xiiArrayPtr< PasteInfo > &info, const xiiAbstractObjectGraph &objectGraph, bool bAllowPickedPosition, xiiStringView sMimeType) override
 
bool DuplicateSelectedObjects (const xiiArrayPtr< PasteInfo > &info, const xiiAbstractObjectGraph &objectGraph, bool bSetSelected)
 
bool CopySelectedObjects (xiiAbstractObjectGraph &ref_graph, xiiMap< xiiUuid, xiiUuid > *out_pParents) const
 
bool PasteAt (const xiiArrayPtr< PasteInfo > &info, const xiiAbstractObjectGraph &objectGraph, const xiiVec3 &vPos)
 
bool PasteAtOrignalPosition (const xiiArrayPtr< PasteInfo > &info, const xiiAbstractObjectGraph &objectGraph)
 
virtual void UpdatePrefabs () override
 Updates ALL prefabs in the document with the latest changes. Merges the current prefab templates with the instances in the document.
 
virtual void UnlinkPrefabs (xiiArrayPtr< const xiiDocumentObject * > selection) override
 Removes the link to the prefab template, making the editor prefab a simple object.
 
virtual xiiUuid ReplaceByPrefab (const xiiDocumentObject *pRootObject, xiiStringView sPrefabFile, const xiiUuid &prefabAsset, const xiiUuid &prefabSeed, bool bEnginePrefab) override
 
virtual xiiUuid RevertPrefab (const xiiDocumentObject *pObject) override
 Reverts all selected editor prefabs to their original template state.
 
virtual void ConvertToEditorPrefab (xiiArrayPtr< const xiiDocumentObject * > selection)
 Converts all objects in the selection that are engine prefabs to their respective editor prefab representation.
 
virtual void ConvertToEnginePrefab (xiiArrayPtr< const xiiDocumentObject * > selection)
 Converts all objects in the selection that are editor prefabs to their respective engine prefab representation.
 
virtual xiiStatus CreatePrefabDocumentFromSelection (xiiStringView sFile, const xiiRTTI *pRootType, xiiDelegate< void(xiiAbstractObjectNode *)> adjustGraphNodeCB={}, xiiDelegate< void(xiiDocumentObject *)> adjustNewNodesCB={}, xiiDelegate< void(xiiAbstractObjectGraph &graph, xiiDynamicArray< xiiAbstractObjectNode * > &graphRootNodes)> finalizeGraphCB={}) override
 
GameMode::Enum GetGameMode () const
 
virtual bool CanEngineProcessBeRestarted () const override
 Asks the document whether a restart of the engine process is allowed at this time.
 
void StartSimulateWorld ()
 
void TriggerGameModePlay (bool bUsePickedPositionAsStart)
 
bool StopGameMode ()
 Stops the world simulation, if it is running. Returns true, when the simulation needed to be stopped.
 
xiiTransformStatus ExportScene (bool bCreateThumbnail)
 
void ExportSceneGeometry (xiiStringView sFile, bool bOnlySelection, int iExtractionMode, const xiiMat3 &mTransform)
 
void HandleGameModeMsg (const xiiGameModeMsgToEditor *pMsg)
 
void HandleObjectStateFromEngineMsg (const xiiPushObjectStateMsgToEditor *pMsg)
 
void SendObjectMsg (const xiiDocumentObject *pObj, xiiObjectTagMsgToEngine *pMsg)
 
void SendObjectMsgRecursive (const xiiDocumentObject *pObj, xiiObjectTagMsgToEngine *pMsg)
 
bool CanUndoSelection () const
 
const xiiSceneDocumentSettingsBaseGetSettingsBase () const
 
template<typename T>
const T * GetSettings () const
 
xiiStatus CreateExposedProperty (const xiiDocumentObject *pObject, const xiiAbstractProperty *pProperty, xiiVariant index, xiiExposedSceneProperty &out_key) const
 
xiiStatus AddExposedParameter (xiiStringView sName, const xiiDocumentObject *pObject, const xiiAbstractProperty *pProperty, xiiVariant index)
 
xiiInt32 FindExposedParameter (const xiiDocumentObject *pObject, const xiiAbstractProperty *pProperty, xiiVariant index)
 
xiiStatus RemoveExposedParameter (xiiInt32 iIndex)
 
void StoreFavoriteCamera (xiiUInt8 uiSlot)
 Stores the current editor camera position in a user preference. Slot can be 0 to 9.
 
void RestoreFavoriteCamera (xiiUInt8 uiSlot)
 Applies the previously stored camera position from slot 0 to 9 to the current camera position.
 
xiiResult JumpToLevelCamera (xiiUInt8 uiSlot, bool bImmediate)
 Searches for a xiiCameraComponent with the 'EditorShortcut' property set to uiSlot and moves the editor camera to that position.
 
xiiResult CreateLevelCamera (xiiUInt8 uiSlot)
 Creates an object with a xiiCameraComponent at the current editor camera position and sets the 'EditorShortcut' property to uiSlot.
 
virtual xiiManipulatorSearchStrategy GetManipulatorSearchStrategy () const override
 Needed by xiiManipulatorManager to know where to look for the manipulator attributes.
 
- Public Member Functions inherited from xiiGameObjectDocument
 xiiGameObjectDocument (xiiStringView sDocumentPath, xiiDocumentObjectManager *pObjectManager, xiiAssetDocEngineConnection engineConnectionType=xiiAssetDocEngineConnection::FullObjectMirroring)
 
virtual xiiEditorInputContextGetEditorInputContextOverride () override
 Allows to return a single input context that currently overrides all others (in priority).
 
void SelectionManagerEventHandler (const xiiSelectionManagerEvent &e)
 
void ObjectPropertyEventHandler (const xiiDocumentObjectPropertyEvent &e)
 
void ObjectStructureEventHandler (const xiiDocumentObjectStructureEvent &e)
 
void ObjectEventHandler (const xiiDocumentObjectEvent &e)
 
void TriggerShowSelectionInScenegraph () const
 
void TriggerFocusOnSelection (bool bAllViews) const
 
void TriggerSnapPivotToGrid () const
 
void TriggerSnapEachObjectToGrid () const
 
void SnapCameraToObject ()
 Moves the editor camera to the same position as the selected object.
 
void MoveCameraHere ()
 Moves the camera to the current picking position.
 
void ScheduleSendObjectSelection ()
 
void SendObjectSelection ()
 Sends the current object selection, but only if it was modified or specifically tagged for resending with ScheduleSendObjectSelection().
 
void DetermineNodeName (const xiiDocumentObject *pObject, const xiiUuid &prefabGuid, xiiStringBuilder &out_sResult, QIcon *out_pIcon=nullptr) const
 Generates a good name for pObject. Queries the "Name" property, child components and asset properties, if necessary.
 
void QueryCachedNodeName (const xiiDocumentObject *pObject, xiiStringBuilder &out_sResult, xiiUuid *out_pPrefabGuid=nullptr, QIcon *out_pIcon=nullptr) const
 Similar to DetermineNodeName() but prefers to return the last cached value from scene meta data. This is more efficient, but may give an outdated result.
 
void GenerateFullDisplayName (const xiiDocumentObject *pRoot, xiiStringBuilder &out_sFullPath) const
 Creates a full "path" to a scene object for display in UIs. No guarantee for uniqueness.
 
void SetActiveEditTool (const xiiRTTI *pEditToolType)
 Makes an edit tool of the given type active. Allocates a new one, if necessary. Only works when SetEditToolConfigDelegate() is set.
 
xiiGameObjectEditToolGetActiveEditTool () const
 Returns the currently active edit tool (nullptr for none).
 
bool IsActiveEditTool (const xiiRTTI *pEditToolType) const
 Checks whether an edit tool of the given type, or nullptr for none, is active.
 
void SetEditToolConfigDelegate (xiiDelegate< void(xiiGameObjectEditTool *)> configDelegate)
 Needs to be called by some higher level code (usually the DocumentWindow) to react to newly created edit tools to configure them (call xiiGameObjectEditTool::ConfigureTool()).
 
void SetGizmoWorldSpace (bool bWorldSpace)
 
bool GetGizmoWorldSpace () const
 
void SetGizmoMoveParentOnly (bool bMoveParent)
 
bool GetGizmoMoveParentOnly () const
 
void ComputeTopLevelSelectedGameObjects (xiiDeque< xiiSelectedGameObject > &out_selection)
 Finds all objects that are selected at the top level, ie. none of their parents is selected.
 
bool GetAddAmbientLight () const
 
void SetAddAmbientLight (bool b)
 
float GetSimulationSpeed () const
 
void SetSimulationSpeed (float f)
 
bool GetRenderSelectionOverlay () const
 
void SetRenderSelectionOverlay (bool b)
 
bool GetRenderVisualizers () const
 
void SetRenderVisualizers (bool b)
 
bool GetRenderShapeIcons () const
 
void SetRenderShapeIcons (bool b)
 
bool GetPickTransparent () const
 
void SetPickTransparent (bool b)
 
void SetActiveParent (xiiUuid object)
 Specifies which object is the 'active parent', which is the object under which newly created objects should be parented.
 
xiiUuid GetActiveParent () const
 Returns the object under which newly created objects should be parented.
 
void SetGlobalTransform (const xiiDocumentObject *pObject, const xiiTransform &t, xiiUInt8 uiTransformationChanges) const
 Sets the new global transformation of the given object. The transformationChanges bitmask (of type TransformationChanges) allows to tell the system that, e.g. only translation has changed and thus some work can be spared.
 
void SetGlobalTransformParentOnly (const xiiDocumentObject *pObject, const xiiTransform &t, xiiUInt8 uiTransformationChanges) const
 Same as SetGlobalTransform, except that all children will keep their current global transform (thus their local transforms are adjusted)
 
xiiTransform GetGlobalTransform (const xiiDocumentObject *pObject) const
 Returns a cached value for the global transform of the given object, if available. Otherwise it calls ComputeGlobalTransform().
 
xiiTransform ComputeGlobalTransform (const xiiDocumentObject *pObject) const
 Computes the global transform of the parent and combines it with the local transform of the given object. This function does not return a cached value, but always computes it. It does update the internal cache for later reads though.
 
virtual xiiResult ComputeObjectTransformation (const xiiDocumentObject *pObject, xiiTransform &out_result) const override
 Traverses the pObject hierarchy up until it hits a xiiGameObject, then computes the global transform of that.
 
- Public Member Functions inherited from xiiAssetDocument
 xiiAssetDocument (xiiStringView sDocumentPath, xiiDocumentObjectManager *pObjectManager, xiiAssetDocEngineConnection engineConnectionType)
 
EngineStatus GetEngineStatus () const
 Returns the current state of the engine process side of this document.
 
xiiStatus WaitForEngineStatusLoaded () const
 Waits for GetEngineStatus to return Loaded or returns a failure reason.
 
virtual xiiVariant GetCreateEngineMetaData () const
 Passed into xiiEngineProcessDocumentContext::Initialize on the engine process side. Allows the document to provide additional data to the engine process during context creation.
 
bool SendMessageToEngine (xiiEditorEngineDocumentMsg *pMessage) const
 Sends a message to the corresponding xiiEngineProcessDocumentContext on the engine process.
 
xiiEditorEngineConnectionGetEditorEngineConnection () const
 Returns the xiiEditorEngineConnection for this document.
 
void AddSyncObject (xiiEditorEngineSyncObject *pSync) const
 Registers a sync object for this document. It will be mirrored to the xiiEngineProcessDocumentContext on the engine process.
 
void RemoveSyncObject (xiiEditorEngineSyncObject *pSync) const
 Removes a previously registered sync object. It will be removed on the engine process side.
 
xiiEditorEngineSyncObjectFindSyncObject (const xiiUuid &guid) const
 Returns the sync object registered under the given guid.
 
xiiEditorEngineSyncObjectFindSyncObject (const xiiRTTI *pType) const
 Returns the first sync object registered with the given type.
 
void SyncObjectsToEngine () const
 Sends messages to sync all sync objects to the engine process side.
 
void SendDocumentOpenMessage (bool bOpen)
 
virtual void SetCommonAssetUiState (xiiCommonAssetUiState::Enum state, double value)
 Override this to handle a change to a common asset state differently.
 
virtual double GetCommonAssetUiState (xiiCommonAssetUiState::Enum state) const
 Override this to return custom values for a common asset state.
 
xiiAssetDocumentManagerGetAssetDocumentManager () const
 
const xiiAssetDocumentInfoGetAssetDocumentInfo () const
 
xiiBitflags< xiiAssetDocumentFlagsGetAssetFlags () const
 
const xiiAssetDocumentTypeDescriptorGetAssetDocumentTypeDescriptor () const
 
xiiTransformStatus TransformAsset (xiiBitflags< xiiTransformFlags > transformFlags, const xiiPlatformProfile *pAssetProfile=nullptr)
 Transforms an asset. Typically not called manually but by the curator which takes care of dependencies first.
 
xiiTransformStatus CreateThumbnail ()
 Updates the thumbnail of the asset. Should never be called manually. Called only by the curator which takes care of dependencies first.
 
xiiUInt16 GetAssetTypeVersion () const
 Returns the RTTI type version of this asset document type. E.g. when the algorithm to transform an asset changes, Increase the RTTI version. This will ensure that assets get re-transformed, even though their settings and dependencies might not have changed.
 
- Public Member Functions inherited from xiiDocument
 xiiDocument (xiiStringView sPath, xiiDocumentObjectManager *pDocumentObjectManagerImpl)
 
bool IsModified () const
 
bool IsReadOnly () const
 
const xiiUuid GetGuid () const
 
const xiiDocumentObjectManagerGetObjectManager () const
 
xiiDocumentObjectManagerGetObjectManager ()
 
xiiSelectionManagerGetSelectionManager () const
 
xiiCommandHistoryGetCommandHistory () const
 
virtual xiiObjectAccessorBaseGetObjectAccessor () const
 
void BroadcastInterDocumentMessage (xiiReflectedClass *pMessage, xiiDocument *pSender)
 This will deliver the message to all open documents. The documents may respond, e.g. by modifying the content of the message.
 
virtual void DeleteSelectedObjects () const
 
const xiiSet< xiiString > & GetUnknownObjectTypes () const
 
xiiUInt32 GetUnknownObjectTypeInstances () const
 
void SetAddToResetFilesList (bool b)
 If disabled, this document will not be put into the recent files list.
 
bool GetAddToRecentFilesList () const
 Whether this document shall be put into the recent files list.
 
void ShowDocumentStatus (const xiiFormatString &msg) const
 Broadcasts a status message event. The window that displays the document may show this in some form, e.g. in the status bar.
 
xiiStringView GetDocumentPath () const
 Returns the absolute path to the document.
 
xiiStatus SaveDocument (bool bForce=false)
 Saves the document, if it is modified. If bForce is true, the document will be written, even if it is not considered modified.
 
xiiTaskGroupID SaveDocumentAsync (AfterSaveCallback callback, bool bForce=false)
 
void DocumentRenamed (xiiStringView sNewDocumentPath)
 
xiiStatus LoadDocument ()
 
void EnsureVisible ()
 Brings the corresponding window to the front.
 
xiiDocumentManagerGetDocumentManager () const
 
bool HasWindowBeenRequested () const
 
const xiiDocumentTypeDescriptorGetDocumentTypeDescriptor () const
 
xiiStringView GetDocumentTypeName () const
 Returns the document's type name. Same as GetDocumentTypeDescriptor()->m_sDocumentTypeName.
 
const xiiDocumentInfoGetDocumentInfo () const
 
bool IsMainDocument () const
 Returns whether this document is a main document, i.e. self contained.
 
bool IsSubDocument () const
 Returns whether this document is a sub-document, i.e. is part of another document.
 
const xiiDocumentGetMainDocument () const
 In case this is a sub-document, returns the main document this belongs to. Otherwise 'this' is returned.
 
const xiiDocumentGetActiveSubDocument () const
 At any given time, only the active sub-document can be edited. This returns the active sub-document which can also be this document itself. Changes to the active sub-document are generally triggered by xiiDocumentObjectStructureEvent::Type::AfterReset.
 
xiiDocumentGetMainDocument ()
 
xiiDocumentGetActiveSubDocument ()
 
void RevertPrefabs (xiiArrayPtr< const xiiDocumentObject * > selection)
 Resets the given objects to their template prefab state, if they have local modifications.
 
virtual xiiStatus CreatePrefabDocument (xiiStringView sFile, xiiArrayPtr< const xiiDocumentObject * > rootObjects, const xiiUuid &invPrefabSeed, xiiUuid &out_newDocumentGuid, xiiDelegate< void(xiiAbstractObjectNode *)> adjustGraphNodeCB={}, bool bKeepOpen=false, xiiDelegate< void(xiiAbstractObjectGraph &graph, xiiDynamicArray< xiiAbstractObjectNode * > &graphRootNodes)> finalizeGraphCB={})
 
- Public Member Functions inherited from xiiReflectedClass
virtual const xiiRTTIGetDynamicRTTI () const
 
bool IsInstanceOf (const xiiRTTI *pType) const
 Returns whether the type of this instance is of the given type or derived from it.
 
template<typename T>
XII_ALWAYS_INLINE bool IsInstanceOf () const
 Returns whether the type of this instance is of the given type or derived from it.
 

Public Attributes

xiiEvent< const xiiScene2LayerEvent & > m_LayerEvents
 
- Public Attributes inherited from xiiGameObjectDocument
xiiEvent< const xiiGameObjectEvent & > m_GameObjectEvents
 
xiiUniquePtr< xiiObjectMetaData< xiiUuid, xiiGameObjectMetaData > > m_GameObjectMetaData
 
- Public Attributes inherited from xiiAssetDocument
xiiEvent< const xiiEditorEngineDocumentMsg * > m_ProcessMessageEvent
 
xiiEvent< const xiiCommonAssetUiState & > m_CommonAssetUiChangeEvent
 Used to broadcast state change events for common asset states.
 
- Public Attributes inherited from xiiDocument
xiiUniquePtr< xiiObjectMetaData< xiiUuid, xiiDocumentObjectMetaData > > m_DocumentObjectMetaData
 
xiiEvent< const xiiDocumentEvent & > m_EventsOne
 
xiiEvent< const xiiObjectAccessorChangeEvent & > m_ObjectAccessorChangeEvents
 

Friends

class xiiSceneLayer
 

Additional Inherited Members

- Public Types inherited from xiiSceneDocument
enum class  DocumentType { Scene , Prefab , Layer }
 
enum class  ShowOrHide { Show , Hide }
 
enum class  EngineStatus { Unsupported , Disconnected , Initializing , Loaded }
 
using AfterSaveCallback = xiiDelegate<void(xiiDocument*, xiiStatus)>
 
static xiiTransform QueryLocalTransform (const xiiDocumentObject *pObject)
 Retrieves the local transform property values from the object and combines it into one xiiTransform.
 
static xiiSimdTransform QueryLocalTransformSimd (const xiiDocumentObject *pObject)
 
static xiiStatus ReadDocument (xiiStringView sDocumentPath, xiiUniquePtr< xiiAbstractObjectGraph > &ref_pHeader, xiiUniquePtr< xiiAbstractObjectGraph > &ref_pObjects, xiiUniquePtr< xiiAbstractObjectGraph > &ref_pTypes)
 
static xiiStatus ReadAndRegisterTypes (const xiiAbstractObjectGraph &types)
 
- Static Public Member Functions inherited from xiiNoBase
static const xiiRTTIGetStaticRTTI ()
 
- Static Public Attributes inherited from xiiGameObjectDocument
static xiiEvent< const xiiGameObjectDocumentEvent & > s_GameObjectDocumentEvents
 
- Static Public Attributes inherited from xiiDocument
static xiiEvent< const xiiDocumentEvent & > s_EventsAny
 
- Protected Member Functions inherited from xiiSceneDocument
void SetGameMode (GameMode::Enum mode)
 
virtual void UpdatePrefabObject (xiiDocumentObject *pObject, const xiiUuid &PrefabAsset, const xiiUuid &PrefabSeed, xiiStringView sBasePrefab) override
 
virtual void UpdateAssetDocumentInfo (xiiAssetDocumentInfo *pInfo) const override
 Override this to add custom data (e.g. additional file dependencies) to the info struct.
 
template<typename Func>
void ApplyRecursive (const xiiDocumentObject *pObject, Func f)
 
void EnsureSettingsObjectExist ()
 
void DocumentObjectMetaDataEventHandler (const xiiObjectMetaData< xiiUuid, xiiDocumentObjectMetaData >::EventData &e)
 
void EngineConnectionEventHandler (const xiiEditorEngineProcessConnection::Event &e)
 
void ToolsProjectEventHandler (const xiiToolsProjectEvent &e)
 
xiiStatus RequestExportScene (xiiStringView sTargetFile, const xiiAssetFileHeader &header)
 
virtual xiiTransformStatus InternalTransformAsset (xiiStreamWriter &stream, xiiStringView sOutputTag, const xiiPlatformProfile *pAssetProfile, const xiiAssetFileHeader &AssetHeader, xiiBitflags< xiiTransformFlags > transformFlags) override
 Override this and write the transformed file for the given szOutputTag into the given stream.
 
xiiTransformStatus InternalCreateThumbnail (const ThumbnailInfo &ThumbnailInfo) override
 Override this function to generate a thumbnail. Only called if GetAssetFlags returns xiiAssetDocumentFlags::SupportsThumbnail.
 
void SyncObjectHiddenState ()
 
void SyncObjectHiddenState (xiiDocumentObject *pObject)
 
void UpdateObjectDebugTargets ()
 Finds all objects that are actively being 'debugged' (or visualized) by the editor and thus should get the debug visualization flag in the runtime.
 
void SelectionManagerEventHandler (const xiiSelectionManagerEvent &e)
 
virtual void OnInterDocumentMessage (xiiReflectedClass *pMessage, xiiDocument *pSender) override
 Communication with other document types.
 
void GatherObjectsOfType (xiiDocumentObject *pRoot, xiiGatherObjectsOfTypeMsgInterDoc *pMsg) const
 
- Protected Member Functions inherited from xiiGameObjectDocument
void SubscribeGameObjectEventHandlers ()
 
void UnsubscribeGameObjectEventHandlers ()
 
void GameObjectDocumentEventHandler (const xiiGameObjectDocumentEvent &e)
 
void InvalidateGlobalTransformValue (const xiiDocumentObject *pObject) const
 
virtual void AttachMetaDataBeforeSaving (xiiAbstractObjectGraph &graph) const override
 
virtual void RestoreMetaDataAfterLoading (const xiiAbstractObjectGraph &graph, bool bUndoable) override
 
- Protected Member Functions inherited from xiiAssetDocument
void EngineConnectionEventHandler (const xiiEditorEngineProcessConnection::Event &e)
 
void AddPrefabDependencies (const xiiDocumentObject *pObject, xiiAssetDocumentInfo *pInfo) const
 Adds all prefab dependencies to the xiiAssetDocumentInfo object. Called automatically by UpdateAssetDocumentInfo()
 
void AddReferences (const xiiDocumentObject *pObject, xiiAssetDocumentInfo *pInfo, bool bInsidePrefab) const
 Crawls through all asset properties of pObject and adds all string properties that have a xiiAssetBrowserAttribute as a dependency to pInfo. Automatically called by UpdateAssetDocumentInfo()
 
virtual xiiDocumentInfoCreateDocumentInfo () override
 
xiiTransformStatus DoTransformAsset (const xiiPlatformProfile *pAssetProfile, xiiBitflags< xiiTransformFlags > transformFlags)
 
xiiUInt64 GetDocumentHash () const
 Computes the hash from all document objects.
 
void GetChildHash (const xiiDocumentObject *pObject, xiiUInt64 &inout_uiHash) const
 Computes the hash for one document object and combines it with the given hash.
 
virtual void InternalGetMetaDataHash (const xiiDocumentObject *pObject, xiiUInt64 &inout_uiHash) const
 Computes the hash for transform relevant meta data of the given document object and combines it with the given hash.
 
virtual void InternalAfterSaveDocument () override
 Implements auto transform on save.
 
xiiString GetThumbnailFilePath (xiiStringView sSubAssetName=xiiStringView()) const
 Returns the full path to the jpg file in which the thumbnail for this asset is supposed to be.
 
void InvalidateAssetThumbnail (xiiStringView sSubAssetName=xiiStringView()) const
 Should be called after manually changing the thumbnail, such that the system will reload it.
 
xiiStatus RemoteCreateThumbnail (const ThumbnailInfo &thumbnailInfo, xiiArrayPtr< xiiStringView > viewExclusionTags) const
 Requests the engine side to render a thumbnail, will call SaveThumbnail on success.
 
xiiStatus RemoteCreateThumbnail (const ThumbnailInfo &thumbnailInfo) const
 
xiiStatus SaveThumbnail (const xiiImage &img, const ThumbnailInfo &thumbnailInfo) const
 Saves the given image as the new thumbnail for the asset.
 
xiiStatus SaveThumbnail (const QImage &img, const ThumbnailInfo &thumbnailInfo) const
 Saves the given image as the new thumbnail for the asset.
 
void AppendThumbnailInfo (xiiStringView sThumbnailFile, const ThumbnailInfo &thumbnailInfo) const
 Appends an asset header containing the thumbnail hash to the file. Each thumbnail is appended by it to check up-to-date state.
 
xiiStatus RemoteExport (const xiiAssetFileHeader &header, xiiStringView sOutputTarget) const
 
- Protected Member Functions inherited from xiiDocument
void SetModified (bool b)
 
void SetReadOnly (bool b)
 
virtual xiiStatus InternalLoadDocument ()
 
virtual void BeforeClosing ()
 
void SetUnknownObjectTypes (const xiiSet< xiiString > &Types, xiiUInt32 uiInstances)
 
virtual void UpdatePrefabsRecursive (xiiDocumentObject *pObject)
 
- Protected Attributes inherited from xiiSceneDocument
DocumentType m_DocumentType = DocumentType::Scene
 
GameMode::Enum m_GameMode
 
GameModeData m_GameModeData [3]
 
xiiDocumentObjectMirror m_ObjectMirror
 
xiiRttiConverterContext m_Context
 
bool m_bStoreSelectionChange = true
 
xiiInt8 m_iAllowSelectionChanges = -1
 
xiiCopyOnBroadcastEvent< constxiiSelectionManagerEvent & >::Unsubscriber m_SelectionHandlerUnsubscriber
 
xiiDeque< SelectionHistorym_SelectionStack
 
- Protected Attributes inherited from xiiGameObjectDocument
GameModeData m_CurrentMode
 
xiiEventSubscriptionID m_SelectionManagerEventHandlerID
 
xiiEventSubscriptionID m_ObjectPropertyEventHandlerID
 
xiiEventSubscriptionID m_ObjectStructureEventHandlerID
 
xiiEventSubscriptionID m_ObjectEventHandlerID
 
- Protected Attributes inherited from xiiAssetDocument
xiiUniquePtr< xiiIPCObjectMirrorEditorm_pMirror
 
EngineStatus m_EngineStatus
 
xiiAssetDocEngineConnection m_EngineConnectionType = xiiAssetDocEngineConnection::None
 
xiiEditorEngineConnectionm_pEngineConnection
 
xiiHashTable< xiiUuid, xiiEditorEngineSyncObject * > m_AllSyncObjects
 
xiiDeque< xiiEditorEngineSyncObject * > m_SyncObjects
 
xiiHybridArray< xiiUuid, 32 > m_DeletedObjects
 
xiiUInt32 m_uiCommonAssetStateFlags = 0
 
- Protected Attributes inherited from xiiDocument
xiiUniquePtr< xiiDocumentObjectManagerm_pObjectManager
 
xiiUniquePtr< xiiCommandHistorym_pCommandHistory
 
xiiUniquePtr< xiiSelectionManagerm_pSelectionManager
 
xiiUniquePtr< xiiObjectCommandAccessorm_pObjectAccessor
 Default object accessor used by every doc.
 
xiiDocumentInfom_pDocumentInfo = nullptr
 
const xiiDocumentTypeDescriptorm_pTypeDescriptor = nullptr
 
xiiDocumentm_pHostDocument = nullptr
 
xiiDocumentm_pActiveSubDocument = nullptr
 

Member Function Documentation

◆ GetRedirectedGameObjectDoc()

xiiGameObjectDocument * xiiScene2Document::GetRedirectedGameObjectDoc ( )
overridevirtual

In case a document consists of multiple layers, this redirection is necessary to execute actions on the active layer.

Reimplemented from xiiGameObjectDocument.

◆ GetSettingsObject()

const xiiDocumentObject * xiiScene2Document::GetSettingsObject ( ) const
overridevirtual

This function is overwritten so that after redirecting to the active document this still accesses the original content and is not redirected.

Reimplemented from xiiSceneDocument.

◆ HandleEngineMessage()

void xiiScene2Document::HandleEngineMessage ( const xiiEditorEngineDocumentMsg * pMsg)
overridevirtual

Handles all messages received from the corresponding xiiEngineProcessDocumentContext on the engine process.

Reimplemented from xiiSceneDocument.

◆ InitializeAfterLoading()

void xiiScene2Document::InitializeAfterLoading ( bool bFirstTimeCreation)
overridevirtual

Reimplemented from xiiSceneDocument.

◆ InitializeAfterLoadingAndSaving()

void xiiScene2Document::InitializeAfterLoadingAndSaving ( )
overridevirtual

Reimplemented from xiiAssetDocument.

◆ InternalSaveDocument()

xiiTaskGroupID xiiScene2Document::InternalSaveDocument ( AfterSaveCallback callback)
overridevirtual

Overrides the base function to call UpdateAssetDocumentInfo() to update the settings hash.

Reimplemented from xiiAssetDocument.

◆ InternalTransformAsset()

xiiTransformStatus xiiScene2Document::InternalTransformAsset ( xiiStringView sTargetFile,
xiiStringView sOutputTag,
const xiiPlatformProfile * pAssetProfile,
const xiiAssetFileHeader & AssetHeader,
xiiBitflags< xiiTransformFlags > transformFlags )
overridevirtual

Only override this function, if the transformed file for the given szOutputTag must be written from another process.

szTargetFile is where the transformed asset should be written to. The overriding function must ensure to first write AssetHeader to the file, to make it a valid asset file or provide a custom xiiAssetDocumentManager::IsOutputUpToDate function. See xiiTransformFlags for definition of transform flags.

Reimplemented from xiiSceneDocument.

◆ SendGameWorldToEngine()

void xiiScene2Document::SendGameWorldToEngine ( )
overridevirtual

Sends the current state of the scene to the engine process. This is typically done after scene load or when the world might have deviated on the engine side (after play the game etc.)

Reimplemented from xiiGameObjectDocument.

◆ UndoSelection()

void xiiScene2Document::UndoSelection ( )
overridevirtual

Reimplemented from xiiSceneDocument.


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