Handles Prefab Focus mode, determining which prefab file entity changes will target.
More...
#include <PrefabFocusHandler.h>
Inherits PrefabFocusPublicRequestBus::Handler, AzToolsFramework::Prefab::PrefabFocusInterface, AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler, EditorEntityContextNotificationBus::Handler, and EditorEntityInfoNotificationBus::Handler.
|
| AZ_CLASS_ALLOCATOR (PrefabFocusHandler, AZ::SystemAllocator) |
|
void | RegisterPrefabFocusInterface () |
|
void | UnregisterPrefabFocusInterface () |
|
void | InitializeEditorInterfaces () override |
|
PrefabFocusOperationResult | FocusOnPrefabInstanceOwningEntityId (AZ::EntityId entityId) override |
|
TemplateId | GetFocusedPrefabTemplateId (AzFramework::EntityContextId entityContextId) const override |
|
InstanceOptionalReference | GetFocusedPrefabInstance (AzFramework::EntityContextId entityContextId) const override |
|
bool | IsFocusedPrefabInstanceReadOnly (AzFramework::EntityContextId entityContextId) const override |
|
LinkId | PrependPathFromFocusedInstanceToPatchPaths (PrefabDom &patches, AZ::EntityId entityId) const override |
|
PrefabFocusOperationResult | FocusOnOwningPrefab (AZ::EntityId entityId) override |
|
PrefabFocusOperationResult | FocusOnParentOfFocusedPrefab (AzFramework::EntityContextId entityContextId) override |
|
PrefabFocusOperationResult | FocusOnPathIndex (AzFramework::EntityContextId entityContextId, int index) override |
|
PrefabFocusOperationResult | SetOwningPrefabInstanceOpenState (AZ::EntityId entityId, bool openState) override |
|
AZ::EntityId | GetFocusedPrefabContainerEntityId (AzFramework::EntityContextId entityContextId) const override |
|
bool | IsOwningPrefabBeingFocused (AZ::EntityId entityId) const override |
|
bool | IsOwningPrefabInFocusHierarchy (AZ::EntityId entityId) const override |
|
const AZ::IO::Path & | GetPrefabFocusPath (AzFramework::EntityContextId entityContextId) const override |
|
const int | GetPrefabFocusPathLength (AzFramework::EntityContextId entityContextId) const override |
|
void | SetPrefabEditScope (AzFramework::EntityContextId entityContextId, PrefabEditScope mode) override |
|
void | OnPrepareForContextReset () override |
|
void | OnEntityInfoUpdatedName (AZ::EntityId entityId, const AZStd::string &name) override |
|
void | OnPrefabInstancePropagationEnd () override |
|
void | OnPrefabTemplateDirtyFlagUpdated (TemplateId templateId, bool status) override |
|
|
static void | Reflect (AZ::ReflectContext *context) |
|
Handles Prefab Focus mode, determining which prefab file entity changes will target.
◆ FocusOnPrefabInstanceOwningEntityId()
PrefabFocusOperationResult AzToolsFramework::Prefab::PrefabFocusHandler::FocusOnPrefabInstanceOwningEntityId |
( |
AZ::EntityId |
entityId | ) |
|
|
overridevirtual |
Sets the focused instance to the owning instance of the entity id provided. If the entity id is invalid, then focus on the root prefab instance.
- Parameters
-
EntityId | The entity id of the entity whose owning instance we want the prefab system to focus on. |
- Returns
- PrefabFocusOperationResult that shows if the operation succeeds.
Implements AzToolsFramework::Prefab::PrefabFocusInterface.
◆ GetFocusedPrefabInstance()
InstanceOptionalReference AzToolsFramework::Prefab::PrefabFocusHandler::GetFocusedPrefabInstance |
( |
AzFramework::EntityContextId |
entityContextId | ) |
const |
|
overridevirtual |
◆ GetFocusedPrefabTemplateId()
TemplateId AzToolsFramework::Prefab::PrefabFocusHandler::GetFocusedPrefabTemplateId |
( |
AzFramework::EntityContextId |
entityContextId | ) |
const |
|
overridevirtual |
◆ InitializeEditorInterfaces()
void AzToolsFramework::Prefab::PrefabFocusHandler::InitializeEditorInterfaces |
( |
| ) |
|
|
overridevirtual |
Initializes the editor interfaces for Prefab Focus mode. If this is not called on initialization, the Prefab Focus Mode functions will still work but won't trigger the Editor APIs to visualize focus mode on the UI.
Implements AzToolsFramework::Prefab::PrefabFocusInterface.
◆ IsFocusedPrefabInstanceReadOnly()
bool AzToolsFramework::Prefab::PrefabFocusHandler::IsFocusedPrefabInstanceReadOnly |
( |
AzFramework::EntityContextId |
entityContextId | ) |
const |
|
overridevirtual |
Returns whether the currently focused prefab instance is read-only.
- Parameters
-
EntityContextId | The entity context id. |
- Returns
- True if the currently focused prefab instance is read-only, false otherwise.
Implements AzToolsFramework::Prefab::PrefabFocusInterface.
◆ PrependPathFromFocusedInstanceToPatchPaths()
LinkId AzToolsFramework::Prefab::PrefabFocusHandler::PrependPathFromFocusedInstanceToPatchPaths |
( |
PrefabDom & |
patches, |
|
|
AZ::EntityId |
entityId |
|
) |
| const |
|
overridevirtual |
Prepends the path from the focused instance to entity id into the provided patch array.
- Parameters
-
patches | The provided patch array to prepend path to. |
- Returns
- LinkId stored in the instance closest to the focused instance in hierarchy.
Implements AzToolsFramework::Prefab::PrefabFocusInterface.
The documentation for this class was generated from the following file:
- Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabFocusHandler.h