Merge branch 'development' into Prefab/IncreaseReadFileSizeLimit
Signed-off-by: srikappa-amzn <srikappa@amazon.com>
This commit is contained in:
@@ -63,7 +63,7 @@ namespace ImageProcessingAtom
|
||||
StepAll
|
||||
};
|
||||
|
||||
const char ProcessStepNames[StepAll][64] =
|
||||
[[maybe_unused]] const char ProcessStepNames[StepAll][64] =
|
||||
{
|
||||
"ValidateInput",
|
||||
"GenerateColorChart",
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace AZ
|
||||
{
|
||||
namespace AtomShaderConfig
|
||||
{
|
||||
static constexpr char AtomShaderConfigName[] = "AtomShaderConfig";
|
||||
[[maybe_unused]] static constexpr char AtomShaderConfigName[] = "AtomShaderConfig";
|
||||
|
||||
bool MutateToFirstAbsoluteFolderThatExists(AZStd::string& relativeFolder, AZStd::vector<AZStd::string>& watchFolders)
|
||||
{
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace AZ
|
||||
{
|
||||
namespace ShaderBuilder
|
||||
{
|
||||
static const char* s_azslShaderCompilerName = "AZSL Compiler";
|
||||
[[maybe_unused]] static const char* s_azslShaderCompilerName = "AZSL Compiler";
|
||||
|
||||
AZ::RHI::Format StringToFormat(const char* format)
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace AZ
|
||||
{
|
||||
namespace
|
||||
{
|
||||
static const char* PrecompiledShaderBuilderName = "PrecompiledShaderBuilder";
|
||||
[[maybe_unused]] static const char* PrecompiledShaderBuilderName = "PrecompiledShaderBuilder";
|
||||
static const char* PrecompiledShaderBuilderJobKey = "PrecompiledShader Asset Builder";
|
||||
static const char* ShaderAssetExtension = "azshader";
|
||||
}
|
||||
|
||||
@@ -46,7 +46,7 @@ namespace AZ
|
||||
{
|
||||
namespace ShaderBuilderUtility
|
||||
{
|
||||
static constexpr char ShaderBuilderUtilityName[] = "ShaderBuilderUtility";
|
||||
[[maybe_unused]] static constexpr char ShaderBuilderUtilityName[] = "ShaderBuilderUtility";
|
||||
|
||||
Outcome<RPI::ShaderSourceData, AZStd::string> LoadShaderDataJson(const AZStd::string& fullPathToJsonFile)
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AZ
|
||||
namespace RHI
|
||||
{
|
||||
static AZStd::mutex s_profilingMutex;
|
||||
static constexpr char ShaderPlatformInterfaceName[] = "ShaderPlatformInterface";
|
||||
[[maybe_unused]] static constexpr char ShaderPlatformInterfaceName[] = "ShaderPlatformInterface";
|
||||
|
||||
void ShaderCompilerProfiling::Entry::Reflect(ReflectContext* context)
|
||||
{
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace AZ
|
||||
{
|
||||
namespace Vulkan
|
||||
{
|
||||
static const char* VulkanShaderPlatformName = "VulkanShaderPlatform";
|
||||
[[maybe_unused]] static const char* VulkanShaderPlatformName = "VulkanShaderPlatform";
|
||||
static const char* WindowsPlatformShaderHeader = "Builders/ShaderHeaders/Platform/Windows/Vulkan/PlatformHeader.hlsli";
|
||||
static const char* AndroidPlatformShaderHeader = "Builders/ShaderHeaders/Platform/Android/Vulkan/PlatformHeader.hlsli";
|
||||
static const char* WindowsAzslShaderHeader = "Builders/ShaderHeaders/Platform/Windows/Vulkan/AzslcHeader.azsli";
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace AZ
|
||||
{
|
||||
namespace
|
||||
{
|
||||
const char* AnyAssetBuilderName = "AnyAssetBuilder";
|
||||
[[maybe_unused]] const char* AnyAssetBuilderName = "AnyAssetBuilder";
|
||||
const char* AnyAssetBuilderJobKey = "Any Asset Builder";
|
||||
const char* AnyAssetBuilderDefaultExtension = "azasset";
|
||||
const char* AnyAssetSourceExtensions[] =
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace AZ
|
||||
{
|
||||
namespace
|
||||
{
|
||||
static constexpr char const MaterialBuilderName[] = "MaterialBuilder";
|
||||
[[maybe_unused]] static constexpr char const MaterialBuilderName[] = "MaterialBuilder";
|
||||
}
|
||||
|
||||
const char* MaterialBuilder::JobKey = "Atom Material Builder";
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace AZ
|
||||
{
|
||||
namespace RPI
|
||||
{
|
||||
static const char* MaterialExporterName = "Scene Material Builder";
|
||||
[[maybe_unused]] static const char* MaterialExporterName = "Scene Material Builder";
|
||||
|
||||
void MaterialAssetDependenciesComponent::Reflect(ReflectContext* context)
|
||||
{
|
||||
|
||||
@@ -37,7 +37,7 @@ namespace AZ
|
||||
{
|
||||
namespace RPI
|
||||
{
|
||||
static const char* s_exporterName = "Atom Model Builder";
|
||||
[[maybe_unused]] static const char* s_exporterName = "Atom Model Builder";
|
||||
|
||||
ModelExporterComponent::ModelExporterComponent()
|
||||
{
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace AZ
|
||||
{
|
||||
namespace
|
||||
{
|
||||
static const char* PassBuilderName = "PassBuilder";
|
||||
[[maybe_unused]] static const char* PassBuilderName = "PassBuilder";
|
||||
static const char* PassBuilderJobKey = "Pass Asset Builder";
|
||||
static const char* PassAssetExtension = "pass";
|
||||
}
|
||||
|
||||
+1
-1
@@ -25,7 +25,7 @@ namespace AZ
|
||||
{
|
||||
namespace AtomBridge
|
||||
{
|
||||
static constexpr char AssetCollectionAsyncLoaderTestComponentName[] = " AssetCollectionAsyncLoaderTestComponent";
|
||||
[[maybe_unused]] static constexpr char AssetCollectionAsyncLoaderTestComponentName[] = " AssetCollectionAsyncLoaderTestComponent";
|
||||
|
||||
void AssetCollectionAsyncLoaderTestComponent::Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
|
||||
@@ -50,26 +50,21 @@ namespace EMotionFX
|
||||
return newPlugin;
|
||||
}
|
||||
|
||||
bool RagdollNodeInspectorPlugin::PhysXGemAvailable() const
|
||||
bool RagdollNodeInspectorPlugin::IsPhysXGemAvailable() const
|
||||
{
|
||||
AZ::SerializeContext* serializeContext = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
|
||||
if (serializeContext)
|
||||
{
|
||||
// TypeId of D6JointLimitConfiguration
|
||||
const AZ::SerializeContext::ClassData* classData = serializeContext->FindClassData(AZ::TypeId::CreateString("{90C5C23D-16C0-4F23-AD50-A190E402388E}"));
|
||||
if (classData && ColliderHelpers::AreCollidersReflected())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
// TypeId of PhysX::SystemComponent
|
||||
const char* typeIDPhysXSystem = "{85F90819-4D9A-4A77-AB89-68035201F34B}";
|
||||
|
||||
return serializeContext
|
||||
&& serializeContext->FindClassData(AZ::TypeId::CreateString(typeIDPhysXSystem));
|
||||
}
|
||||
|
||||
bool RagdollNodeInspectorPlugin::Init()
|
||||
{
|
||||
if (PhysXGemAvailable())
|
||||
if (IsPhysXGemAvailable() && ColliderHelpers::AreCollidersReflected())
|
||||
{
|
||||
m_nodeWidget = new RagdollNodeWidget();
|
||||
m_nodeWidget->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
|
||||
|
||||
@@ -80,7 +80,7 @@ namespace EMotionFX
|
||||
void OnPasteJointLimits();
|
||||
|
||||
private:
|
||||
bool PhysXGemAvailable() const;
|
||||
bool IsPhysXGemAvailable() const;
|
||||
|
||||
RagdollNodeWidget* m_nodeWidget;
|
||||
|
||||
|
||||
@@ -14,14 +14,13 @@ namespace EMotionFX
|
||||
{
|
||||
// Add so that RagdollNodeInspectorPlugin::PhysXCharactersGemAvailable() will return the correct value
|
||||
// We duplicated the D6JointLimitConfiguration because it doesn't exist in the test environment.
|
||||
class D6JointLimitConfiguration
|
||||
struct D6JointLimitConfiguration
|
||||
: public AzPhysics::JointConfiguration
|
||||
{
|
||||
public:
|
||||
AZ_CLASS_ALLOCATOR(D6JointLimitConfiguration, AZ::SystemAllocator, 0);
|
||||
// This uses the same uuid as the production D6JointLimitConfiguration.
|
||||
// The Ragdoll UI uses this UUID to see if physx is available.
|
||||
AZ_RTTI(D6JointLimitConfiguration, "{90C5C23D-16C0-4F23-AD50-A190E402388E}", AzPhysics::JointConfiguration);
|
||||
AZ_RTTI(D6JointLimitConfiguration, "{88E067B4-21E8-4FFA-9142-6C52605B704C}", AzPhysics::JointConfiguration);
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context);
|
||||
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AzCore/RTTI/RTTI.h>
|
||||
#include <AzCore/Serialization/SerializeContext.h>
|
||||
#include <AzFramework/Physics/SystemBus.h>
|
||||
#include <AzFramework/Physics/PhysicsScene.h>
|
||||
#include <AzFramework/Physics/PhysicsSystem.h>
|
||||
@@ -20,6 +22,20 @@ namespace Physics
|
||||
, AZ::Interface<Physics::System>::Registrar
|
||||
{
|
||||
public:
|
||||
// This uses the same uuid as the production PhysX::SystemComponent.
|
||||
// The Ragdoll UI uses this UUID to see if physx is available.
|
||||
AZ_RTTI(MockPhysicsSystem, "{85F90819-4D9A-4A77-AB89-68035201F34B}");
|
||||
|
||||
static void Reflect(AZ::ReflectContext* context)
|
||||
{
|
||||
if (auto serializeContext = azrtti_cast<AZ::SerializeContext*>(context))
|
||||
{
|
||||
serializeContext->Class<MockPhysicsSystem>()
|
||||
->Version(0)
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
MockPhysicsSystem()
|
||||
{
|
||||
BusConnect();
|
||||
|
||||
@@ -39,7 +39,10 @@ namespace EMotionFX
|
||||
|
||||
UIFixture::SetUp();
|
||||
|
||||
D6JointLimitConfiguration::Reflect(GetSerializeContext());
|
||||
AZ::SerializeContext* serializeContext = GetSerializeContext();
|
||||
|
||||
Physics::MockPhysicsSystem::Reflect(serializeContext); // Required by Ragdoll plugin to fake PhysX Gem is available
|
||||
D6JointLimitConfiguration::Reflect(serializeContext);
|
||||
|
||||
EXPECT_CALL(m_jointHelpers, GetSupportedJointTypeIds)
|
||||
.WillRepeatedly(testing::Return(AZStd::vector<AZ::TypeId>{ azrtti_typeid<D6JointLimitConfiguration>() }));
|
||||
|
||||
@@ -41,7 +41,10 @@ namespace EMotionFX
|
||||
{
|
||||
using testing::_;
|
||||
|
||||
D6JointLimitConfiguration::Reflect(GetSerializeContext());
|
||||
AZ::SerializeContext* serializeContext = GetSerializeContext();
|
||||
|
||||
Physics::MockPhysicsSystem::Reflect(serializeContext); // Required by Ragdoll plugin to fake PhysX Gem is available
|
||||
D6JointLimitConfiguration::Reflect(serializeContext);
|
||||
|
||||
EMStudio::GetMainWindow()->ApplicationModeChanged("Physics");
|
||||
|
||||
|
||||
@@ -41,6 +41,7 @@ namespace EMotionFX
|
||||
AZ::SerializeContext* serializeContext = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
|
||||
|
||||
Physics::MockPhysicsSystem::Reflect(serializeContext); // Required by Ragdoll plugin to fake PhysX Gem is available
|
||||
D6JointLimitConfiguration::Reflect(serializeContext);
|
||||
|
||||
SetupPluginWindows();
|
||||
|
||||
@@ -40,6 +40,7 @@ namespace EMotionFX
|
||||
AZ::SerializeContext* serializeContext = nullptr;
|
||||
AZ::ComponentApplicationBus::BroadcastResult(serializeContext, &AZ::ComponentApplicationBus::Events::GetSerializeContext);
|
||||
|
||||
Physics::MockPhysicsSystem::Reflect(serializeContext); // Required by Ragdoll plugin to fake PhysX Gem is available
|
||||
D6JointLimitConfiguration::Reflect(serializeContext);
|
||||
|
||||
EXPECT_CALL(m_jointHelpers, GetSupportedJointTypeIds)
|
||||
|
||||
@@ -293,7 +293,7 @@ namespace EditorPythonBindings
|
||||
handler->m_ebus->m_name.c_str(), eventName);
|
||||
}
|
||||
|
||||
void OnEventGenericHook(const char* eventName, pybind11::function callback, [[maybe_unused]] int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters)
|
||||
void OnEventGenericHook([[maybe_unused]] const char* eventName, pybind11::function callback, [[maybe_unused]] int eventIndex, AZ::BehaviorValueParameter* result, int numParameters, AZ::BehaviorValueParameter* parameters)
|
||||
{
|
||||
// build the parameters to send to callback
|
||||
Convert::StackVariableAllocator stackVariableAllocator;
|
||||
|
||||
@@ -73,12 +73,12 @@ inline Gestures::RecognizerClickOrTap::~RecognizerClickOrTap()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerClickOrTap::OnPressedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
switch (m_currentState)
|
||||
{
|
||||
case State::Idle:
|
||||
@@ -120,7 +120,7 @@ inline bool Gestures::RecognizerClickOrTap::OnPressedEvent(const AZ::Vector2& sc
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerClickOrTap::OnDownEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -129,7 +129,7 @@ inline bool Gestures::RecognizerClickOrTap::OnDownEvent(const AZ::Vector2& scree
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if ((currentTime.GetDifferenceInSeconds(m_timeOfLastEvent) > m_config.maxSecondsHeld) ||
|
||||
(screenPosition.GetDistance(m_positionOfLastEvent) > m_config.maxPixelsMoved))
|
||||
{
|
||||
@@ -159,7 +159,7 @@ inline bool Gestures::RecognizerClickOrTap::OnDownEvent(const AZ::Vector2& scree
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerClickOrTap::OnReleasedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -168,7 +168,7 @@ inline bool Gestures::RecognizerClickOrTap::OnReleasedEvent(const AZ::Vector2& s
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if ((currentTime.GetDifferenceInSeconds(m_timeOfLastEvent) > m_config.maxSecondsHeld) ||
|
||||
(screenPosition.GetDistance(m_positionOfLastEvent) > m_config.maxPixelsMoved))
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ inline Gestures::RecognizerDrag::~RecognizerDrag()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerDrag::OnPressedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ inline bool Gestures::RecognizerDrag::OnPressedEvent(const AZ::Vector2& screenPo
|
||||
{
|
||||
case State::Idle:
|
||||
{
|
||||
m_startTime = gEnv->pTimer->GetFrameStartTime().GetValue();
|
||||
m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0;
|
||||
m_startPosition = screenPosition;
|
||||
m_currentPosition = screenPosition;
|
||||
m_currentState = State::Pressed;
|
||||
@@ -90,7 +90,7 @@ inline bool Gestures::RecognizerDrag::OnPressedEvent(const AZ::Vector2& screenPo
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerDrag::OnDownEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ inline bool Gestures::RecognizerDrag::OnDownEvent(const AZ::Vector2& screenPosit
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if ((currentTime.GetDifferenceInSeconds(m_startTime) >= m_config.minSecondsHeld) &&
|
||||
(GetDistance() >= m_config.minPixelsMoved))
|
||||
{
|
||||
|
||||
@@ -59,7 +59,7 @@ inline Gestures::RecognizerHold::~RecognizerHold()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerHold::OnPressedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ inline bool Gestures::RecognizerHold::OnPressedEvent(const AZ::Vector2& screenPo
|
||||
{
|
||||
case State::Idle:
|
||||
{
|
||||
m_startTime = gEnv->pTimer->GetFrameStartTime().GetValue();
|
||||
m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0;
|
||||
m_startPosition = screenPosition;
|
||||
m_currentPosition = screenPosition;
|
||||
m_currentState = State::Pressed;
|
||||
@@ -90,7 +90,7 @@ inline bool Gestures::RecognizerHold::OnPressedEvent(const AZ::Vector2& screenPo
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerHold::OnDownEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -101,7 +101,7 @@ inline bool Gestures::RecognizerHold::OnDownEvent(const AZ::Vector2& screenPosit
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if (screenPosition.GetDistance(m_startPosition) > m_config.maxPixelsMoved)
|
||||
{
|
||||
// Hold recognition failed.
|
||||
|
||||
@@ -106,13 +106,13 @@ inline float AngleInDegreesBetweenVectors(const AZ::Vector2& vec0, const AZ::Vec
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerPinch::OnDownEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex > s_maxPinchPointerIndex)
|
||||
if (pointerIndex > s_maxPinchPointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_currentPositions[pointerIndex] = screenPosition;
|
||||
m_lastUpdateTimes[pointerIndex] = gEnv->pTimer->GetFrameStartTime().GetValue();
|
||||
m_lastUpdateTimes[pointerIndex] = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0;
|
||||
if (m_lastUpdateTimes[0] != m_lastUpdateTimes[1])
|
||||
{
|
||||
// We need to wait until both touches have been updated this frame.
|
||||
|
||||
@@ -95,13 +95,13 @@ inline bool Gestures::RecognizerRotate::OnPressedEvent(const AZ::Vector2& screen
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerRotate::OnDownEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex > s_maxRotatePointerIndex)
|
||||
if (pointerIndex > s_maxRotatePointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
m_currentPositions[pointerIndex] = screenPosition;
|
||||
m_lastUpdateTimes[pointerIndex] = gEnv->pTimer->GetFrameStartTime().GetValue();
|
||||
m_lastUpdateTimes[pointerIndex] = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0;
|
||||
if (m_lastUpdateTimes[0] != m_lastUpdateTimes[1])
|
||||
{
|
||||
// We need to wait until both touches have been updated this frame.
|
||||
|
||||
@@ -59,7 +59,7 @@ inline Gestures::RecognizerSwipe::~RecognizerSwipe()
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerSwipe::OnPressedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -68,7 +68,7 @@ inline bool Gestures::RecognizerSwipe::OnPressedEvent(const AZ::Vector2& screenP
|
||||
{
|
||||
case State::Idle:
|
||||
{
|
||||
m_startTime = gEnv->pTimer->GetFrameStartTime().GetValue();
|
||||
m_startTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime().GetValue() : 0;
|
||||
m_startPosition = screenPosition;
|
||||
m_endPosition = screenPosition;
|
||||
m_currentState = State::Pressed;
|
||||
@@ -89,7 +89,7 @@ inline bool Gestures::RecognizerSwipe::OnPressedEvent(const AZ::Vector2& screenP
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerSwipe::OnDownEvent([[maybe_unused]] const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -98,7 +98,7 @@ inline bool Gestures::RecognizerSwipe::OnDownEvent([[maybe_unused]] const AZ::Ve
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if (currentTime.GetDifferenceInSeconds(m_startTime) > m_config.maxSecondsHeld)
|
||||
{
|
||||
// Swipe recognition failed because we took too long.
|
||||
@@ -125,7 +125,7 @@ inline bool Gestures::RecognizerSwipe::OnDownEvent([[maybe_unused]] const AZ::Ve
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
inline bool Gestures::RecognizerSwipe::OnReleasedEvent(const AZ::Vector2& screenPosition, uint32_t pointerIndex)
|
||||
{
|
||||
if (!gEnv || !gEnv->pTimer || pointerIndex != m_config.pointerIndex)
|
||||
if (pointerIndex != m_config.pointerIndex)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -134,7 +134,7 @@ inline bool Gestures::RecognizerSwipe::OnReleasedEvent(const AZ::Vector2& screen
|
||||
{
|
||||
case State::Pressed:
|
||||
{
|
||||
const CTimeValue currentTime = gEnv->pTimer->GetFrameStartTime();
|
||||
const CTimeValue currentTime = (gEnv && gEnv->pTimer) ? gEnv->pTimer->GetFrameStartTime() : CTimeValue();
|
||||
if ((currentTime.GetDifferenceInSeconds(m_startTime) <= m_config.maxSecondsHeld) &&
|
||||
(screenPosition.GetDistance(m_startPosition) >= m_config.minPixelsMoved))
|
||||
{
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
namespace MaterialBuilder
|
||||
{
|
||||
const char s_materialBuilder[] = "MaterialBuilder";
|
||||
[[maybe_unused]] const char s_materialBuilder[] = "MaterialBuilder";
|
||||
|
||||
namespace Internal
|
||||
{
|
||||
|
||||
@@ -49,7 +49,7 @@ namespace SliceBuilder
|
||||
}
|
||||
} // namespace anonymous
|
||||
|
||||
static const char* const s_sliceBuilder = "SliceBuilder";
|
||||
[[maybe_unused]] static const char* const s_sliceBuilder = "SliceBuilder";
|
||||
static const char* const s_sliceBuilderSettingsFilename = "SliceBuilderSettings.json";
|
||||
|
||||
SliceBuilderWorker::SliceBuilderWorker()
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
namespace LyShine
|
||||
{
|
||||
static const char* const s_uiSliceBuilder = "UiSliceBuilder";
|
||||
[[maybe_unused]] static const char* const s_uiSliceBuilder = "UiSliceBuilder";
|
||||
|
||||
void UiCanvasBuilderWorker::ShutDown()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace SubgraphInterfaceCpp
|
||||
Current
|
||||
};
|
||||
|
||||
const size_t k_maxTabs = 20;
|
||||
[[maybe_unused]] const size_t k_maxTabs = 20;
|
||||
|
||||
AZ_INLINE const char* GetTabs(size_t tabs)
|
||||
{
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ namespace ExecutionInterpretedAPICpp
|
||||
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, k_Bad,k_Bad,k_Bad,k_Bad,k_Bad,k_Bad,k_Bad, 10, 11, 12, 13, 14, 15
|
||||
};
|
||||
|
||||
constexpr unsigned char k_FastValuesIndexSentinel = 'G' - '0';
|
||||
[[maybe_unused]] constexpr unsigned char k_FastValuesIndexSentinel = 'G' - '0';
|
||||
|
||||
template<typename T>
|
||||
T* GetAs(AZ::BehaviorValueParameter& argument)
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
namespace ScriptEventsBuilder
|
||||
{
|
||||
static const char* s_scriptEventsBuilder = "ScriptEventsBuilder";
|
||||
[[maybe_unused]] static const char* s_scriptEventsBuilder = "ScriptEventsBuilder";
|
||||
|
||||
Worker::Worker()
|
||||
{
|
||||
|
||||
@@ -36,7 +36,7 @@ namespace Terrain
|
||||
namespace
|
||||
{
|
||||
const uint32_t DEFAULT_UploadBufferSize = 512 * 1024; // 512k
|
||||
const char* TerrainFPName = "TerrainFeatureProcessor";
|
||||
[[maybe_unused]] const char* TerrainFPName = "TerrainFeatureProcessor";
|
||||
}
|
||||
|
||||
namespace ShaderInputs
|
||||
|
||||
Reference in New Issue
Block a user