Merge remote-tracking branch 'upstream/development' into hultonha_LYN-2349_tube_delete_crash

Signed-off-by: hultonha <hultonha@amazon.co.uk>
This commit is contained in:
hultonha
2021-07-16 12:58:39 +01:00
130 changed files with 551 additions and 3479 deletions
@@ -43,11 +43,36 @@ namespace Platform
}
return physicalDeviceList;
}
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval)
float GetRefreshRate()
{
AZ_UNUSED(syncInterval);
[mtlCommandBuffer presentDrawable:drawable];
CGDirectDisplayID display = CGMainDisplayID();
CGDisplayModeRef currentMode = CGDisplayCopyDisplayMode(display);
return CGDisplayModeGetRefreshRate(currentMode);
}
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval, float refreshRate)
{
bool framePresented = false;
//seconds per frame (1/refreshrate) * num frames (sync interval)
float presentAfterMinimumDuration = syncInterval / refreshRate;
#if defined(__MAC_10_15_4)
if(@available(macOS 10.15.4, *))
{
if(presentAfterMinimumDuration > 0.0f)
{
[mtlCommandBuffer presentDrawable:drawable afterMinimumDuration:presentAfterMinimumDuration];
framePresented = true;
}
}
#endif
if(!framePresented)
{
[mtlCommandBuffer presentDrawable:drawable];
}
}
CGRect GetScreenBounds(NativeWindowType* nativeWindow)
@@ -29,13 +29,19 @@ namespace Platform
return physicalDeviceList;
}
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval)
float GetRefreshRate()
{
bool hasPresentAfterMinimumDuration = [drawable respondsToSelector:@selector(presentAfterMinimumDuration:)];
if (hasPresentAfterMinimumDuration && syncInterval > 0.0f)
NativeScreenType* nativeScreen = [NativeScreenType mainScreen];
return [nativeScreen maximumFramesPerSecond];
}
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval, float refreshRate)
{
//seconds per frame (1/refreshrate) * num frames (sync interval)
float presentAfterMinimumDuration = syncInterval / refreshRate;
if (hasPresentAfterMinimumDuration > 0.0f)
{
[mtlCommandBuffer presentDrawable:drawable afterMinimumDuration:syncInterval];
[mtlCommandBuffer presentDrawable:drawable afterMinimumDuration:presentAfterMinimumDuration];
}
else
{
@@ -19,8 +19,9 @@ namespace Platform
CGFloat GetScreenScale();
void AttachViewController(NativeWindowType* nativeWindow, NativeViewControllerType* viewController, RHIMetalView* metalView);
void UnAttachViewController(NativeWindowType* nativeWindow, NativeViewControllerType* viewController);
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval);
void PresentInternal(id <MTLCommandBuffer> mtlCommandBuffer, id<CAMetalDrawable> drawable, float syncInterval, float refreshRate);
void ResizeInternal(RHIMetalView* metalView, CGSize viewSize);
float GetRefreshRate();
RHIMetalView* GetMetalView(NativeWindowType* nativeWindow);
}
@@ -73,6 +74,15 @@ namespace AZ
AddSubView();
}
m_refreshRate = Platform::GetRefreshRate();
//Assume 60hz if 0 is returned.
//Internal OSX displays have 'flexible' refresh rates, with a max of 60Hz - but report 0hz
if (m_refreshRate < 0.1f)
{
m_refreshRate = 60.0f;
}
m_drawables.resize(descriptor.m_dimensions.m_imageCount);
if (nativeDimensions)
@@ -148,10 +158,9 @@ namespace AZ
uint32_t SwapChain::PresentInternal()
{
const uint32_t currentImageIndex = GetCurrentImageIndex();
//GFX TODO][ATOM-432] - Hardcoding to 30fps for now. Only used by ios. This needs to be driven by higher level code.
float syncInterval = 1.0f/30.0f;
//Preset the drawable
Platform::PresentInternal(m_mtlCommandBuffer, m_drawables[currentImageIndex], syncInterval);
Platform::PresentInternal(m_mtlCommandBuffer, m_drawables[currentImageIndex], GetDescriptor().m_verticalSyncInterval, m_refreshRate);
[m_drawables[currentImageIndex] release];
m_drawables[currentImageIndex] = nil;
@@ -52,6 +52,7 @@ namespace AZ
id<MTLDevice> m_mtlDevice = nil;
NativeWindowType* m_nativeWindow = nullptr;
AZStd::vector<id<CAMetalDrawable>> m_drawables;
float m_refreshRate = 0.0f;
};
}
}
@@ -58,8 +58,8 @@ namespace AZ
RHI::ShaderResourceGroupPoolDescriptor poolDescriptor;
poolDescriptor.m_layout = shaderAsset.FindShaderResourceGroupLayout(srgName, supervariantIndex).get();
m_pool->SetName(srgName);
m_pool->SetName(AZ::Name(AZStd::string::format("%s_%s",shaderAsset.GetName().GetCStr(),srgName.GetCStr())));
const RHI::ResultCode resultCode = m_pool->Init(*device, poolDescriptor);
return resultCode;
}
@@ -27,7 +27,7 @@ void OnVsyncIntervalChanged(uint32_t const& interval)
// NOTE: On change, broadcasts the new requested vsync interval to all windows.
// The value of the vsync interval is constrained between 0 and 4
// Vsync intervals greater than 1 are not currently supported on the Vulkan RHI (see #2061 for discussion)
AZ_CVAR(uint32_t, rpi_vsync_interval, 0, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
AZ_CVAR(uint32_t, rpi_vsync_interval, 1, OnVsyncIntervalChanged, AZ::ConsoleFunctorFlags::Null, "Set swapchain vsync interval");
namespace AZ
{
@@ -11,7 +11,6 @@
#include <SceneAPI/SceneCore/Containers/Utilities/Filters.h>
#include <SceneAPI/SceneCore/Utilities/Reporting.h>
#include <SceneAPI/SceneCore/DataTypes/DataTypeUtilities.h>
#include <SceneAPI/SceneCore/DataTypes/GraphData/IBoneData.h>
#include <SceneAPI/SceneCore/DataTypes/GraphData/IAnimationData.h>
#include <SceneAPI/SceneData/Rules/CoordinateSystemRule.h>
@@ -166,6 +165,34 @@ namespace EMotionFX
return finalMotionData;
}
AZ::SceneAPI::DataTypes::MatrixType MotionDataBuilder::GetLocalSpaceBindPose(const SceneContainers::SceneGraph& sceneGraph,
const SceneContainers::SceneGraph::NodeIndex rootBoneNodeIndex,
const SceneContainers::SceneGraph::NodeIndex nodeIndex,
const SceneDataTypes::ITransform* transform,
const SceneDataTypes::IBoneData* bone) const
{
if (nodeIndex != rootBoneNodeIndex)
{
const SceneContainers::SceneGraph::NodeIndex parentNodeIndex = sceneGraph.GetNodeParent(nodeIndex);
const SceneDataTypes::IGraphObject* parentNode = sceneGraph.GetNodeContent(parentNodeIndex).get();
if (const SceneDataTypes::IBoneData* parentBone = azrtti_cast<const SceneDataTypes::IBoneData*>(parentNode))
{
return parentBone->GetWorldTransform().GetInverseFull() * bone->GetWorldTransform();
}
}
if (bone)
{
return bone->GetWorldTransform();
}
else if (transform)
{
return transform->GetMatrix();
}
return AZ::SceneAPI::DataTypes::MatrixType::CreateIdentity();
}
AZ::SceneAPI::Events::ProcessingResult MotionDataBuilder::BuildMotionData(MotionDataBuilderContext& context)
{
if (context.m_phase != AZ::RC::Phase::Filling)
@@ -220,8 +247,10 @@ namespace EMotionFX
continue;
}
AZStd::shared_ptr<const SceneDataTypes::IBoneData> nodeBone = azrtti_cast<const SceneDataTypes::IBoneData*>(it->second);
if (!nodeBone)
// Check if we are dealing with a transform node or a bone and only recurse down the node hierarchy in this case.
const SceneDataTypes::IBoneData* nodeBone = azrtti_cast<const SceneDataTypes::IBoneData*>(it->second.get());
const SceneDataTypes::ITransform* nodeTransform = azrtti_cast<const SceneDataTypes::ITransform*>(it->second.get());
if (!nodeBone && !nodeTransform)
{
it.IgnoreNodeDescendants();
continue;
@@ -289,24 +318,13 @@ namespace EMotionFX
// Get the bind pose transform in local space.
using SceneAPIMatrixType = AZ::SceneAPI::DataTypes::MatrixType;
SceneAPIMatrixType bindSpaceLocalTransform;
const SceneContainers::SceneGraph::NodeIndex parentIndex = graph.GetNodeParent(boneNodeIndex);
if (boneNodeIndex != rootBoneNodeIndex)
{
auto parentNode = graph.GetNodeContent(parentIndex);
AZStd::shared_ptr<const SceneDataTypes::IBoneData> parentNodeBone = azrtti_cast<const SceneDataTypes::IBoneData*>(parentNode);
bindSpaceLocalTransform = parentNodeBone->GetWorldTransform().GetInverseFull() * nodeBone->GetWorldTransform();
}
else
{
bindSpaceLocalTransform = nodeBone->GetWorldTransform();
}
const SceneAPIMatrixType bindSpaceLocalTransform = GetLocalSpaceBindPose(graph, rootBoneNodeIndex, boneNodeIndex, nodeTransform, nodeBone);
// Get the time step and make sure it didn't change compared to other joint animations.
const double timeStep = animation->GetTimeStepBetweenFrames();
lowestTimeStep = AZ::GetMin<double>(timeStep, lowestTimeStep);
SceneAPIMatrixType sampleFrameTransformInverse;
AZ::SceneAPI::DataTypes::MatrixType sampleFrameTransformInverse;
if (additiveRule)
{
size_t sampleFrameIndex = additiveRule->GetSampleFrameIndex();
@@ -9,6 +9,9 @@
#include <SceneAPI/SceneCore/Components/ExportingComponent.h>
#include <SceneAPI/SceneCore/Containers/Scene.h>
#include <SceneAPI/SceneCore/Containers/SceneGraph.h>
#include <SceneAPI/SceneCore/DataTypes/GraphData/IBoneData.h>
#include <SceneAPI/SceneCore/DataTypes/GraphData/ITransform.h>
namespace EMotionFX
{
@@ -28,6 +31,14 @@ namespace EMotionFX
static void Reflect(AZ::ReflectContext* context);
AZ::SceneAPI::Events::ProcessingResult BuildMotionData(MotionDataBuilderContext& context);
private:
//! Get the bind pose transform in local space.
AZ::SceneAPI::DataTypes::MatrixType GetLocalSpaceBindPose(const AZ::SceneAPI::Containers::SceneGraph& sceneGraph,
const AZ::SceneAPI::Containers::SceneGraph::NodeIndex rootBoneNodeIndex,
const AZ::SceneAPI::Containers::SceneGraph::NodeIndex nodeIndex,
const AZ::SceneAPI::DataTypes::ITransform* transform,
const AZ::SceneAPI::DataTypes::IBoneData* bone) const;
};
} // namespace Pipeline
} // namespace EMotionFX
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "idle_cwby_01",
"selectedRootBone": "RootNode.Reference",
"id": "{492E8A35-2647-581F-A701-F1D2A9FBB979}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,61 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "reload",
"selectedRootBone": "RootNode.Reference",
"id": "{28092685-3550-5583-A666-CD60018AB2E9}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "ReloadEvent",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "ReloadEvent",
"startTime": 0.509211003780365,
"endTime": 0.509211003780365,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "ReloadEvent",
"startTime": 1.2446810007095338,
"endTime": 1.2446810007095338,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "ReloadEvent",
"startTime": 1.4295190572738648,
"endTime": 1.4295190572738648,
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,59 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "run",
"selectedRootBone": "RootNode.Reference",
"id": "{7D6889F1-6536-57B6-8B02-93C815D1ADA9}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "Sync",
"startTime": 0.3396751880645752,
"endTime": 0.3396751880645752,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "Sync",
"startTime": 0.6319156885147095,
"endTime": 0.6319156885147095,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,47 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "shootrecoil",
"selectedRootBone": "RootNode.Reference",
"id": "{A1DC3BB2-3324-50F3-8C4B-BBFB61623129}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "RecoilEvent",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "RecoilEvent",
"startTime": 0.23250000178813935,
"endTime": 0.23250000178813935,
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeback",
"selectedRootBone": "RootNode.Reference",
"id": "{CA0EF712-DA36-5DA8-B474-207BD250CF2F}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameEvents",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameEvents",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafebackl",
"selectedRootBone": "RootNode.Reference",
"id": "{9433F0E6-EA1A-5473-AA21-EE4DC45387C1}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafebackr",
"selectedRootBone": "RootNode.Reference",
"id": "{5392AC3D-FF18-51F5-984E-248CAAF09F2E}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,59 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeforward",
"selectedRootBone": "RootNode.Reference",
"id": "{2FB879C6-B3FB-5BD8-B52B-1012000351C2}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "Sync",
"startTime": 0.2708907127380371,
"endTime": 0.2708907127380371,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "Sync",
"startTime": 0.9699265956878662,
"endTime": 0.9699265956878662,
"eventDatas": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeforwardl",
"selectedRootBone": "RootNode.Reference",
"id": "{2D945D52-C313-57A3-B722-C6402ACC3506}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeforwardr",
"selectedRootBone": "RootNode.Reference",
"id": "{3E691B9F-C0D7-5BFD-BBBC-50BAE737886E}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeinplace",
"selectedRootBone": "RootNode.Reference",
"id": "{A2686CFC-D49B-5468-AE9F-E3F84FA75C6D}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "strafeleft",
"selectedRootBone": "RootNode.Reference",
"id": "{2093C7DF-0C51-5C2B-B763-4DC1CC81D10E}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -1,45 +0,0 @@
{
"values": [
{
"$type": "MotionGroup",
"name": "straferight",
"selectedRootBone": "RootNode.Reference",
"id": "{CE0E45E9-4B8C-5340-9521-B6290BAB24FC}",
"rules": {
"rules": [
{
"$type": "MetaDataRule",
"commands": [
{
"$type": "CommandSystem::CommandAdjustMotion",
"dirtyFlag": {},
"motionExtractionFlags": {},
"name": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "Sync",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEventTrack",
"eventTrackName": "GameState",
"eventTrackIndex": {},
"isEnabled": {}
},
{
"$type": "CommandSystem::CommandCreateMotionEvent",
"eventTrackName": "GameState",
"eventDatas": {}
}
]
},
{
"$type": "MotionSamplingRule"
}
]
}
}
]
}
@@ -493,7 +493,8 @@ namespace AZ::SceneGenerationComponents
// Copy node attributes
AZStd::apply([](const auto&&... nodePairView) {
((AZStd::for_each(begin(nodePairView), end(nodePairView), [](const auto& nodePair) {
auto& [originalNode, optimizedNode] = nodePair;
auto& originalNode = nodePair.first;
auto& optimizedNode = nodePair.second;
optimizedNode->CloneAttributesFrom(&originalNode.get());
})), ...);
}, std::tuple {