Merge branch 'development' into redcode/crythread-2nd-pass

Signed-off-by: AMZN-ScottR <24445312+AMZN-ScottR@users.noreply.github.com>
This commit is contained in:
AMZN-ScottR
2021-08-11 20:31:58 -07:00
1650 changed files with 39333 additions and 62370 deletions
+32 -29
View File
@@ -26,6 +26,7 @@ AZ_POP_DISABLE_WARNING
#include <AzCore/IO/Path/Path.h>
#include <AzCore/JSON/document.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/Utils/Utils.h>
// AzFramework
#include <AzFramework/Terrain/TerrainDataRequestBus.h>
@@ -415,7 +416,7 @@ void CEditorImpl::Update()
}
if (IsInPreviewMode())
{
SetModifiedFlag(FALSE);
SetModifiedFlag(false);
SetModifiedModule(eModifiedNothing);
}
@@ -550,7 +551,7 @@ QString CEditorImpl::GetResolvedUserFolder()
void CEditorImpl::SetDataModified()
{
GetDocument()->SetModifiedFlag(TRUE);
GetDocument()->SetModifiedFlag(true);
}
void CEditorImpl::SetStatusText(const QString& pszString)
@@ -597,9 +598,9 @@ ITransformManipulator* CEditorImpl::ShowTransformManipulator(bool bShow)
GetObjectManager()->GetGizmoManager()->RemoveGizmo(m_pAxisGizmo);
m_pAxisGizmo->Release();
}
m_pAxisGizmo = 0;
m_pAxisGizmo = nullptr;
}
return 0;
return nullptr;
}
ITransformManipulator* CEditorImpl::GetTransformManipulator()
@@ -614,7 +615,7 @@ void CEditorImpl::SetAxisConstraints(AxisConstrains axisFlags)
SetTerrainAxisIgnoreObjects(false);
// Update all views.
UpdateViews(eUpdateObjects, NULL);
UpdateViews(eUpdateObjects, nullptr);
}
AxisConstrains CEditorImpl::GetAxisConstrains()
@@ -637,15 +638,15 @@ void CEditorImpl::SetReferenceCoordSys(RefCoordSys refCoords)
m_refCoordsSys = refCoords;
// Update all views.
UpdateViews(eUpdateObjects, NULL);
UpdateViews(eUpdateObjects, nullptr);
// Update the construction plane infos.
CViewport* pViewport = GetActiveView();
if (pViewport)
{
//Pre and Post widget rendering calls are made here to make sure that the proper camera state is set.
//MakeConstructionPlane will make a call to ViewToWorldRay which needs the correct camera state
//in the CRenderViewport to be set.
//MakeConstructionPlane will make a call to ViewToWorldRay which needs the correct camera state
//in the CRenderViewport to be set.
pViewport->PreWidgetRendering();
pViewport->MakeConstructionPlane(GetIEditor()->GetAxisConstrains());
@@ -671,7 +672,7 @@ CBaseObject* CEditorImpl::NewObject(const char* typeName, const char* fileName,
editor->SetModifiedFlag();
editor->SetModifiedModule(eModifiedBrushes);
}
CBaseObject* object = editor->GetObjectManager()->NewObject(typeName, 0, fileName, name);
CBaseObject* object = editor->GetObjectManager()->NewObject(typeName, nullptr, fileName, name);
if (!object)
{
return nullptr;
@@ -932,7 +933,7 @@ void CEditorImpl::CloseView(const GUID& classId)
IDataBaseManager* CEditorImpl::GetDBItemManager([[maybe_unused]] EDataBaseItemType itemType)
{
return 0;
return nullptr;
}
bool CEditorImpl::SelectColor(QColor& color, QWidget* parent)
@@ -1107,16 +1108,18 @@ void CEditorImpl::DetectVersion()
DWORD dwHandle;
UINT len;
char ver[1024 * 8];
wchar_t ver[1024 * 8];
GetModuleFileName(NULL, exe, _MAX_PATH);
AZ::Utils::GetExecutablePath(exe, _MAX_PATH);
AZStd::wstring exeW;
AZStd::to_wstring(exeW, exe);
int verSize = GetFileVersionInfoSize(exe, &dwHandle);
int verSize = GetFileVersionInfoSizeW(exeW.c_str(), &dwHandle);
if (verSize > 0)
{
GetFileVersionInfo(exe, dwHandle, 1024 * 8, ver);
GetFileVersionInfoW(exeW.c_str(), dwHandle, 1024 * 8, ver);
VS_FIXEDFILEINFO* vinfo;
VerQueryValue(ver, "\\", (void**)&vinfo, &len);
VerQueryValueW(ver, L"\\", (void**)&vinfo, &len);
m_fileVersion.v[0] = vinfo->dwFileVersionLS & 0xFFFF;
m_fileVersion.v[1] = vinfo->dwFileVersionLS >> 16;
@@ -1431,7 +1434,7 @@ void CEditorImpl::NotifyExcept(EEditorNotifyEvent event, IEditorNotifyListener*
{
m_pAxisGizmo->Release();
}
m_pAxisGizmo = 0;
m_pAxisGizmo = nullptr;
}
if (event == eNotify_OnInit)
@@ -1472,7 +1475,7 @@ ISourceControl* CEditorImpl::GetSourceControl()
for (int i = 0; i < classes.size(); i++)
{
IClassDesc* pClass = classes[i];
ISourceControl* pSCM = NULL;
ISourceControl* pSCM = nullptr;
HRESULT hRes = pClass->QueryInterface(__uuidof(ISourceControl), (void**)&pSCM);
if (!FAILED(hRes) && pSCM)
{
@@ -1482,7 +1485,7 @@ ISourceControl* CEditorImpl::GetSourceControl()
}
}
return 0;
return nullptr;
}
bool CEditorImpl::IsSourceControlAvailable()
@@ -1557,31 +1560,31 @@ IExportManager* CEditorImpl::GetExportManager()
void CEditorImpl::AddUIEnums()
{
// Spec settings for shadow casting lights
string SpecString[4];
AZStd::string SpecString[4];
QStringList types;
types.push_back("Never=0");
SpecString[0].Format("VeryHigh Spec=%d", CONFIG_VERYHIGH_SPEC);
SpecString[0] = AZStd::string::format("VeryHigh Spec=%d", CONFIG_VERYHIGH_SPEC);
types.push_back(SpecString[0].c_str());
SpecString[1].Format("High Spec=%d", CONFIG_HIGH_SPEC);
SpecString[1] = AZStd::string::format("High Spec=%d", CONFIG_HIGH_SPEC);
types.push_back(SpecString[1].c_str());
SpecString[2].Format("Medium Spec=%d", CONFIG_MEDIUM_SPEC);
SpecString[2] = AZStd::string::format("Medium Spec=%d", CONFIG_MEDIUM_SPEC);
types.push_back(SpecString[2].c_str());
SpecString[3].Format("Low Spec=%d", CONFIG_LOW_SPEC);
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
string percentStringPOT[5];
AZStd::string percentStringPOT[5];
types.clear();
percentStringPOT[0].Format("Default=%d", 0);
percentStringPOT[0] = AZStd::string::format("Default=%d", 0);
types.push_back(percentStringPOT[0].c_str());
percentStringPOT[1].Format("12.5=%d", 1);
percentStringPOT[1] = AZStd::string::format("12.5=%d", 1);
types.push_back(percentStringPOT[1].c_str());
percentStringPOT[2].Format("25=%d", 2);
percentStringPOT[2] = AZStd::string::format("25=%d", 2);
types.push_back(percentStringPOT[2].c_str());
percentStringPOT[3].Format("50=%d", 3);
percentStringPOT[3] = AZStd::string::format("50=%d", 3);
types.push_back(percentStringPOT[3].c_str());
percentStringPOT[4].Format("100=%d", 4);
percentStringPOT[4] = AZStd::string::format("100=%d", 4);
types.push_back(percentStringPOT[4].c_str());
m_pUIEnumsDatabase->SetEnumStrings("ShadowMinResPercent", types);
}