Merge branch 'main' into LYN-1767-AB

This commit is contained in:
igarri
2021-06-07 15:22:26 +01:00
534 changed files with 24036 additions and 11828 deletions
+4 -4
View File
@@ -75,14 +75,14 @@
<widget class="QSvgWidget" name="m_logo" native="true">
<property name="minimumSize">
<size>
<width>161</width>
<height>49</height>
<width>175</width>
<height>66</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>161</width>
<height>49</height>
<width>175</width>
<height>66</height>
</size>
</property>
</widget>
+7 -9
View File
@@ -177,6 +177,11 @@ ly_add_target(
Legacy::EditorLib
ProjectManager
)
set_property(SOURCE
CryEdit.cpp
APPEND PROPERTY
COMPILE_DEFINITIONS LY_CMAKE_TARGET="Editor"
)
ly_add_translations(
TARGETS Editor
PREFIX Translations
@@ -186,15 +191,8 @@ ly_add_translations(
)
ly_add_dependencies(Editor AssetProcessor)
if(TARGET Editor)
set_property(SOURCE
CryEdit.cpp
APPEND PROPERTY
COMPILE_DEFINITIONS LY_CMAKE_TARGET="Editor"
)
else()
message(FATAL_ERROR "Cannot set LY_CMAKE_TARGET define to Editor as the target doesn't exist anymore."
" Perhaps it has been renamed")
if(LY_DEFAULT_PROJECT_PATH)
set_property(TARGET Editor APPEND PROPERTY VS_DEBUGGER_COMMAND_ARGUMENTS "--project-path=\"${LY_DEFAULT_PROJECT_PATH}\"")
endif()
################################################################################
+7 -7
View File
@@ -118,10 +118,10 @@ void CVarMenu::AddUniqueCVarsItem(QString displayName,
// Otherwise we could have just used the action's currently checked
// state and updated the CVar's value only
bool cVarOn = (cVar->GetFVal() == availableCVar.m_onValue);
bool checked = !cVarOn;
SetCVar(cVar, checked ? availableCVar.m_onValue : availableCVar.m_offValue);
action->setChecked(checked);
if (checked)
bool cVarChecked = !cVarOn;
SetCVar(cVar, cVarChecked ? availableCVar.m_onValue : availableCVar.m_offValue);
action->setChecked(cVarChecked);
if (cVarChecked)
{
// Set the rest of the CVars in the group to their off values
SetCVarsToOffValue(availableCVars, availableCVar);
@@ -132,9 +132,9 @@ void CVarMenu::AddUniqueCVarsItem(QString displayName,
// Initialize the action's checked state based on its associated CVar's current value
ICVar* cVar = gEnv->pConsole->GetCVar(availableCVar.m_cVarName.toUtf8().data());
bool checked = (cVar && cVar->GetFVal() == availableCVar.m_onValue);
action->setChecked(checked);
if (checked)
bool cVarChecked = (cVar && cVar->GetFVal() == availableCVar.m_onValue);
action->setChecked(cVarChecked);
if (cVarChecked)
{
// Set the rest of the CVars in the group to their off values
SetCVarsToOffValue(availableCVars, availableCVar);
+8
View File
@@ -2281,6 +2281,14 @@ int CCryEditApp::IdleProcessing(bool bBackgroundUpdate)
return 0;
}
// Ensure we don't get called re-entrantly
// This can occur when a nested Qt event loop fires (e.g. by way of a modal dialog calling exec)
if (m_idleProcessingRunning)
{
return 0;
}
QScopedValueRollback<bool> guard(m_idleProcessingRunning, true);
////////////////////////////////////////////////////////////////////////
// Call the update function of the engine
////////////////////////////////////////////////////////////////////////
+2
View File
@@ -335,6 +335,8 @@ private:
// If this flag is set, the next OnIdle() will update, even if the app is in the background, and then
// this flag will be reset.
bool m_bForceProcessIdle = false;
// This is set while IdleProcessing is running to prevent re-entrancy
bool m_idleProcessingRunning = false;
// Keep the editor alive, even if no focus is set
bool m_bKeepEditorActive = false;
// Currently creating a new level
@@ -35,6 +35,7 @@
#include "EditorPreferencesPageViewportMovement.h"
#include "EditorPreferencesPageViewportDebug.h"
#include "EditorPreferencesPageExperimentalLighting.h"
#include "EditorPreferencesPageAWS.h"
#include "LyViewPaneNames.h"
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
@@ -72,6 +73,7 @@ EditorPreferencesDialog::EditorPreferencesDialog(QWidget* pParent)
CEditorPreferencesPage_ViewportMovement::Reflect(*serializeContext);
CEditorPreferencesPage_ViewportDebug::Reflect(*serializeContext);
CEditorPreferencesPage_ExperimentalLighting::Reflect(*serializeContext);
CEditorPreferencesPage_AWS::Reflect(*serializeContext);
}
}
@@ -0,0 +1,151 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#include "EditorDefs.h"
#include "EditorPreferencesPageAWS.h"
// AzCore
#include <AzCore/Serialization/EditContext.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <AzCore/Jobs/JobFunction.h>
void CEditorPreferencesPage_AWS::Reflect(AZ::SerializeContext& serialize)
{
serialize.Class<UsageOptions>()
->Version(1)
->Field("AWSAttributionEnabled", &UsageOptions::m_awsAttributionEnabled);
serialize.Class<CEditorPreferencesPage_AWS>()
->Version(1)
->Field("UsageOptions", &CEditorPreferencesPage_AWS::m_usageOptions);
AZ::EditContext* editContext = serialize.GetEditContext();
if (editContext)
{
editContext->Class<UsageOptions>("Options", "")
->DataElement(AZ::Edit::UIHandlers::CheckBox, &UsageOptions::m_awsAttributionEnabled, "Send Metrics usage to AWS",
"Reports Gem usage to AWS on Editor launch");
editContext->Class<CEditorPreferencesPage_AWS>("AWS Preferences", "AWS Preferences")
->ClassElement(AZ::Edit::ClassElements::EditorData, "")
->Attribute(AZ::Edit::Attributes::Visibility, AZ_CRC("PropertyVisibility_ShowChildrenOnly", 0xef428f20))
->DataElement(AZ::Edit::UIHandlers::Default, &CEditorPreferencesPage_AWS::m_usageOptions, "AWS Usage Data", "AWS Usage Options");
}
}
CEditorPreferencesPage_AWS::CEditorPreferencesPage_AWS()
{
m_settingsRegistry = AZStd::make_unique<AZ::SettingsRegistryImpl>();
InitializeSettings();
// TODO Update with AWS svg.
m_icon = QIcon(":/res/AWS_preferences_icon.svg");
}
CEditorPreferencesPage_AWS::~CEditorPreferencesPage_AWS()
{
m_settingsRegistry.reset();
}
const char* CEditorPreferencesPage_AWS::GetTitle()
{
return "AWS";
}
QIcon& CEditorPreferencesPage_AWS::GetIcon()
{
return m_icon;
}
void CEditorPreferencesPage_AWS::OnApply()
{
m_settingsRegistry->Set(AWSAttributionEnabledKey, m_usageOptions.m_awsAttributionEnabled);
SaveSettingsRegistryFile();
}
const CEditorPreferencesPage_AWS::UsageOptions& CEditorPreferencesPage_AWS::GetUsageOptions()
{
return m_usageOptions;
}
void CEditorPreferencesPage_AWS::SaveSettingsRegistryFile()
{
AZ::Job* job = AZ::CreateJobFunction(
[this]()
{
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
AZ_Assert(fileIO, "File IO is not initialized.");
// Resolve path to editor_aws_preferences.setreg
AZStd::string editorPreferencesFilePath =
AZStd::string::format("@user@/%s/%s", AZ::SettingsRegistryInterface::RegistryFolder, EditorAWSPreferencesFileName);
AZStd::array<char, AZ::IO::MaxPathLength> resolvedPath{};
fileIO->ResolvePath(editorPreferencesFilePath.c_str(), resolvedPath.data(), resolvedPath.size());
AZ::SettingsRegistryMergeUtils::DumperSettings dumperSettings;
dumperSettings.m_prettifyOutput = true;
dumperSettings.m_jsonPointerPrefix = AWSAttributionSettingsPrefixKey;
AZStd::string stringBuffer;
AZ::IO::ByteContainerStream stringStream(&stringBuffer);
if (!AZ::SettingsRegistryMergeUtils::DumpSettingsRegistryToStream(
*m_settingsRegistry, AWSAttributionSettingsPrefixKey, stringStream, dumperSettings))
{
AZ_Warning(
"AWSAttributionManager", false, R"(Unable to save changes to the Editor AWS Preferences registry file at "%s"\n)",
resolvedPath.data());
return;
}
bool saved{};
constexpr auto configurationMode =
AZ::IO::SystemFile::SF_OPEN_CREATE | AZ::IO::SystemFile::SF_OPEN_CREATE_PATH | AZ::IO::SystemFile::SF_OPEN_WRITE_ONLY;
if (AZ::IO::SystemFile outputFile; outputFile.Open(resolvedPath.data(), configurationMode))
{
saved = outputFile.Write(stringBuffer.data(), stringBuffer.size()) == stringBuffer.size();
}
AZ_Warning(
"AWSAttributionManager", saved, R"(Unable to save Editor AWS Preferences registry file to path "%s"\n)",
editorPreferencesFilePath.c_str());
},
true);
job->Start();
}
void CEditorPreferencesPage_AWS::InitializeSettings()
{
AZ::IO::FileIOBase* fileIO = AZ::IO::FileIOBase::GetInstance();
AZ_Assert(fileIO, "File IO is not initialized.");
// Resolve path to editor_aws_preferences.setreg
AZStd::string editorAWSPreferencesFilePath =
AZStd::string::format("@user@/%s/%s", AZ::SettingsRegistryInterface::RegistryFolder, EditorAWSPreferencesFileName);
AZStd::array<char, AZ::IO::MaxPathLength> resolvedPathAWSPreference{};
if (!fileIO->ResolvePath(editorAWSPreferencesFilePath.c_str(), resolvedPathAWSPreference.data(), resolvedPathAWSPreference.size()))
{
AZ_Warning("AWSAttributionManager", false, "Error resolving path %s", resolvedPathAWSPreference.data());
return;
}
if (fileIO->Exists(resolvedPathAWSPreference.data()))
{
m_settingsRegistry->MergeSettingsFile(resolvedPathAWSPreference.data(), AZ::SettingsRegistryInterface::Format::JsonMergePatch, "");
}
if (!m_settingsRegistry->Get(m_usageOptions.m_awsAttributionEnabled, AWSAttributionEnabledKey))
{
// If key is missing default to on.
m_usageOptions.m_awsAttributionEnabled = true;
}
}
@@ -0,0 +1,60 @@
/*
* All or portions of this file Copyright (c) Amazon.com, Inc. or its affiliates or
* its licensors.
*
* For complete copyright and license terms please see the LICENSE at the root of this
* distribution (the "License"). All use of this software is governed by the License,
* or, if provided, by the license below or the license accompanying this file. Do not
* remove or modify any license notices. This file is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
*
*/
#pragma once
#include "Include/IPreferencesPage.h"
#include <AzCore/Serialization/SerializeContext.h>
#include <AzCore/Settings/SettingsRegistryImpl.h>
#include <AzCore/RTTI/RTTI.h>
#include <QIcon>
class CEditorPreferencesPage_AWS
: public IPreferencesPage
{
public:
AZ_RTTI(CEditorPreferencesPage_AWS, "{51FB9557-ABA3-4FD7-803A-1784F5B06F5F}", IPreferencesPage)
static void Reflect(AZ::SerializeContext& serialize);
CEditorPreferencesPage_AWS();
virtual ~CEditorPreferencesPage_AWS();
// IPreferencesPage interface methods.
virtual const char* GetCategory() override { return "AWS"; }
virtual const char* GetTitle() override;
virtual QIcon& GetIcon() override;
virtual void OnApply() override;
virtual void OnCancel() override {}
virtual bool OnQueryCancel() override { return true; }
protected:
struct UsageOptions
{
AZ_TYPE_INFO(UsageOptions, "{2B7D9B19-D13B-4E54-B724-B2FD8D0828B3}")
bool m_awsAttributionEnabled;
};
const UsageOptions& GetUsageOptions();
private:
void InitializeSettings();
void SaveSettingsRegistryFile();
UsageOptions m_usageOptions;
QIcon m_icon;
AZStd::unique_ptr<AZ::SettingsRegistryImpl> m_settingsRegistry;
static constexpr char AWSAttributionEnabledKey[] = "/Amazon/AWS/Preferences/AWSAttributionEnabled";
static constexpr char EditorPreferencesFileName[] = "editorpreferences.setreg";
static constexpr char EditorAWSPreferencesFileName[] = "editor_aws_preferences.setreg";
static constexpr char AWSAttributionSettingsPrefixKey[] = "/Amazon/AWS/Preferences";
};
+12 -9
View File
@@ -1233,7 +1233,7 @@ void EditorViewportWidget::SetViewportId(int id)
auto controller = AZStd::make_shared<AtomToolsFramework::ModularViewportCameraController>();
controller->SetCameraListBuilderCallback(
[](AzFramework::Cameras& cameras)
[id](AzFramework::Cameras& cameras)
{
auto firstPersonRotateCamera = AZStd::make_shared<AzFramework::RotateCameraInput>(AzFramework::CameraFreeLookButton);
auto firstPersonPanCamera =
@@ -1243,17 +1243,17 @@ void EditorViewportWidget::SetViewportId(int id)
auto orbitCamera = AZStd::make_shared<AzFramework::OrbitCameraInput>();
orbitCamera->SetLookAtFn(
[](const AZ::Vector3& position, const AZ::Vector3& direction) -> AZStd::optional<AZ::Vector3>
[id](const AZ::Vector3& position, const AZ::Vector3& direction) -> AZStd::optional<AZ::Vector3>
{
AZStd::optional<AZ::Transform> manipulatorTransform;
AzToolsFramework::EditorTransformComponentSelectionRequestBus::EventResult(
manipulatorTransform, AzToolsFramework::GetEntityContextId(),
&AzToolsFramework::EditorTransformComponentSelectionRequestBus::Events::GetManipulatorTransform);
AZStd::optional<AZ::Vector3> lookAtAfterInterpolation;
AtomToolsFramework::ModularViewportCameraControllerRequestBus::EventResult(
lookAtAfterInterpolation, id,
&AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::LookAtAfterInterpolation);
// initially attempt to use manipulator transform if one exists (there is a selection)
if (manipulatorTransform)
// initially attempt to use the last set look at point after an interpolation has finished
if (lookAtAfterInterpolation.has_value())
{
return manipulatorTransform->GetTranslation();
return *lookAtAfterInterpolation;
}
const float RayDistance = 1000.0f;
@@ -2887,9 +2887,12 @@ void EditorViewportWidget::UpdateCameraFromViewportContext()
AZ::Matrix3x4 matrix;
matrix.SetBasisAndTranslation(cameraState.m_side, cameraState.m_forward, cameraState.m_up, cameraState.m_position);
auto m = AZMatrix3x4ToLYMatrix3x4(matrix);
m_updatingCameraPosition = true;
SetViewTM(m);
SetFOV(cameraState.m_fovOrZoom);
m_Camera.SetZRange(cameraState.m_nearClip, cameraState.m_farClip);
m_updatingCameraPosition = false;
}
void EditorViewportWidget::SetAsActiveViewport()
+1 -1
View File
@@ -553,7 +553,7 @@ void CLogFile::OnWriteToConsole(const char* sText, bool bNewLine)
// remember selection and the top row
int len = m_hWndEditBox->document()->toPlainText().length();
int top;
int top = 0;
int from = m_hWndEditBox->textCursor().selectionStart();
int to = from + m_hWndEditBox->textCursor().selectionEnd();
bool keepPos = false;
+1
View File
@@ -143,6 +143,7 @@
<file>res/Camera.svg</file>
<file>res/Debug.svg</file>
<file>res/Experimental.svg</file>
<file>res/AWS_preferences_icon.svg</file>
<file>res/Files.svg</file>
<file>res/Gizmos.svg</file>
<file>res/Global.svg</file>
@@ -15,6 +15,8 @@
#include "PreferencesStdPages.h"
#include <AzToolsFramework/Entity/EditorEntityHelpers.h>
// Editor
#include "EditorPreferencesPageGeneral.h"
#include "EditorPreferencesPageFiles.h"
@@ -23,6 +25,7 @@
#include "EditorPreferencesPageViewportMovement.h"
#include "EditorPreferencesPageViewportDebug.h"
#include "EditorPreferencesPageExperimentalLighting.h"
#include "EditorPreferencesPageAWS.h"
//////////////////////////////////////////////////////////////////////////
@@ -42,6 +45,11 @@ CStdPreferencesClassDesc::CStdPreferencesClassDesc()
};
m_pageCreators.push_back([]() { return new CEditorPreferencesPage_ExperimentalLighting(); });
if (AzToolsFramework::IsComponentWithServiceRegistered(AZ_CRC_CE("AWSCoreEditorService")))
{
m_pageCreators.push_back([]() { return new CEditorPreferencesPage_AWS(); });
}
}
HRESULT CStdPreferencesClassDesc::QueryInterface(const IID& riid, void** ppvObj)
+3 -3
View File
@@ -121,7 +121,7 @@ protected:
};
#endif
Q_GLOBAL_STATIC(QtViewPaneManager, s_instance)
Q_GLOBAL_STATIC(QtViewPaneManager, s_viewPaneManagerInstance)
QWidget* QtViewPane::CreateWidget()
@@ -611,12 +611,12 @@ void QtViewPaneManager::UnregisterPane(const QString& name)
QtViewPaneManager* QtViewPaneManager::instance()
{
return s_instance();
return s_viewPaneManagerInstance();
}
bool QtViewPaneManager::exists()
{
return s_instance.exists();
return s_viewPaneManagerInstance.exists();
}
void QtViewPaneManager::SetMainWindow(AzQtComponents::DockMainWindow* mainWindow, QSettings* settings, const QByteArray& lastMainWindowState)
+1
View File
@@ -369,3 +369,4 @@
#define ID_TOOLBAR_WIDGET_SPACER_RIGHT 50013
#define ID_TOOLBAR_WIDGET_PLAYCONSOLE_LABEL 50014
#define ID_TOOLBAR_WIDGET_LAST 50020
#define ID_VIEWPORTUI_VISIBLE 50040
@@ -59,7 +59,7 @@ namespace
{
int fps;
const char* fpsDesc;
} fps[] = {
} fpsOptions[] = {
{24, "Film(24)"}, {25, "PAL(25)"}, {30, "NTSC(30)"},
{48, "Show(48)"}, {50, "PAL Field(50)"}, {60, "NTSC Field(60)"}
};
@@ -213,9 +213,9 @@ void CSequenceBatchRenderDialog::OnInitDialog()
m_ui->m_resolutionCombo->setCurrentIndex(0);
// Fill the FPS combo box.
for (int i = 0; i < AZStd::size(fps); ++i)
for (int i = 0; i < AZStd::size(fpsOptions); ++i)
{
m_ui->m_fpsCombo->addItem(fps[i].fpsDesc);
m_ui->m_fpsCombo->addItem(fpsOptions[i].fpsDesc);
}
m_ui->m_fpsCombo->setCurrentIndex(0);
@@ -306,9 +306,9 @@ void CSequenceBatchRenderDialog::OnRenderItemSelChange()
m_ui->m_destinationEdit->setText(item.folder);
// fps
bool bFound = false;
for (int i = 0; i < arraysize(fps); ++i)
for (int i = 0; i < arraysize(fpsOptions); ++i)
{
if (item.fps == fps[i].fps)
if (item.fps == fpsOptions[i].fps)
{
m_ui->m_fpsCombo->setCurrentIndex(i);
bFound = true;
@@ -621,7 +621,7 @@ void CSequenceBatchRenderDialog::OnFPSEditChange()
void CSequenceBatchRenderDialog::OnFPSChange(int itemIndex)
{
m_customFPS = fps[itemIndex].fps;
m_customFPS = fpsOptions[itemIndex].fps;
CheckForEnableUpdateButton();
}
@@ -1543,13 +1543,13 @@ bool CSequenceBatchRenderDialog::SetUpNewRenderItem(SRenderItem& item)
item.frameRange = Range(m_ui->m_startFrame->value() / m_fpsForTimeToFrameConversion,
m_ui->m_endFrame->value() / m_fpsForTimeToFrameConversion);
// fps
if (m_ui->m_fpsCombo->currentIndex() == -1 || m_ui->m_fpsCombo->currentText() != fps[m_ui->m_fpsCombo->currentIndex()].fpsDesc)
if (m_ui->m_fpsCombo->currentIndex() == -1 || m_ui->m_fpsCombo->currentText() != fpsOptions[m_ui->m_fpsCombo->currentIndex()].fpsDesc)
{
item.fps = m_customFPS;
}
else
{
item.fps = fps[m_ui->m_fpsCombo->currentIndex()].fps;
item.fps = fpsOptions[m_ui->m_fpsCombo->currentIndex()].fps;
}
// prefix
item.prefix = m_ui->BATCH_RENDER_FILE_PREFIX->text();
@@ -205,10 +205,10 @@ CTrackViewAnimNode::CTrackViewAnimNode(IAnimSequence* pSequence, IAnimNode* anim
for (int i = 0; i < nodeCount; ++i)
{
IAnimNode* node = pSequence->GetNode(i);
IAnimNode* pParentNode = node->GetParent();
IAnimNode* pNodeParentNode = node->GetParent();
// If our node is the parent, then the current node is a child of it
if (animNode == pParentNode)
if (animNode == pNodeParentNode)
{
CTrackViewAnimNodeFactory animNodeFactory;
CTrackViewAnimNode* pNewTVAnimNode = animNodeFactory.BuildAnimNode(pSequence, node, this);
@@ -68,12 +68,12 @@ CTrackViewTrack::CTrackViewTrack(IAnimTrack* pTrack, CTrackViewAnimNode* pTrackA
{
// Search for child tracks
const unsigned int subTrackCount = m_pAnimTrack->GetSubTrackCount();
for (unsigned int subTrackIndex = 0; subTrackIndex < subTrackCount; ++subTrackIndex)
for (unsigned int subTrackI = 0; subTrackI < subTrackCount; ++subTrackI)
{
IAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackIndex);
IAnimTrack* pSubTrack = m_pAnimTrack->GetSubTrack(subTrackI);
CTrackViewTrackFactory trackFactory;
CTrackViewTrack* pNewTVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackIndex);
CTrackViewTrack* pNewTVTrack = trackFactory.BuildTrack(pSubTrack, pTrackAnimNode, this, true, subTrackI);
m_childNodes.push_back(std::unique_ptr<CTrackViewNode>(pNewTVTrack));
}
+2 -2
View File
@@ -157,7 +157,7 @@ static Quatern Qt_FromMatrix(HMatrix mat)
* |w| is greater than 1/2, which is as small as a largest component can be.
* Otherwise, the largest diagonal entry corresponds to the largest of |x|,
* |y|, or |z|, one of which must be larger than |w|, and at least 1/2. */
Quatern qu;
Quatern qu = { 0.0f, 0.0f, 0.0f, 1.0f };
double tr, s;
tr = mat[X][X] + mat[Y][Y] + mat[Z][Z];
@@ -531,7 +531,7 @@ Quatern snuggle(Quatern q, HVect* k)
#define swap(a, i, j) {a[3] = a[i]; a[i] = a[j]; a[j] = a[3]; }
#define cycle(a, p) if (p) {a[3] = a[0]; a[0] = a[1]; a[1] = a[2]; a[2] = a[3]; } \
else {a[3] = a[2]; a[2] = a[1]; a[1] = a[0]; a[0] = a[3]; }
Quatern p;
Quatern p = { 0.0f, 0.0f, 0.0f, 1.0f };
float ka[4];
int i, turn = -1;
ka[X] = k->x;
+2 -1
View File
@@ -2239,7 +2239,8 @@ uint32 CFileUtil::GetAttributes(const char* filename, bool bUseSourceControl /*=
bool CFileUtil::CompareFiles(const QString& strFilePath1, const QString& strFilePath2)
{
// Get the size of both files. If either fails we say they are different (most likely one doesn't exist)
uint64 size1, size2;
uint64 size1 = 0;
uint64 size2 = 0;
if (!GetDiskFileSize(strFilePath1.toUtf8().data(), size1) || !GetDiskFileSize(strFilePath2.toUtf8().data(), size2))
{
return false;
+1
View File
@@ -116,6 +116,7 @@ bool CImageBT::Load(const QString& fileName, CFloatImage& image)
// Get the BT header data
BtHeader header;
memset(&header, 0, sizeof(BtHeader)); // C4701 potentially uninitialized local variable 'header' used
bool validData = true;
validData = validData && (fread(&header, sizeof(BtHeader), 1, file) != 0);
+1 -1
View File
@@ -419,7 +419,7 @@ static inline bool MatchesWildcardsIgnoreCaseExt_Tpl(const TS& str, const TS& wi
const typename TS::value_type* savedStrBegin = 0;
const typename TS::value_type* savedStrEnd = 0;
const typename TS::value_type* savedWild = 0;
size_t savedWildCount;
size_t savedWildCount = 0;
const typename TS::value_type* pStr = str.c_str();
const typename TS::value_type* pWild = wildcards.c_str();
@@ -586,6 +586,8 @@ set(FILES
EditorPreferencesPageViewportDebug.cpp
EditorPreferencesPageExperimentalLighting.h
EditorPreferencesPageExperimentalLighting.cpp
EditorPreferencesPageAWS.h
EditorPreferencesPageAWS.cpp
EditorPreferencesDialog.h
EditorPreferencesDialog.cpp
EditorPreferencesDialog.ui
@@ -0,0 +1,3 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M21.4629 11.2764C20.6447 10.508 19.5748 10.0719 18.4419 10.0719C17.8965 10.0719 17.351 10.1758 16.8475 10.3834C16.5748 9.26204 15.9664 8.2237 15.1063 7.37226C13.8685 6.16779 12.6717 5.47607 10.4147 5.47607C7.92095 5.47607 6.586 6.16779 5.32725 7.37226C4.08949 8.57673 3.30673 10.1907 3.30673 11.8935C3.30673 12.1635 3.32771 12.4335 3.34869 12.7035C2.84519 12.8281 2.49509 13.0831 2.13844 13.4362C1.57201 13.9761 1.25732 14.7029 1.25732 15.4713C1.25732 17.1534 2.66292 18.5032 4.3832 18.5032L18.2741 18.524C20.7286 18.524 22.7426 16.5927 22.7426 14.2045C22.7217 13.1039 22.2811 12.0656 21.4629 11.2764ZM17.2975 16.6659L4.65419 16.6867C3.62622 16.6867 3.45969 16.0387 3.37771 15.6437C3.30673 15.3017 3.37861 14.7882 3.53455 14.5799C3.74825 14.2944 4.10093 14.1649 4.5273 14.1216C4.76182 14.0979 5.1687 14.0552 5.32721 13.8355C5.43211 13.6901 5.47406 13.5032 5.45308 13.3163C5.36917 12.901 5.32721 12.5272 5.32721 12.1119C5.32721 10.7413 5.6315 9.73925 6.63849 8.76321C7.64549 7.78717 8.98815 7.24724 10.4147 7.24724C11.8413 7.24724 12.9769 7.56395 13.9839 8.53999C14.865 9.39143 15.3895 10.4921 15.5154 11.655C15.5363 11.8627 15.6622 12.0703 15.872 12.1534C16.0608 12.2365 16.3126 12.2365 16.4804 12.1119C17.6342 11.3643 18.848 11.1981 19.876 12.1742C20.4424 12.7141 20.7426 13.4362 20.7426 14.2045C20.7426 15.9074 19.0808 16.6659 17.2975 16.6659Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 1.4 KiB

@@ -179,11 +179,11 @@ ComponentEntityEditorPlugin::ComponentEntityEditorPlugin([[maybe_unused]] IEdito
LyViewPane::EntityOutliner,
LyViewPane::CategoryTools,
outlinerOptions);
}
AzToolsFramework::ViewPaneOptions options;
options.preferedDockingArea = Qt::NoDockWidgetArea;
RegisterViewPane<SliceRelationshipWidget>(LyViewPane::SliceRelationships, LyViewPane::CategoryTools, options);
AzToolsFramework::ViewPaneOptions options;
options.preferedDockingArea = Qt::NoDockWidgetArea;
RegisterViewPane<SliceRelationshipWidget>(LyViewPane::SliceRelationships, LyViewPane::CategoryTools, options);
}
RegisterModuleResourceSelectors(GetIEditor()->GetResourceSelectorHost());
@@ -1732,13 +1732,14 @@ void SandboxIntegrationManager::GoToEntitiesInViewports(const AzToolsFramework::
// compute new camera transform
const float fov = AzFramework::RetrieveFov(viewportContext->GetCameraProjectionMatrix());
const float fovScale = (1.0f / AZStd::tan(fov * 0.5f));
const float distanceToTarget = selectionSize * fovScale * centerScale;
const float distanceToLookAt = selectionSize * fovScale * centerScale;
const AZ::Transform nextCameraTransform =
AZ::Transform::CreateLookAt(aabb.GetCenter() - (forward * distanceToTarget), aabb.GetCenter());
AZ::Transform::CreateLookAt(aabb.GetCenter() - (forward * distanceToLookAt), aabb.GetCenter());
AtomToolsFramework::ModularViewportCameraControllerRequestBus::Event(
viewportContext->GetId(),
&AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, nextCameraTransform);
&AtomToolsFramework::ModularViewportCameraControllerRequestBus::Events::InterpolateToTransform, nextCameraTransform,
distanceToLookAt);
}
}
}