Integrating latest 47acbe8
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
#include <AzToolsFramework/Entity/EditorEntityInfoBus.h>
|
||||
#include <AzToolsFramework/Slice/SliceMetadataEntityContextComponent.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabSystemComponent.h>
|
||||
#include <AzToolsFramework/UI/Prefab/PrefabIntegrationManager.h>
|
||||
#include <AzToolsFramework/Component/EditorComponentAPIComponent.h>
|
||||
#include <AzToolsFramework/Component/EditorLevelComponentAPIComponent.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityActionComponent.h>
|
||||
@@ -66,6 +67,7 @@
|
||||
#include <AzToolsFramework/ViewportSelection/EditorTransformComponentSelectionRequestBus.h>
|
||||
#include <AzToolsFramework/AssetEditor/AssetEditorBus.h>
|
||||
#include <AzToolsFramework/Render/EditorIntersectorComponent.h>
|
||||
#include <AzToolsFramework/UI/EditorEntityUi/EditorEntityUiSystemComponent.h>
|
||||
|
||||
#include <QtWidgets/QMessageBox>
|
||||
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: 'QFileInfo::d_ptr': class 'QSharedDataPointer<QFileInfoPrivate>' needs to have dll-interface to be used by clients of class 'QFileInfo'
|
||||
@@ -93,6 +95,9 @@ namespace AzToolsFramework
|
||||
|
||||
static const char* s_startupLogWindow = "Startup";
|
||||
|
||||
static const char* s_prefabSystemKey = "/Amazon/Editor/Preferences/EnablePrefabSystem";
|
||||
static const char* s_legacySlicesAssertKey = "/Amazon/Editor/Preferences/ShouldAssertForLegacySlicesUsage";
|
||||
|
||||
template<typename IdContainerType>
|
||||
void DeleteEntities(const IdContainerType& entityIds)
|
||||
{
|
||||
@@ -206,6 +211,19 @@ namespace AzToolsFramework
|
||||
}
|
||||
};
|
||||
|
||||
struct EditorEventsBusHandler final
|
||||
: public EditorEventsBus::Handler
|
||||
, public AZ::BehaviorEBusHandler
|
||||
{
|
||||
AZ_EBUS_BEHAVIOR_BINDER(EditorEventsBusHandler, "{352F80BB-469A-40B6-B322-FE57AB51E4DA}", AZ::SystemAllocator,
|
||||
NotifyRegisterViews);
|
||||
|
||||
void NotifyRegisterViews() override
|
||||
{
|
||||
Call(FN_NotifyRegisterViews);
|
||||
}
|
||||
};
|
||||
|
||||
} // Internal
|
||||
|
||||
#define AZ_MAX_ENGINE_VERSION_LEN 64
|
||||
@@ -346,6 +364,7 @@ namespace AzToolsFramework
|
||||
|
||||
components.insert(components.end(), {
|
||||
azrtti_typeid<EditorEntityContextComponent>(),
|
||||
azrtti_typeid<Components::EditorEntityUiSystemComponent>(),
|
||||
azrtti_typeid<SliceMetadataEntityContextComponent>(),
|
||||
azrtti_typeid<Prefab::PrefabSystemComponent>(),
|
||||
azrtti_typeid<EditorEntityFixupComponent>(),
|
||||
@@ -440,6 +459,7 @@ namespace AzToolsFramework
|
||||
QTreeViewWithStateSaving::Reflect(context);
|
||||
QWidgetSavedState::Reflect(context);
|
||||
SliceUtilities::Reflect(context);
|
||||
Prefab::PrefabIntegrationManager::Reflect(context);
|
||||
|
||||
ComponentModeFramework::ComponentModeDelegate::Reflect(context);
|
||||
|
||||
@@ -499,6 +519,14 @@ namespace AzToolsFramework
|
||||
->Event("UnregisterViewPane", &EditorRequests::UnregisterViewPane)
|
||||
;
|
||||
|
||||
behaviorContext->EBus<EditorEventsBus>("EditorEventBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
->Attribute(AZ::Script::Attributes::Module, "editor")
|
||||
->Handler<Internal::EditorEventsBusHandler>()
|
||||
->Event("NotifyRegisterViews", &EditorEvents::NotifyRegisterViews)
|
||||
;
|
||||
|
||||
behaviorContext->EBus<ViewPaneCallbackBus>("ViewPaneCallbackBus")
|
||||
->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation)
|
||||
->Attribute(AZ::Script::Attributes::Category, "Editor")
|
||||
@@ -1741,6 +1769,26 @@ namespace AzToolsFramework
|
||||
return m_engineConfigImpl->GetEngineVersion();
|
||||
}
|
||||
|
||||
bool ToolsApplication::IsLegacySliceSystemEnabled() const
|
||||
{
|
||||
bool value = false;
|
||||
if (auto* registry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
registry->Get(value, Internal::s_prefabSystemKey);
|
||||
}
|
||||
return !value;
|
||||
}
|
||||
|
||||
bool ToolsApplication::ShouldAssertForLegacySlicesUsage() const
|
||||
{
|
||||
bool value = false;
|
||||
if (auto* registry = AZ::SettingsRegistry::Get())
|
||||
{
|
||||
registry->Get(value, Internal::s_legacySlicesAssertKey);
|
||||
}
|
||||
return value;
|
||||
}
|
||||
|
||||
void ToolsApplication::CreateAndAddEntityFromComponentTags(const AZStd::vector<AZ::Crc32>& requiredTags, const char* entityName)
|
||||
{
|
||||
if (!entityName || !entityName[0])
|
||||
|
||||
@@ -145,6 +145,8 @@ namespace AzToolsFramework
|
||||
bool IsEditorInIsolationMode() override;
|
||||
const char* GetEngineRootPath() const override;
|
||||
const char* GetEngineVersion() const override;
|
||||
bool IsLegacySliceSystemEnabled() const override;
|
||||
bool ShouldAssertForLegacySlicesUsage() const override;
|
||||
|
||||
void CreateAndAddEntityFromComponentTags(const AZStd::vector<AZ::Crc32>& requiredTags, const char* entityName) override;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user