diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp index af418c6e0d..0fcbac3204 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedPropertyItem.cpp @@ -229,28 +229,16 @@ void ReflectedPropertyItem::SetVariable(IVariable *var) break; case ePropertyFloat: case ePropertyAngle: - //if the Description has a valid global enumDB lookup, edit as an enum, otherwise use normal float editor - if (desc.m_pEnumDBItem) - m_reflectedVarAdapter = new ReflectedVarDBEnumAdapter; - else - m_reflectedVarAdapter = new ReflectedVarFloatAdapter; + m_reflectedVarAdapter = new ReflectedVarFloatAdapter; break; case ePropertyInt: - //if the Description has a valid global enumDB lookup, edit as an enum, otherwise use normal int editor - if (desc.m_pEnumDBItem) - m_reflectedVarAdapter = new ReflectedVarDBEnumAdapter; - else - m_reflectedVarAdapter = new ReflectedVarIntAdapter; + m_reflectedVarAdapter = new ReflectedVarIntAdapter; break; case ePropertyBool: m_reflectedVarAdapter = new ReflectedVarBoolAdapter; break; case ePropertyString: - //if the Description has a valid global enumDB lookup, edit as an enum, otherwise use normal string editor - if (desc.m_pEnumDBItem) - m_reflectedVarAdapter = new ReflectedVarDBEnumAdapter; - else - m_reflectedVarAdapter = new ReflectedVarStringAdapter; + m_reflectedVarAdapter = new ReflectedVarStringAdapter; break; case ePropertySelection: m_reflectedVarAdapter = new ReflectedVarEnumAdapter; diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp index 2320938f08..8eefbbc8eb 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.cpp @@ -15,7 +15,6 @@ // Editor #include "ReflectedPropertyCtrl.h" -#include "UIEnumsDatabase.h" namespace { @@ -254,41 +253,6 @@ void ReflectedVarEnumAdapter::OnVariableChange([[maybe_unused]] IVariable* pVari } } -void ReflectedVarDBEnumAdapter::SetVariable(IVariable *pVariable) -{ - Prop::Description desc(pVariable); - m_pEnumDBItem = desc.m_pEnumDBItem; - m_reflectedVar.reset(new CReflectedVarEnum(pVariable->GetHumanName().toUtf8().data())); - if (m_pEnumDBItem) - { - for (int i = 0; i < m_pEnumDBItem->strings.size(); i++) - { - QString name = m_pEnumDBItem->strings[i]; - m_reflectedVar->addEnum( m_pEnumDBItem->NameToValue(name).toUtf8().data(), name.toUtf8().data() ); - } - } -} - -void ReflectedVarDBEnumAdapter::SyncReflectedVarToIVar(IVariable *pVariable) -{ - const AZStd::string valueStr = pVariable->GetDisplayValue().toUtf8().data(); - const AZStd::string value = m_pEnumDBItem ? AZStd::string(m_pEnumDBItem->ValueToName(valueStr.c_str()).toUtf8().data()) : valueStr; - m_reflectedVar->setEnumByName(value); - -} - -void ReflectedVarDBEnumAdapter::SyncIVarToReflectedVar(IVariable *pVariable) -{ - QString iVarVal = m_reflectedVar->m_selectedEnumName.c_str(); - if (m_pEnumDBItem) - { - iVarVal = m_pEnumDBItem->NameToValue(iVarVal); - } - pVariable->SetDisplayValue(iVarVal); -} - - - void ReflectedVarVector2Adapter::SetVariable(IVariable *pVariable) { m_reflectedVar.reset(new CReflectedVarVector2(pVariable->GetHumanName().toUtf8().data())); diff --git a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h index 4bcd6dcaa3..807413226c 100644 --- a/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h +++ b/Code/Editor/Controls/ReflectedPropertyControl/ReflectedVarWrapper.h @@ -16,7 +16,6 @@ #include -struct CUIEnumsDatabase_SEnum; class ReflectedPropertyItem; // Class to wrap the CReflectedVars and sync them with corresponding IVariable. @@ -145,22 +144,6 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING bool m_updatingEnums; }; -class EDITOR_CORE_API ReflectedVarDBEnumAdapter - : public ReflectedVarAdapter -{ -public: - void SetVariable(IVariable* pVariable) override; - void SyncReflectedVarToIVar(IVariable* pVariable) override; - void SyncIVarToReflectedVar(IVariable* pVariable) override; - CReflectedVar* GetReflectedVar() override { return m_reflectedVar.data(); } -private: -AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - QScopedPointer > m_reflectedVar; -AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - - CUIEnumsDatabase_SEnum* m_pEnumDBItem; -}; - class EDITOR_CORE_API ReflectedVarVector2Adapter : public ReflectedVarAdapter { diff --git a/Code/Editor/CryEdit.cpp b/Code/Editor/CryEdit.cpp index b9081c3f90..982f8ba411 100644 --- a/Code/Editor/CryEdit.cpp +++ b/Code/Editor/CryEdit.cpp @@ -1709,7 +1709,6 @@ bool CCryEditApp::InitInstance() mainWindow->Initialize(); GetIEditor()->GetCommandManager()->RegisterAutoCommands(); - GetIEditor()->AddUIEnums(); mainWindowWrapper->enableSaveRestoreGeometry("O3DE", "O3DE", "mainWindowGeometry"); m_pDocManager->OnFileNew(); diff --git a/Code/Editor/CryEditPy.cpp b/Code/Editor/CryEditPy.cpp index a25a497a4e..5dea57c1ed 100644 --- a/Code/Editor/CryEditPy.cpp +++ b/Code/Editor/CryEditPy.cpp @@ -26,7 +26,6 @@ #include "Core/QtEditorApplication.h" #include "CheckOutDialog.h" #include "GameEngine.h" -#include "UndoConfigSpec.h" #include "ViewManager.h" #include "EditorViewportCamera.h" @@ -369,21 +368,6 @@ namespace inline namespace Commands { - void PySetConfigSpec(int spec, int platform) - { - CUndo undo("Set Config Spec"); - if (CUndo::IsRecording()) - { - CUndo::Record(new CUndoConficSpec()); - } - GetIEditor()->SetEditorConfigSpec((ESystemConfigSpec)spec, (ESystemConfigPlatform)platform); - } - - int PyGetConfigSpec() - { - return static_cast(GetIEditor()->GetEditorConfigSpec()); - } - int PyGetConfigPlatform() { return static_cast(GetIEditor()->GetEditorConfigPlatform()); @@ -434,9 +418,7 @@ namespace AzToolsFramework addLegacyGeneral(behaviorContext->Method("set_current_view_rotation", PySetCurrentViewRotation, nullptr, "Sets the rotation of the current view as given x, y, z Euler angles in degrees.")); addLegacyGeneral(behaviorContext->Method("export_to_engine", CCryEditApp::Command_ExportToEngine, nullptr, "Exports the current level to the engine.")); - addLegacyGeneral(behaviorContext->Method("set_config_spec", PySetConfigSpec, nullptr, "Sets the system config spec and platform.")); addLegacyGeneral(behaviorContext->Method("get_config_platform", PyGetConfigPlatform, nullptr, "Gets the system config platform.")); - addLegacyGeneral(behaviorContext->Method("get_config_spec", PyGetConfigSpec, nullptr, "Gets the system config spec.")); addLegacyGeneral(behaviorContext->Method("set_result_to_success", PySetResultToSuccess, nullptr, "Sets the result of a script execution to success. Used only for Sandbox AutoTests.")); addLegacyGeneral(behaviorContext->Method("set_result_to_failure", PySetResultToFailure, nullptr, "Sets the result of a script execution to failure. Used only for Sandbox AutoTests.")); @@ -464,17 +446,6 @@ namespace AzToolsFramework }; addCheckoutDialog(behaviorContext->Method("enable_for_all", PyCheckOutDialogEnableForAll, nullptr, "Enables the 'Apply to all' button in the checkout dialog; useful for allowing the user to apply a decision to check out files to multiple, related operations.")); - behaviorContext->EnumProperty("SystemConfigSpec_Auto") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); - behaviorContext->EnumProperty("SystemConfigSpec_Low") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); - behaviorContext->EnumProperty("SystemConfigSpec_Medium") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); - behaviorContext->EnumProperty("SystemConfigSpec_High") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); - behaviorContext->EnumProperty("SystemConfigSpec_VeryHigh") - ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); - behaviorContext->EnumProperty("SystemConfigPlatform_InvalidPlatform") ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); behaviorContext->EnumProperty("SystemConfigPlatform_Pc") diff --git a/Code/Editor/EditorPreferencesPageGeneral.cpp b/Code/Editor/EditorPreferencesPageGeneral.cpp index 95b3bc4c50..642b9c37e7 100644 --- a/Code/Editor/EditorPreferencesPageGeneral.cpp +++ b/Code/Editor/EditorPreferencesPageGeneral.cpp @@ -30,7 +30,6 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize) serialize.Class() ->Version(3) ->Field("PreviewPanel", &GeneralSettings::m_previewPanel) - ->Field("ApplyConfigSpec", &GeneralSettings::m_applyConfigSpec) ->Field("EnableSourceControl", &GeneralSettings::m_enableSourceControl) ->Field("ClearConsole", &GeneralSettings::m_clearConsoleOnGameModeStart) ->Field("ConsoleBackgroundColorTheme", &GeneralSettings::m_consoleBackgroundColorTheme) @@ -81,7 +80,6 @@ void CEditorPreferencesPage_General::Reflect(AZ::SerializeContext& serialize) { editContext->Class("General Settings", "General Editor Preferences") ->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_previewPanel, "Show Geometry Preview Panel", "Show Geometry Preview Panel") - ->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_applyConfigSpec, "Hide objects by config spec", "Hide objects by config spec") ->DataElement(AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_enableSourceControl, "Enable Source Control", "Enable Source Control") ->DataElement( AZ::Edit::UIHandlers::CheckBox, &GeneralSettings::m_clearConsoleOnGameModeStart, "Clear Console at game startup", "Clear Console when game mode starts") @@ -157,7 +155,6 @@ void CEditorPreferencesPage_General::OnApply() { //general settings gSettings.bPreviewGeometryWindow = m_generalSettings.m_previewPanel; - gSettings.bApplyConfigSpecInEditor = m_generalSettings.m_applyConfigSpec; gSettings.enableSourceControl = m_generalSettings.m_enableSourceControl; gSettings.clearConsoleOnGameModeStart = m_generalSettings.m_clearConsoleOnGameModeStart; gSettings.consoleBackgroundColorTheme = m_generalSettings.m_consoleBackgroundColorTheme; @@ -195,7 +192,6 @@ void CEditorPreferencesPage_General::InitializeSettings() { //general settings m_generalSettings.m_previewPanel = gSettings.bPreviewGeometryWindow; - m_generalSettings.m_applyConfigSpec = gSettings.bApplyConfigSpecInEditor; m_generalSettings.m_enableSourceControl = gSettings.enableSourceControl; m_generalSettings.m_clearConsoleOnGameModeStart = gSettings.clearConsoleOnGameModeStart; m_generalSettings.m_consoleBackgroundColorTheme = gSettings.consoleBackgroundColorTheme; diff --git a/Code/Editor/EditorPreferencesPageGeneral.h b/Code/Editor/EditorPreferencesPageGeneral.h index 01700dea88..ff2ebf79f8 100644 --- a/Code/Editor/EditorPreferencesPageGeneral.h +++ b/Code/Editor/EditorPreferencesPageGeneral.h @@ -45,7 +45,6 @@ private: AZ_TYPE_INFO(GeneralSettings, "{C2AE8F6D-7AA6-499E-A3E8-ECCD0AC6F3D2}") bool m_previewPanel; - bool m_applyConfigSpec; bool m_enableSourceControl; bool m_clearConsoleOnGameModeStart; AzToolsFramework::ConsoleColorTheme m_consoleBackgroundColorTheme; diff --git a/Code/Editor/IEditor.h b/Code/Editor/IEditor.h index 52f8c1ac6f..da29b00f2d 100644 --- a/Code/Editor/IEditor.h +++ b/Code/Editor/IEditor.h @@ -46,7 +46,6 @@ class ICommandManager; class CEditorCommandManager; class CHyperGraphManager; class CConsoleSynchronization; -class CUIEnumsDatabase; struct ISourceControl; struct IEditorClassFactory; struct ITransformManipulator; @@ -660,15 +659,10 @@ struct IEditor //! Only returns true if source control is both available AND currently connected and functioning virtual bool IsSourceControlConnected() = 0; - virtual CUIEnumsDatabase* GetUIEnumsDatabase() = 0; - virtual void AddUIEnums() = 0; virtual void ReduceMemory() = 0; //! Export manager for exporting objects and a terrain from the game to DCC tools virtual IExportManager* GetExportManager() = 0; - //! Set current configuration spec of the editor. - virtual void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform) = 0; - virtual ESystemConfigSpec GetEditorConfigSpec() const = 0; virtual ESystemConfigPlatform GetEditorConfigPlatform() const = 0; virtual void ReloadTemplates() = 0; virtual void ShowStatusText(bool bEnable) = 0; diff --git a/Code/Editor/IEditorImpl.cpp b/Code/Editor/IEditorImpl.cpp index d3f881a252..05b74f3b05 100644 --- a/Code/Editor/IEditorImpl.cpp +++ b/Code/Editor/IEditorImpl.cpp @@ -51,7 +51,6 @@ #include "GameEngine.h" #include "ToolBox.h" #include "MainWindow.h" -#include "UIEnumsDatabase.h" #include "RenderHelpers/AxisHelper.h" #include "Settings.h" #include "Include/IObjectManager.h" @@ -116,7 +115,6 @@ CEditorImpl::CEditorImpl() , m_pErrorsDlg(nullptr) , m_pSourceControl(nullptr) , m_pSelectionTreeManager(nullptr) - , m_pUIEnumsDatabase(nullptr) , m_pConsoleSync(nullptr) , m_pSettingsManager(nullptr) , m_pLevelIndependentFileMan(nullptr) @@ -146,7 +144,6 @@ CEditorImpl::CEditorImpl() regCtx.pCommandManager = m_pCommandManager; regCtx.pClassFactory = m_pClassFactory; m_pEditorFileMonitor.reset(new CEditorFileMonitor()); - m_pUIEnumsDatabase = new CUIEnumsDatabase; m_pDisplaySettings = new CDisplaySettings; m_pDisplaySettings->LoadRegistry(); m_pPluginManager = new CPluginManager; @@ -298,7 +295,6 @@ CEditorImpl::~CEditorImpl() SAFE_DELETE(m_pCommandManager) SAFE_DELETE(m_pClassFactory) SAFE_DELETE(m_pLasLoadedLevelErrorReport) - SAFE_DELETE(m_pUIEnumsDatabase) SAFE_DELETE(m_pSettingsManager); @@ -1473,48 +1469,6 @@ IExportManager* CEditorImpl::GetExportManager() return m_pExportManager; } -void CEditorImpl::AddUIEnums() -{ - // Spec settings for shadow casting lights - AZStd::string SpecString[4]; - QStringList types; - types.push_back("Never=0"); - SpecString[0] = AZStd::string::format("VeryHigh Spec=%d", CONFIG_VERYHIGH_SPEC); - types.push_back(SpecString[0].c_str()); - SpecString[1] = AZStd::string::format("High Spec=%d", CONFIG_HIGH_SPEC); - types.push_back(SpecString[1].c_str()); - SpecString[2] = AZStd::string::format("Medium Spec=%d", CONFIG_MEDIUM_SPEC); - types.push_back(SpecString[2].c_str()); - SpecString[3] = AZStd::string::format("Low Spec=%d", CONFIG_LOW_SPEC); - types.push_back(SpecString[3].c_str()); - m_pUIEnumsDatabase->SetEnumStrings("CastShadows", types); - - // Power-of-two percentages - AZStd::string percentStringPOT[5]; - types.clear(); - percentStringPOT[0] = AZStd::string::format("Default=%d", 0); - types.push_back(percentStringPOT[0].c_str()); - percentStringPOT[1] = AZStd::string::format("12.5=%d", 1); - types.push_back(percentStringPOT[1].c_str()); - percentStringPOT[2] = AZStd::string::format("25=%d", 2); - types.push_back(percentStringPOT[2].c_str()); - percentStringPOT[3] = AZStd::string::format("50=%d", 3); - types.push_back(percentStringPOT[3].c_str()); - percentStringPOT[4] = AZStd::string::format("100=%d", 4); - types.push_back(percentStringPOT[4].c_str()); - m_pUIEnumsDatabase->SetEnumStrings("ShadowMinResPercent", types); -} - -void CEditorImpl::SetEditorConfigSpec(ESystemConfigSpec spec, [[maybe_unused]]ESystemConfigPlatform platform) -{ - gSettings.editorConfigSpec = spec; -} - -ESystemConfigSpec CEditorImpl::GetEditorConfigSpec() const -{ - return (ESystemConfigSpec)gSettings.editorConfigSpec; -} - ESystemConfigPlatform CEditorImpl::GetEditorConfigPlatform() const { return m_pSystem->GetConfigPlatform(); diff --git a/Code/Editor/IEditorImpl.h b/Code/Editor/IEditorImpl.h index 08629e434b..5e47a76802 100644 --- a/Code/Editor/IEditorImpl.h +++ b/Code/Editor/IEditorImpl.h @@ -268,14 +268,9 @@ public: bool IsSourceControlConnected() override; //! Setup Material Editor mode void SetMatEditMode(bool bIsMatEditMode); - CUIEnumsDatabase* GetUIEnumsDatabase() override { return m_pUIEnumsDatabase; }; - void AddUIEnums() override; void ReduceMemory() override; // Get Export manager IExportManager* GetExportManager() override; - // Set current configuration spec of the editor. - void SetEditorConfigSpec(ESystemConfigSpec spec, ESystemConfigPlatform platform) override; - ESystemConfigSpec GetEditorConfigSpec() const override; ESystemConfigPlatform GetEditorConfigPlatform() const override; void ReloadTemplates() override; void AddErrorMessage(const QString& text, const QString& caption); @@ -347,7 +342,6 @@ protected: CSelectionTreeManager* m_pSelectionTreeManager; - CUIEnumsDatabase* m_pUIEnumsDatabase; //! CConsole Synchronization CConsoleSynchronization* m_pConsoleSync; //! Editor Settings Manager diff --git a/Code/Editor/Lib/Tests/IEditorMock.h b/Code/Editor/Lib/Tests/IEditorMock.h index b2f7e2627f..99c05c7f4d 100644 --- a/Code/Editor/Lib/Tests/IEditorMock.h +++ b/Code/Editor/Lib/Tests/IEditorMock.h @@ -165,12 +165,8 @@ public: MOCK_METHOD0(GetSourceControl, ISourceControl* ()); MOCK_METHOD0(IsSourceControlAvailable, bool()); MOCK_METHOD0(IsSourceControlConnected, bool()); - MOCK_METHOD0(GetUIEnumsDatabase, CUIEnumsDatabase* ()); - MOCK_METHOD0(AddUIEnums, void()); MOCK_METHOD0(ReduceMemory, void()); MOCK_METHOD0(GetExportManager, IExportManager* ()); - MOCK_METHOD2(SetEditorConfigSpec, void(ESystemConfigSpec , ESystemConfigPlatform )); - MOCK_CONST_METHOD0(GetEditorConfigSpec, ESystemConfigSpec()); MOCK_CONST_METHOD0(GetEditorConfigPlatform, ESystemConfigPlatform()); MOCK_METHOD0(ReloadTemplates, void()); MOCK_METHOD1(ShowStatusText, void(bool )); diff --git a/Code/Editor/Objects/BaseObject.cpp b/Code/Editor/Objects/BaseObject.cpp index c14547407b..1497f2440a 100644 --- a/Code/Editor/Objects/BaseObject.cpp +++ b/Code/Editor/Objects/BaseObject.cpp @@ -62,7 +62,7 @@ protected: ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// -//! Undo object for CBaseObject that only stores its transform, color, area and minSpec +//! Undo object for CBaseObject that only stores its transform, color, area class CUndoBaseObjectMinimal : public IUndoObject { @@ -84,7 +84,6 @@ private: Vec3 scale; QColor color; float area; - int minSpec; }; void SetTransformsFromState(CBaseObject* pObject, const StateStruct& state, bool bUndo); @@ -253,7 +252,6 @@ CUndoBaseObjectMinimal::CUndoBaseObjectMinimal(CBaseObject* pObj, [[maybe_unused m_undoState.scale = pObj->GetScale(); m_undoState.color = pObj->GetColor(); m_undoState.area = pObj->GetArea(); - m_undoState.minSpec = pObj->GetMinSpec(); } ////////////////////////////////////////////////////////////////////////// @@ -284,14 +282,12 @@ void CUndoBaseObjectMinimal::Undo(bool bUndo) m_redoState.rotate = pObject->GetRotation(); m_redoState.color = pObject->GetColor(); m_redoState.area = pObject->GetArea(); - m_redoState.minSpec = pObject->GetMinSpec(); } SetTransformsFromState(pObject, m_undoState, bUndo); pObject->ChangeColor(m_undoState.color); pObject->SetArea(m_undoState.area); - pObject->SetMinSpec(m_undoState.minSpec, false); using namespace AzToolsFramework; ComponentEntityObjectRequestBus::Event(pObject, &ComponentEntityObjectRequestBus::Events::UpdatePreemptiveUndoCache); @@ -310,7 +306,6 @@ void CUndoBaseObjectMinimal::Redo() pObject->ChangeColor(m_redoState.color); pObject->SetArea(m_redoState.area); - pObject->SetMinSpec(m_redoState.minSpec, false); using namespace AzToolsFramework; ComponentEntityObjectRequestBus::Event(pObject, &ComponentEntityObjectRequestBus::Events::UpdatePreemptiveUndoCache); @@ -382,7 +377,6 @@ CBaseObject::CBaseObject() , m_bMatrixInWorldSpace(false) , m_bMatrixValid(false) , m_bWorldBoxValid(false) - , m_nMinSpec(0) , m_vDrawIconPos(0, 0, 0) , m_nIconFlags(0) { @@ -413,7 +407,6 @@ bool CBaseObject::Init([[maybe_unused]] IEditor* ie, CBaseObject* prev, [[maybe_ SetLocalTM(prev->GetPos(), prev->GetRotation(), prev->GetScale()); SetArea(prev->GetArea()); SetColor(prev->GetColor()); - SetMinSpec(prev->GetMinSpec(), false); // Copy all basic variables. EnableUpdateCallbacks(false); @@ -1053,17 +1046,6 @@ void CBaseObject::SetSelected(bool bSelect) } } -////////////////////////////////////////////////////////////////////////// -bool CBaseObject::IsHiddenBySpec() const -{ - if (!gSettings.bApplyConfigSpecInEditor) - { - return false; - } - - return (m_nMinSpec != 0 && gSettings.editorConfigSpec != 0 && m_nMinSpec > static_cast(gSettings.editorConfigSpec)); -} - ////////////////////////////////////////////////////////////////////////// //! Returns true if object hidden. bool CBaseObject::IsHidden() const @@ -1107,7 +1089,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) Vec3 scale = m_scale; Quat quat = m_rotate; Ang3 angles(0, 0, 0); - uint32 nMinSpec = m_nMinSpec; QColor color = m_color; float flattenArea = m_flattenArea; @@ -1135,12 +1116,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) xmlNode->getAttr("Parent", parentId); xmlNode->getAttr("LookAt", lookatId); xmlNode->getAttr("Material", mtlName); - xmlNode->getAttr("MinSpec", nMinSpec); - - if (nMinSpec <= CONFIG_VERYHIGH_SPEC) // Ignore invalid values. - { - m_nMinSpec = nMinSpec; - } bool bHidden = flags & OBJFLAG_HIDDEN; bool bFrozen = flags & OBJFLAG_FROZEN; @@ -1245,11 +1220,6 @@ void CBaseObject::Serialize(CObjectArchive& ar) { xmlNode->setAttr("Flags", flags); } - - if (m_nMinSpec != 0) - { - xmlNode->setAttr("MinSpec", (uint32)m_nMinSpec); - } } // Serialize variables after default entity parameters. @@ -1300,11 +1270,6 @@ XmlNodeRef CBaseObject::Export([[maybe_unused]] const QString& levelPath, XmlNod objNode->setAttr("Scale", scale); } - if (m_nMinSpec != 0) - { - objNode->setAttr("MinSpec", (uint32)m_nMinSpec); - } - // Save variables. CVarObject::Serialize(objNode, false); @@ -2134,22 +2099,6 @@ bool CBaseObject::IsSimilarObject(CBaseObject* pObject) return false; } -////////////////////////////////////////////////////////////////////////// -void CBaseObject::SetMinSpec(uint32 nSpec, bool bSetChildren) -{ - m_nMinSpec = nSpec; - UpdateVisibility(!IsHidden()); - - // Set min spec for all childs. - if (bSetChildren) - { - for (int i = static_cast(m_childs.size()) - 1; i >= 0; --i) - { - m_childs[i]->SetMinSpec(nSpec, true); - } - } -} - ////////////////////////////////////////////////////////////////////////// EScaleWarningLevel CBaseObject::GetScaleWarningLevel() const { diff --git a/Code/Editor/Objects/BaseObject.h b/Code/Editor/Objects/BaseObject.h index 666d9f3e1d..aa748bade4 100644 --- a/Code/Editor/Objects/BaseObject.h +++ b/Code/Editor/Objects/BaseObject.h @@ -256,8 +256,6 @@ public: //! Returns true if object hidden. bool IsHidden() const; - //! Check against min spec. - bool IsHiddenBySpec() const; //! Returns true if object frozen. virtual bool IsFrozen() const; //! Returns true if object is shared between missions. @@ -465,12 +463,6 @@ public: //! Check if specified object is very similar to this one. virtual bool IsSimilarObject(CBaseObject* pObject); - ////////////////////////////////////////////////////////////////////////// - // Object minimal usage spec (All/Low/Medium/High) - ////////////////////////////////////////////////////////////////////////// - uint32 GetMinSpec() const { return m_nMinSpec; } - virtual void SetMinSpec(uint32 nSpec, bool bSetChildren = true); - //! In This function variables of the object must be initialized. virtual void InitVariables() {}; @@ -668,7 +660,6 @@ private: mutable uint32 m_bMatrixValid : 1; mutable uint32 m_bWorldBoxValid : 1; uint32 m_bInSelectionBox : 1; - uint32 m_nMinSpec : 8; Vec3 m_vDrawIconPos; AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING diff --git a/Code/Editor/Objects/EntityObject.cpp b/Code/Editor/Objects/EntityObject.cpp index 86512377c6..450a15766c 100644 --- a/Code/Editor/Objects/EntityObject.cpp +++ b/Code/Editor/Objects/EntityObject.cpp @@ -200,7 +200,6 @@ CEntityObject::CEntityObject() // Init Variables. mv_castShadow = true; - mv_castShadowMinSpec = CONFIG_LOW_SPEC; mv_outdoor = false; mv_recvWind = false; mv_renderNearest = false; @@ -249,18 +248,10 @@ CEntityObject::~CEntityObject() ////////////////////////////////////////////////////////////////////////// void CEntityObject::InitVariables() { - mv_castShadowMinSpec.AddEnumItem("Never", END_CONFIG_SPEC_ENUM); - mv_castShadowMinSpec.AddEnumItem("Low", CONFIG_LOW_SPEC); - mv_castShadowMinSpec.AddEnumItem("Medium", CONFIG_MEDIUM_SPEC); - mv_castShadowMinSpec.AddEnumItem("High", CONFIG_HIGH_SPEC); - mv_castShadowMinSpec.AddEnumItem("VeryHigh", CONFIG_VERYHIGH_SPEC); - mv_castShadow.SetFlags(mv_castShadow.GetFlags() | IVariable::UI_INVISIBLE); - mv_castShadowMinSpec->SetFlags(mv_castShadowMinSpec->GetFlags() | IVariable::UI_UNSORTED); AddVariable(mv_outdoor, "OutdoorOnly", tr("Outdoor Only")); AddVariable(mv_castShadow, "CastShadow", tr("Cast Shadow")); - AddVariable(mv_castShadowMinSpec, "CastShadowMinspec", tr("Cast Shadow MinSpec")); AddVariable(mv_ratioLOD, "LodRatio"); AddVariable(mv_viewDistanceMultiplier, "ViewDistanceMultiplier"); @@ -361,7 +352,6 @@ bool CEntityObject::ConvertFromObject(CBaseObject* object) CEntityObject* pObject = ( CEntityObject* )object; mv_outdoor = pObject->mv_outdoor; - mv_castShadowMinSpec = pObject->mv_castShadowMinSpec; mv_ratioLOD = pObject->mv_ratioLOD; mv_viewDistanceMultiplier = pObject->mv_viewDistanceMultiplier; mv_hiddenInGame = pObject->mv_hiddenInGame; @@ -521,22 +511,6 @@ void CEntityObject::AdjustLightProperties(CVarBlockPtr& properties, const char* } } - if (IVariable* pCastShadowVar = FindVariableInSubBlock(properties, pSubBlockVar, "nCastShadows")) - { - if (bCastShadowLegacy) - { - pCastShadowVar->SetDisplayValue("1"); - } - pCastShadowVar->SetDataType(IVariable::DT_UIENUM); - pCastShadowVar->SetFlags(pCastShadowVar->GetFlags() | IVariable::UI_UNSORTED); - } - - if (IVariable* pShadowMinRes = FindVariableInSubBlock(properties, pSubBlockVar, "nShadowMinResPercent")) - { - pShadowMinRes->SetDataType(IVariable::DT_UIENUM); - pShadowMinRes->SetFlags(pShadowMinRes->GetFlags() | IVariable::UI_UNSORTED); - } - if (IVariable* pFade = FindVariableInSubBlock(properties, pSubBlockVar, "vFadeDimensionsLeft")) { pFade->SetFlags(pFade->GetFlags() | IVariable::UI_INVISIBLE); @@ -873,12 +847,6 @@ void CEntityObject::Serialize(CObjectArchive& ar) RemoveAllEntityLinks(); PostLoad(ar); } - - if ((mv_castShadowMinSpec == CONFIG_LOW_SPEC) && !mv_castShadow) // backwards compatibility check - { - mv_castShadowMinSpec = END_CONFIG_SPEC_ENUM; - mv_castShadow = true; - } } else { @@ -1033,8 +1001,6 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN objNode->setAttr("ViewDistanceMultiplier", mv_viewDistanceMultiplier); } - objNode->setAttr("CastShadowMinSpec", mv_castShadowMinSpec); - if (mv_recvWind) { objNode->setAttr("RecvWind", true); @@ -1050,11 +1016,6 @@ XmlNodeRef CEntityObject::Export([[maybe_unused]] const QString& levelPath, XmlN objNode->setAttr("OutdoorOnly", true); } - if (GetMinSpec() != 0) - { - objNode->setAttr("MinSpec", ( uint32 )GetMinSpec()); - } - if (mv_hiddenInGame) { objNode->setAttr("HiddenInGame", true); @@ -1163,7 +1124,7 @@ void CEntityObject::UpdateVisibility(bool bVisible) { CBaseObject::UpdateVisibility(bVisible); - bool bVisibleWithSpec = bVisible && !IsHiddenBySpec(); + bool bVisibleWithSpec = bVisible; if (bVisibleWithSpec != static_cast(m_bVisible)) { m_bVisible = bVisibleWithSpec; diff --git a/Code/Editor/Objects/EntityObject.h b/Code/Editor/Objects/EntityObject.h index c6b7e4ce2d..2e8aeeabc7 100644 --- a/Code/Editor/Objects/EntityObject.h +++ b/Code/Editor/Objects/EntityObject.h @@ -174,8 +174,6 @@ public: ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// - int GetCastShadowMinSpec() const { return mv_castShadowMinSpec; } - float GetRatioLod() const { return static_cast(mv_ratioLOD); }; float GetViewDistanceMultiplier() const { return mv_viewDistanceMultiplier; } @@ -306,7 +304,6 @@ protected: ////////////////////////////////////////////////////////////////////////// CVariable mv_outdoor; CVariable mv_castShadow; // Legacy, required for backwards compatibility - CSmartVariableEnum mv_castShadowMinSpec; CVariable mv_ratioLOD; CVariable mv_viewDistanceMultiplier; CVariable mv_hiddenInGame; // Entity is hidden in game (on start). diff --git a/Code/Editor/Settings.cpp b/Code/Editor/Settings.cpp index 9514957795..9efe846b9e 100644 --- a/Code/Editor/Settings.cpp +++ b/Code/Editor/Settings.cpp @@ -129,8 +129,6 @@ SEditorSettings::SEditorSettings() bVisualizeNavigationAccessibility = false; navigationDebugAgentType = 0; - editorConfigSpec = CONFIG_VERYHIGH_SPEC; //arbitrary choice, but lets assume that we want things to initially look as good as possible in the editor. - viewports.bAlwaysShowRadiuses = false; viewports.bSync2DViews = false; viewports.fDefaultAspectRatio = 800.0f / 600.0f; @@ -166,7 +164,6 @@ SEditorSettings::SEditorSettings() bPreviewGeometryWindow = true; bBackupOnSave = true; backupOnSaveMaxCount = 3; - bApplyConfigSpecInEditor = true; showErrorDialogOnLoad = 1; consoleBackgroundColorTheme = AzToolsFramework::ConsoleColorTheme::Dark; @@ -433,40 +430,6 @@ void SEditorSettings::LoadValue(const char* sSection, const char* sKey, QString& } } -////////////////////////////////////////////////////////////////////////// -void SEditorSettings::LoadValue(const char* sSection, const char* sKey, ESystemConfigSpec& value) -{ - if (bSettingsManagerMode) - { - int valueCheck = 0; - - if (GetIEditor()->GetSettingsManager()) - { - GetIEditor()->GetSettingsManager()->LoadSetting(sSection, sKey, valueCheck); - } - - if (valueCheck >= CONFIG_AUTO_SPEC && valueCheck < END_CONFIG_SPEC_ENUM) - { - value = (ESystemConfigSpec)valueCheck; - SaveValue(sSection, sKey, value); - } - } - else - { - const SettingsGroup sg(sSection); - auto valuecheck = static_cast(s_editorSettings()->value(sKey, QVariant::fromValue(value)).toInt()); - if (valuecheck >= CONFIG_AUTO_SPEC && valuecheck < END_CONFIG_SPEC_ENUM) - { - value = valuecheck; - - if (GetIEditor()->GetSettingsManager()) - { - GetIEditor()->GetSettingsManager()->SaveSetting(sSection, sKey, value); - } - } - } -} - ////////////////////////////////////////////////////////////////////////// void SEditorSettings::Save(bool isEditorClosing) { @@ -503,9 +466,6 @@ void SEditorSettings::Save(bool isEditorClosing) SaveValue("Settings", "BackupOnSave", bBackupOnSave); SaveValue("Settings", "SaveBackupMaxCount", backupOnSaveMaxCount); - SaveValue("Settings", "ApplyConfigSpecInEditor", bApplyConfigSpecInEditor); - - SaveValue("Settings", "editorConfigSpec", editorConfigSpec); SaveValue("Settings", "TemporaryDirectory", strStandardTempDirectory); @@ -697,9 +657,6 @@ void SEditorSettings::Load() LoadValue("Settings", "BackupOnSave", bBackupOnSave); LoadValue("Settings", "SaveBackupMaxCount", backupOnSaveMaxCount); - LoadValue("Settings", "ApplyConfigSpecInEditor", bApplyConfigSpecInEditor); - LoadValue("Settings", "editorConfigSpec", editorConfigSpec); - LoadValue("Settings", "TemporaryDirectory", strStandardTempDirectory); @@ -894,7 +851,6 @@ void SEditorSettings::PostInitApply() REGISTER_CVAR2_CB("ed_toolbarIconSize", &gui.nToolbarIconSize, gui.nToolbarIconSize, VF_NULL, "Override size of the toolbar icons 0-default, 16,32,...", ToolbarIconSizeChanged); - GetIEditor()->SetEditorConfigSpec(editorConfigSpec, GetISystem()->GetConfigPlatform()); REGISTER_CVAR2("ed_backgroundUpdatePeriod", &backgroundUpdatePeriod, backgroundUpdatePeriod, 0, "Delay between frame updates (ms) when window is out of focus but not minimized. 0 = disable background update"); REGISTER_CVAR2("ed_showErrorDialogOnLoad", &showErrorDialogOnLoad, showErrorDialogOnLoad, 0, "Show error dialog on level load"); REGISTER_CVAR2_CB("ed_keepEditorActive", &keepEditorActive, 0, VF_NULL, "Keep the editor active, even if no focus is set", KeepEditorActiveChanged); diff --git a/Code/Editor/Settings.h b/Code/Editor/Settings.h index 0ebb70501d..e88f2f6550 100644 --- a/Code/Editor/Settings.h +++ b/Code/Editor/Settings.h @@ -378,10 +378,6 @@ AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING SGUI_Settings gui; - bool bApplyConfigSpecInEditor; - - ESystemConfigSpec editorConfigSpec; - //! Terrain Texture Export/Import filename. QString terrainTextureExport; @@ -451,7 +447,6 @@ private: void LoadValue(const char* sSection, const char* sKey, float& value); void LoadValue(const char* sSection, const char* sKey, bool& value); void LoadValue(const char* sSection, const char* sKey, QString& value); - void LoadValue(const char* sSection, const char* sKey, ESystemConfigSpec& value); void SaveCloudSettings(); diff --git a/Code/Editor/UIEnumsDatabase.cpp b/Code/Editor/UIEnumsDatabase.cpp deleted file mode 100644 index b859f54ffa..0000000000 --- a/Code/Editor/UIEnumsDatabase.cpp +++ /dev/null @@ -1,91 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#include "EditorDefs.h" - -#include "UIEnumsDatabase.h" - -////////////////////////////////////////////////////////////////////////// -QString CUIEnumsDatabase_SEnum::NameToValue(const QString& name) -{ - int n = (int)strings.size(); - for (int i = 0; i < n; i++) - { - if (name == strings[i]) - { - return values[i]; - } - } - return name; -} - -////////////////////////////////////////////////////////////////////////// -QString CUIEnumsDatabase_SEnum::ValueToName(const QString& value) -{ - int n = (int)strings.size(); - for (int i = 0; i < n; i++) - { - if (value == values[i]) - { - return strings[i]; - } - } - return value; -} - -////////////////////////////////////////////////////////////////////////// -CUIEnumsDatabase::CUIEnumsDatabase() -{ -} - -////////////////////////////////////////////////////////////////////////// -CUIEnumsDatabase::~CUIEnumsDatabase() -{ - // Free enums. - for (Enums::iterator it = m_enums.begin(); it != m_enums.end(); ++it) - { - delete it->second; - } -} - -////////////////////////////////////////////////////////////////////////// -void CUIEnumsDatabase::SetEnumStrings(const QString& enumName, const QStringList& sStringsArray) -{ - int nStringCount = sStringsArray.size(); - - CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, nullptr); - if (!pEnum) - { - pEnum = new CUIEnumsDatabase_SEnum; - pEnum->m_name = enumName; - m_enums[enumName] = pEnum; - } - pEnum->strings.clear(); - pEnum->values.clear(); - for (int i = 0; i < nStringCount; i++) - { - QString str = sStringsArray[i]; - QString value = str; - int pos = str.indexOf('='); - if (pos >= 0) - { - value = str.mid(pos + 1); - str = str.mid(0, pos); - } - pEnum->strings.push_back(str); - pEnum->values.push_back(value); - } -} - -////////////////////////////////////////////////////////////////////////// -CUIEnumsDatabase_SEnum* CUIEnumsDatabase::FindEnum(const QString& enumName) const -{ - CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, nullptr); - return pEnum; -} diff --git a/Code/Editor/UIEnumsDatabase.h b/Code/Editor/UIEnumsDatabase.h deleted file mode 100644 index 102b30a7c5..0000000000 --- a/Code/Editor/UIEnumsDatabase.h +++ /dev/null @@ -1,47 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -#ifndef CRYINCLUDE_EDITOR_UIENUMSDATABASE_H -#define CRYINCLUDE_EDITOR_UIENUMSDATABASE_H -#pragma once - -#include "Include/EditorCoreAPI.h" - -struct EDITOR_CORE_API CUIEnumsDatabase_SEnum -{ - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - QString m_name; - QStringList strings; // Display Strings. - QStringList values; // Corresponding Values. - AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING - - QString NameToValue(const QString& name); - QString ValueToName(const QString& value); -}; - -////////////////////////////////////////////////////////////////////////// -// Stores string associates to the enumeration collections for UI. -////////////////////////////////////////////////////////////////////////// -class EDITOR_CORE_API CUIEnumsDatabase -{ -public: - CUIEnumsDatabase(); - ~CUIEnumsDatabase(); - - void SetEnumStrings(const QString& enumName, const QStringList& sStringsArray); - CUIEnumsDatabase_SEnum* FindEnum(const QString& enumName) const; - -private: - AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING - typedef std::map Enums; - Enums m_enums; - AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING -}; - -#endif // CRYINCLUDE_EDITOR_UIENUMSDATABASE_H diff --git a/Code/Editor/UndoConfigSpec.cpp b/Code/Editor/UndoConfigSpec.cpp deleted file mode 100644 index 93b73a90a1..0000000000 --- a/Code/Editor/UndoConfigSpec.cpp +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Undo for Python function (PySetConfigSpec) - - -#include "EditorDefs.h" - -#include "UndoConfigSpec.h" - -CUndoConficSpec::CUndoConficSpec(const QString& pUndoDescription) -{ - m_undo = GetIEditor()->GetEditorConfigSpec(); - m_undoDescription = pUndoDescription; -} - -int CUndoConficSpec::GetSize() -{ - return sizeof(*this); -} - -QString CUndoConficSpec::GetDescription() -{ - return m_undoDescription; -} - -void CUndoConficSpec::Undo(bool bUndo) -{ - if (bUndo) - { - m_redo = GetIEditor()->GetEditorConfigSpec(); - } - GetIEditor()->SetEditorConfigSpec((ESystemConfigSpec)m_undo, GetIEditor()->GetEditorConfigPlatform()); -} - -void CUndoConficSpec::Redo() -{ - GetIEditor()->SetEditorConfigSpec((ESystemConfigSpec)m_redo, GetIEditor()->GetEditorConfigPlatform()); -} diff --git a/Code/Editor/UndoConfigSpec.h b/Code/Editor/UndoConfigSpec.h deleted file mode 100644 index f4aa80477e..0000000000 --- a/Code/Editor/UndoConfigSpec.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) Contributors to the Open 3D Engine Project. - * For complete copyright and license terms please see the LICENSE at the root of this distribution. - * - * SPDX-License-Identifier: Apache-2.0 OR MIT - * - */ - - -// Description : Undo for Python function (PySetConfigSpec) - - -#ifndef CRYINCLUDE_EDITOR_UNDOCONFIGSPEC_H -#define CRYINCLUDE_EDITOR_UNDOCONFIGSPEC_H -#pragma once - -#include "Undo/IUndoObject.h" - -class CUndoConficSpec - : public IUndoObject -{ -public: - CUndoConficSpec(const QString& pUndoDescription = "Set Config Spec"); - -protected: - int GetSize(); - QString GetDescription(); - void Undo(bool bUndo); - void Redo(); - -private: - int m_undo; - int m_redo; - QString m_undoDescription; -}; - -#endif // CRYINCLUDE_EDITOR_UNDOCONFIGSPEC_H diff --git a/Code/Editor/Util/Variable.cpp b/Code/Editor/Util/Variable.cpp index 3d7c35ac1c..4f56743479 100644 --- a/Code/Editor/Util/Variable.cpp +++ b/Code/Editor/Util/Variable.cpp @@ -10,7 +10,6 @@ #include "EditorDefs.h" #include "Variable.h" -#include "UIEnumsDatabase.h" #include "UsedResources.h" // for CUsedResources @@ -496,49 +495,3 @@ void CVarObject::Serialize(XmlNodeRef node, bool load) m_vars->Serialize(node, load); } } - - -CVarGlobalEnumList::CVarGlobalEnumList(CUIEnumsDatabase_SEnum* pEnum) - : m_pEnum(pEnum) -{ -} - -CVarGlobalEnumList::CVarGlobalEnumList(const QString& enumName) -{ - m_pEnum = GetIEditor()->GetUIEnumsDatabase()->FindEnum(enumName); -} - -//! Get the name of specified value in enumeration. -QString CVarGlobalEnumList::GetItemName(uint index) -{ - if (!m_pEnum || index >= static_cast(m_pEnum->strings.size())) - { - return QString(); - } - return m_pEnum->strings[index]; -} - -QString CVarGlobalEnumList::NameToValue(const QString& name) -{ - if (m_pEnum) - { - return m_pEnum->NameToValue(name); - } - else - { - return name; - } -} - -QString CVarGlobalEnumList::ValueToName(const QString& value) -{ - if (m_pEnum) - { - return m_pEnum->ValueToName(value); - } - else - { - return value; - } -} - diff --git a/Code/Editor/Util/Variable.h b/Code/Editor/Util/Variable.h index 639161775c..0d8cbb1459 100644 --- a/Code/Editor/Util/Variable.h +++ b/Code/Editor/Util/Variable.h @@ -151,7 +151,7 @@ struct IVariable DT_SEQUENCE, // Movie Sequence (DEPRECATED, use DT_SEQUENCE_ID, instead.) DT_MISSIONOBJ, // Mission Objective DT_USERITEMCB, // Use a callback GetItemsCallback in user data of variable - DT_UIENUM, // Edit as enum, uses CUIEnumsDatabase to lookup the enum to value pairs and combobox in GUI. + DT_UIENUM, // DEPRECATED DT_SEQUENCE_ID, // Movie Sequence DT_LIGHT_ANIMATION, // Light Animation Node in the global Light Animation Set DT_PARTICLE_EFFECT, @@ -1451,32 +1451,6 @@ protected: friend class _smart_ptr >; }; -struct CUIEnumsDatabase_SEnum; - -////////////////////////////////////////////////////////////////////////// -AZ_PUSH_DISABLE_DLL_EXPORT_BASECLASS_WARNING -class EDITOR_CORE_API CVarGlobalEnumList - : public CVarEnumListBase -{ -AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING -public: - CVarGlobalEnumList(CUIEnumsDatabase_SEnum* pEnum); - CVarGlobalEnumList(const QString& enumName); - - //! Get the name of specified value in enumeration. - virtual QString GetItemName(uint index); - - virtual QString NameToValue(const QString& name); - virtual QString ValueToName(const QString& value); - - //! Don't add anything to a global enum database - virtual void AddItem([[maybe_unused]] const QString& name, [[maybe_unused]] const QString& value) {} - -private: - CUIEnumsDatabase_SEnum* m_pEnum; -}; - - ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// //! Selection list shown in combo box, for enumerated variable. diff --git a/Code/Editor/Util/VariablePropertyType.cpp b/Code/Editor/Util/VariablePropertyType.cpp index 3f472dde72..5af104b3fb 100644 --- a/Code/Editor/Util/VariablePropertyType.cpp +++ b/Code/Editor/Util/VariablePropertyType.cpp @@ -10,7 +10,6 @@ #include "VariablePropertyType.h" #include "Variable.h" -#include "UIEnumsDatabase.h" #include "IEditor.h" namespace Prop @@ -72,7 +71,6 @@ namespace Prop , m_bHardMin(false) , m_bHardMax(false) , m_valueMultiplier(1) - , m_pEnumDBItem(nullptr) { } @@ -86,7 +84,6 @@ namespace Prop , m_bHardMin(false) , m_bHardMax(false) , m_valueMultiplier(1) - , m_pEnumDBItem(nullptr) { if (!pVar) { @@ -160,11 +157,6 @@ namespace Prop m_rangeMin = max(-360.0f, m_rangeMin); m_rangeMax = min(360.0f, m_rangeMax); } - else if (type == IVariable::DT_UIENUM) - { - m_pEnumDBItem = GetIEditor()->GetUIEnumsDatabase()->FindEnum(m_name); - } - const bool useExplicitStep = (pVar->GetFlags() & IVariable::UI_EXPLICIT_STEP); if (!useExplicitStep) diff --git a/Code/Editor/Util/VariablePropertyType.h b/Code/Editor/Util/VariablePropertyType.h index decb930cb3..e37b38cdb7 100644 --- a/Code/Editor/Util/VariablePropertyType.h +++ b/Code/Editor/Util/VariablePropertyType.h @@ -73,7 +73,6 @@ namespace Prop bool m_bHardMax; QString m_name; float m_valueMultiplier; - CUIEnumsDatabase_SEnum* m_pEnumDBItem; }; EDITOR_CORE_API const char* GetName(int dataType); diff --git a/Code/Editor/editor_core_files.cmake b/Code/Editor/editor_core_files.cmake index 7cb40927a4..4cf092e774 100644 --- a/Code/Editor/editor_core_files.cmake +++ b/Code/Editor/editor_core_files.cmake @@ -8,7 +8,6 @@ set(FILES UsedResources.h - UIEnumsDatabase.h Include/EditorCoreAPI.cpp Include/IErrorReport.h Include/IFileUtil.h @@ -31,7 +30,6 @@ set(FILES Controls/QToolTipWidget.h Controls/QToolTipWidget.cpp UsedResources.cpp - UIEnumsDatabase.cpp LyViewPaneNames.h QtViewPaneManager.cpp QtViewPaneManager.h diff --git a/Code/Editor/editor_lib_files.cmake b/Code/Editor/editor_lib_files.cmake index d1c903eb72..5812aae4bb 100644 --- a/Code/Editor/editor_lib_files.cmake +++ b/Code/Editor/editor_lib_files.cmake @@ -441,7 +441,6 @@ set(FILES IPostRenderer.h ToolBox.h TrackViewNewSequenceDialog.h - UndoConfigSpec.h Util/GeometryUtil.h LevelIndependentFileMan.cpp LevelIndependentFileMan.h @@ -528,7 +527,6 @@ set(FILES ToolBox.cpp TrackViewNewSequenceDialog.cpp TrackViewNewSequenceDialog.ui - UndoConfigSpec.cpp Dialogs/ErrorsDlg.cpp Dialogs/ErrorsDlg.h Dialogs/ErrorsDlg.ui diff --git a/Code/Legacy/CryCommon/ISystem.h b/Code/Legacy/CryCommon/ISystem.h index cb2ba0d5bc..b68dd2041c 100644 --- a/Code/Legacy/CryCommon/ISystem.h +++ b/Code/Legacy/CryCommon/ISystem.h @@ -87,19 +87,6 @@ enum ESystemUpdateFlags ESYSUPDATE_EDITOR = 0x0004 }; -// Description: -// Configuration specification, depends on user selected machine specification. -enum ESystemConfigSpec -{ - CONFIG_AUTO_SPEC = 0, - CONFIG_LOW_SPEC = 1, - CONFIG_MEDIUM_SPEC = 2, - CONFIG_HIGH_SPEC = 3, - CONFIG_VERYHIGH_SPEC = 4, - - END_CONFIG_SPEC_ENUM, // MUST BE LAST VALUE. USED FOR ERROR CHECKING. -}; - // Description: // Configuration platform. Autodetected at start, can be modified through the editor. enum ESystemConfigPlatform