From d841f0c0db73e4c2449360824425f55f1e3a43aa Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Fri, 4 Jun 2021 16:18:53 -0500 Subject: [PATCH 01/91] Got transform result close for 3 bone chain, longer chains are still not correct (cherry picked from commit 5ac65de6148dcc03b9f2953e97dd943493f23ed9) # Conflicts: # Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp --- .../Importers/AssImpTransformImporter.cpp | 64 +++++++++++++++++-- 1 file changed, 58 insertions(+), 6 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp index bcc007e3a7..153dfce69d 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp @@ -61,7 +61,7 @@ namespace AZ } } } - +#pragma optimize("", off) Events::ProcessingResult AssImpTransformImporter::ImportTransform(AssImpSceneNodeAppendedContext& context) { AZ_TraceContext("Importer", "transform"); @@ -79,6 +79,11 @@ namespace AZ auto boneIterator = boneLookup.find(currentNode->mName.C_Str()); const bool isBone = boneIterator != boneLookup.end(); + if (currentNode->mName.C_Str() == AZStd::string("FrontCloth_02")) + { + __debugbreak(); + } + aiMatrix4x4 combinedTransform; if (isBone) @@ -87,20 +92,67 @@ namespace AZ aiMatrix4x4 offsetMatrix = boneIterator->second->mOffsetMatrix; aiMatrix4x4 parentOffset {}; + aiMatrix4x4 parentTransform{}; + + if (parentNode) + { + parentTransform = parentNode->mTransformation; + } + + auto azOffset = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(offsetMatrix); + decltype(azOffset) azParentOffset{}; + AZStd::vector transforms, offsets, inverseTransforms, inverseOffsets; + + auto addTransform = [&](AZStd::string, aiMatrix4x4 mat) + { + auto azMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat); + transforms.push_back(azMat); + inverseTransforms.push_back(azMat.GetInverseFull()); + }; + auto addOffset = [&]([[maybe_unused]] auto name, aiMatrix4x4 mat) + { + auto azMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat); + offsets.push_back(azMat); + inverseOffsets.push_back(azMat.GetInverseFull()); + }; + + auto curNode = currentNode; + + while (curNode && boneLookup.count(curNode->mName.C_Str())) + { + AZStd::string name = curNode->mName.C_Str(); + addOffset(name, boneLookup.at(name)->mOffsetMatrix); + addTransform(name, curNode->mTransformation); + + curNode = curNode->mParent; + } + + // Go up the tree to find the root bone. It's parent will be the scene mRootNode + while (parentNode && parentNode->mParent && parentNode->mParent != scene->mRootNode) + { + parentNode = parentNode->mParent; + } auto parentBoneIterator = boneLookup.find(parentNode->mName.C_Str()); + aiMatrix4x4 rootOffsetMatrix{}; - if (parentNode && parentBoneIterator != boneLookup.end()) + if (parentBoneIterator != boneLookup.end()) { - const auto& parentBone = parentBoneIterator->second; - - parentOffset = parentBone->mOffsetMatrix; + rootOffsetMatrix = parentBoneIterator->second->mOffsetMatrix; } auto inverseOffset = offsetMatrix; inverseOffset.Inverse(); - combinedTransform = parentOffset * inverseOffset; + auto parentTransformInverse = parentTransform; + parentTransformInverse.Inverse(); + + //auto azInverse = azOffset.GetInverseFull(); + //auto azCombined = azParentOffset * azInverse; + //combinedTransform = parentOffset * inverseOffset; + + //parentTransform ^-1 * parentParent * azOffsetInverse + combinedTransform = parentTransformInverse * rootOffsetMatrix * inverseOffset; } else { From 66a030b800c0def8a0b15847b3661b990f925837 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Wed, 9 Jun 2021 22:35:03 -0500 Subject: [PATCH 02/91] Fix transform data Use first offsetMatrix for a bone (there may be multiple) and calculate using offsetOfParent * inverseRootOffset * rootOffset * inverseOffset (cherry picked from commit a8eae976dda39ad28f9aa235e1e6ba34715ac48a) # Conflicts: # Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp --- .../Importers/AssImpTransformImporter.cpp | 39 ++++++++++++++----- 1 file changed, 30 insertions(+), 9 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp index 153dfce69d..dc59f59147 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp @@ -46,8 +46,9 @@ namespace AZ serializeContext->Class()->Version(1); } } - - void GetAllBones(const aiScene* scene, AZStd::unordered_map& boneLookup) + + void GetAllBones( + const aiScene* scene, AZStd::unordered_multimap& boneLookup) { for (unsigned meshIndex = 0; meshIndex < scene->mNumMeshes; ++meshIndex) { @@ -57,7 +58,7 @@ namespace AZ { const aiBone* bone = mesh->mBones[boneIndex]; - boneLookup[bone->mName.C_Str()] = bone; + boneLookup.emplace(bone->mName.C_Str(), bone); } } } @@ -73,18 +74,19 @@ namespace AZ return Events::ProcessingResult::Ignored; } - AZStd::unordered_map boneLookup; + AZStd::unordered_multimap boneLookup; GetAllBones(scene, boneLookup); auto boneIterator = boneLookup.find(currentNode->mName.C_Str()); const bool isBone = boneIterator != boneLookup.end(); - if (currentNode->mName.C_Str() == AZStd::string("FrontCloth_02")) + if (currentNode->mName.C_Str() == AZStd::string("spine_C0_0_jnt")) { - __debugbreak(); + //__debugbreak(); } aiMatrix4x4 combinedTransform; + DataTypes::MatrixType finalMat; if (isBone) { @@ -121,7 +123,16 @@ namespace AZ while (curNode && boneLookup.count(curNode->mName.C_Str())) { AZStd::string name = curNode->mName.C_Str(); - addOffset(name, boneLookup.at(name)->mOffsetMatrix); + + auto range = boneLookup.equal_range(name); + + for (auto it = range.first; it != range.second; ++it) + { + addOffset(name, it->second->mOffsetMatrix); + break; + } + + //addOffset(name, boneLookup.at(name)->mOffsetMatrix); addTransform(name, curNode->mTransformation); curNode = curNode->mParent; @@ -152,14 +163,24 @@ namespace AZ //combinedTransform = parentOffset * inverseOffset; //parentTransform ^-1 * parentParent * azOffsetInverse - combinedTransform = parentTransformInverse * rootOffsetMatrix * inverseOffset; + //combinedTransform = parentTransformInverse * rootOffsetMatrix * inverseOffset; + + //azNodeLocal = offsets[1] * inverseOffsets[3] * (offsets[3] * inverseOffsets[0]) + finalMat = + offsets.at(AZ::GetMin(offsets.size()-1, (decltype(offsets.size()))1)) * inverseOffsets.at(inverseOffsets.size() - 1) * offsets.at(offsets.size() - 1) * inverseOffsets.at(0); } else { combinedTransform = GetConcatenatedLocalTransform(currentNode); } - DataTypes::MatrixType localTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(combinedTransform); + //DataTypes::MatrixType localTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(combinedTransform); + DataTypes::MatrixType localTransform = finalMat; + + if (localTransform == DataTypes::MatrixType::Identity()) + { + return Events::ProcessingResult::Ignored; + } context.m_sourceSceneSystem.SwapTransformForUpAxis(localTransform); context.m_sourceSceneSystem.ConvertUnit(localTransform); From 10999b699979aed380138557457440f55e3f0938 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Sat, 12 Jun 2021 13:26:25 -0500 Subject: [PATCH 03/91] All bones have animations (cherry picked from commit d17a8070010cdc5bc4e08d17b1549736d031414a) --- .../Importers/AssImpAnimationImporter.cpp | 36 +++++++++++++------ 1 file changed, 26 insertions(+), 10 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index d72cdde8e7..f066540c50 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -255,7 +255,6 @@ namespace AZ { return AZStd::make_pair(animation, anim); } - Events::ProcessingResult AssImpAnimationImporter::ImportAnimation(AssImpSceneNodeAppendedContext& context) { AZ_TraceContext("Importer", "Animation"); @@ -447,24 +446,41 @@ namespace AZ return combinedAnimationResult.GetResult(); } + + AZStd::unordered_set boneList; + + for (int i = 0; i < scene->mNumMeshes; ++i) + { + auto mesh = scene->mMeshes[i]; + + for (auto boneIndex = 0; boneIndex < mesh->mNumBones; ++boneIndex) + { + auto bone = mesh->mBones[boneIndex]; + + boneList.insert(bone->mName.C_Str()); + } + } + decltype(boneAnimations) parentFillerAnimations; // Go through all the animations and make sure we create animations for bones who's parents don't have an animation for (auto&& anim : boneAnimations) { - const aiNode* node = scene->mRootNode->FindNode(anim.first.c_str()); - const aiNode* parent = node->mParent; + //const aiNode* node = scene->mRootNode->FindNode(anim.first.c_str()); + //const aiNode* parent = node->mParent; - while (parent && parent != scene->mRootNode) + //while (parent && parent != scene->mRootNode) + for (auto boneName : boneList) { - if (!IsPivotNode(parent->mName)) + if (!IsPivotNode(aiString(boneName.c_str()))) { - if (boneAnimations.find(parent->mName.C_Str()) == boneAnimations.end() && - parentFillerAnimations.find(parent->mName.C_Str()) == parentFillerAnimations.end()) + if (boneAnimations.find(boneName) == boneAnimations.end() && + parentFillerAnimations.find(boneName) == parentFillerAnimations.end()) { // Create 1 key for each type that just copies the current transform ConsolidatedNodeAnim emptyAnimation; - aiMatrix4x4 globalTransform = GetConcatenatedLocalTransform(parent); + auto node = scene->mRootNode->FindNode(boneName.c_str()); + aiMatrix4x4 globalTransform = GetConcatenatedLocalTransform(node); aiVector3D position, scale; aiQuaternion rotation; @@ -483,11 +499,11 @@ namespace AZ emptyAnimation.mScalingKeys = emptyAnimation.m_ownedScalingKeys.data(); parentFillerAnimations.insert( - AZStd::make_pair(parent->mName.C_Str(), AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); + AZStd::make_pair(boneName, AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); } } - parent = parent->mParent; + //parent = parent->mParent; } } From 9b039c1f9da20e7c8b881bdf81d6df88af0342d4 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Sat, 12 Jun 2021 13:27:32 -0500 Subject: [PATCH 04/91] Fix creating bone data for non-bones (cherry picked from commit 8d1bdd1456e70e4efc47aa36dce660bc91e7dfcf) --- .../Importers/AssImpBoneImporter.cpp | 25 +++++++++++++------ 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp index 5b43941715..694e3566f6 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp @@ -97,7 +97,7 @@ namespace AZ EnumChildren(scene, child, mainBoneList, boneLookup); } } - +#pragma optimize("", off) Events::ProcessingResult AssImpBoneImporter::ImportBone(AssImpNodeEncounteredContext& context) { AZ_TraceContext("Importer", "Bone"); @@ -112,11 +112,11 @@ namespace AZ bool isBone = false; - if (NodeParentIsOfType(context.m_scene.GetGraph(), context.m_currentGraphPosition, DataTypes::IBoneData::TYPEINFO_Uuid())) - { - isBone = true; - } - else + //if (NodeParentIsOfType(context.m_scene.GetGraph(), context.m_currentGraphPosition, DataTypes::IBoneData::TYPEINFO_Uuid())) + //{ + // isBone = true; + //} + //else { AZStd::unordered_map mainBoneList; AZStd::unordered_map boneLookup; @@ -171,11 +171,22 @@ namespace AZ createdBoneData = AZStd::make_shared(); } + // L_Lower_Eyelid_Jnt_01 + if (context.m_sourceNode.GetName() == AZStd::string("L_Lower_Eyelid_Jnt_01")) + { + //__debugbreak(); + } + + AZStd::vector transforms; aiMatrix4x4 transform = currentNode->mTransformation; const aiNode* parent = currentNode->mParent; - + + auto addTrans = [&](auto mat) { transforms.push_back(AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat)); }; + addTrans(transform); + while (parent) { + addTrans(parent->mTransformation); transform = parent->mTransformation * transform; parent = parent->mParent; } From 7dc4d8438b008ce914734638eb2bd46621107b9d Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Sat, 12 Jun 2021 20:33:50 -0500 Subject: [PATCH 05/91] Fix non-bone transforms setting the wrong matrix variable (cherry picked from commit 838a8b47da73e50fca4ea9ee5abc7c33250bf25d) --- .../FbxSceneBuilder/Importers/AssImpTransformImporter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp index dc59f59147..3e22bfc671 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp @@ -85,7 +85,7 @@ namespace AZ //__debugbreak(); } - aiMatrix4x4 combinedTransform; + //aiMatrix4x4 combinedTransform; DataTypes::MatrixType finalMat; if (isBone) @@ -171,7 +171,7 @@ namespace AZ } else { - combinedTransform = GetConcatenatedLocalTransform(currentNode); + finalMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(GetConcatenatedLocalTransform(currentNode)); } //DataTypes::MatrixType localTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(combinedTransform); From 57b19feca5d113ba6fc727cbc8e92e15bff5a9a9 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Wed, 16 Jun 2021 12:03:47 -0500 Subject: [PATCH 06/91] Cleanup code --- .../Importers/AssImpAnimationImporter.cpp | 8 +- .../Importers/AssImpBoneImporter.cpp | 34 ++---- .../Importers/AssImpTransformImporter.cpp | 104 ++++-------------- 3 files changed, 32 insertions(+), 114 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index f066540c50..7ab9deb141 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -463,13 +463,9 @@ namespace AZ decltype(boneAnimations) parentFillerAnimations; - // Go through all the animations and make sure we create animations for bones who's parents don't have an animation + // Go through all the animations and make sure we create placeholder animations for any bones missing them for (auto&& anim : boneAnimations) { - //const aiNode* node = scene->mRootNode->FindNode(anim.first.c_str()); - //const aiNode* parent = node->mParent; - - //while (parent && parent != scene->mRootNode) for (auto boneName : boneList) { if (!IsPivotNode(aiString(boneName.c_str()))) @@ -502,8 +498,6 @@ namespace AZ AZStd::make_pair(boneName, AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); } } - - //parent = parent->mParent; } } diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp index 694e3566f6..648007ca47 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp @@ -97,7 +97,7 @@ namespace AZ EnumChildren(scene, child, mainBoneList, boneLookup); } } -#pragma optimize("", off) + Events::ProcessingResult AssImpBoneImporter::ImportBone(AssImpNodeEncounteredContext& context) { AZ_TraceContext("Importer", "Bone"); @@ -111,12 +111,7 @@ namespace AZ } bool isBone = false; - - //if (NodeParentIsOfType(context.m_scene.GetGraph(), context.m_currentGraphPosition, DataTypes::IBoneData::TYPEINFO_Uuid())) - //{ - // isBone = true; - //} - //else + { AZStd::unordered_map mainBoneList; AZStd::unordered_map boneLookup; @@ -170,25 +165,14 @@ namespace AZ { createdBoneData = AZStd::make_shared(); } - - // L_Lower_Eyelid_Jnt_01 - if (context.m_sourceNode.GetName() == AZStd::string("L_Lower_Eyelid_Jnt_01")) + + aiMatrix4x4 transform{}; + const aiNode* iteratingNode = currentNode; + + while (iteratingNode) { - //__debugbreak(); - } - - AZStd::vector transforms; - aiMatrix4x4 transform = currentNode->mTransformation; - const aiNode* parent = currentNode->mParent; - - auto addTrans = [&](auto mat) { transforms.push_back(AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat)); }; - addTrans(transform); - - while (parent) - { - addTrans(parent->mTransformation); - transform = parent->mTransformation * transform; - parent = parent->mParent; + transform = iteratingNode->mTransformation * transform; + iteratingNode = iteratingNode->mParent; } SceneAPI::DataTypes::MatrixType globalTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(transform); diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp index 3e22bfc671..f7a85a161b 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpTransformImporter.cpp @@ -62,7 +62,7 @@ namespace AZ } } } -#pragma optimize("", off) + Events::ProcessingResult AssImpTransformImporter::ImportTransform(AssImpSceneNodeAppendedContext& context) { AZ_TraceContext("Importer", "transform"); @@ -79,104 +79,44 @@ namespace AZ auto boneIterator = boneLookup.find(currentNode->mName.C_Str()); const bool isBone = boneIterator != boneLookup.end(); - - if (currentNode->mName.C_Str() == AZStd::string("spine_C0_0_jnt")) - { - //__debugbreak(); - } - - //aiMatrix4x4 combinedTransform; - DataTypes::MatrixType finalMat; + + DataTypes::MatrixType localTransform; if (isBone) { - auto parentNode = currentNode->mParent; + AZStd::vector offsets, inverseOffsets; + auto iteratingNode = currentNode; - aiMatrix4x4 offsetMatrix = boneIterator->second->mOffsetMatrix; - aiMatrix4x4 parentOffset {}; - aiMatrix4x4 parentTransform{}; - - if (parentNode) + while (iteratingNode && boneLookup.count(iteratingNode->mName.C_Str())) { - parentTransform = parentNode->mTransformation; - } - - auto azOffset = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(offsetMatrix); - decltype(azOffset) azParentOffset{}; - AZStd::vector transforms, offsets, inverseTransforms, inverseOffsets; - - auto addTransform = [&](AZStd::string, aiMatrix4x4 mat) - { - auto azMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat); - transforms.push_back(azMat); - inverseTransforms.push_back(azMat.GetInverseFull()); - }; - auto addOffset = [&]([[maybe_unused]] auto name, aiMatrix4x4 mat) - { - auto azMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(mat); - offsets.push_back(azMat); - inverseOffsets.push_back(azMat.GetInverseFull()); - }; - - auto curNode = currentNode; - - while (curNode && boneLookup.count(curNode->mName.C_Str())) - { - AZStd::string name = curNode->mName.C_Str(); + AZStd::string name = iteratingNode->mName.C_Str(); auto range = boneLookup.equal_range(name); - for (auto it = range.first; it != range.second; ++it) + if (range.first != range.second) { - addOffset(name, it->second->mOffsetMatrix); - break; + // There can be multiple offsetMatrices for a given bone, we're only interested in grabbing the first one + auto boneFirstOffsetMatrix = range.first->second->mOffsetMatrix; + auto azMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(boneFirstOffsetMatrix); + offsets.push_back(azMat); + inverseOffsets.push_back(azMat.GetInverseFull()); } - //addOffset(name, boneLookup.at(name)->mOffsetMatrix); - addTransform(name, curNode->mTransformation); - - curNode = curNode->mParent; + iteratingNode = iteratingNode->mParent; } - - // Go up the tree to find the root bone. It's parent will be the scene mRootNode - while (parentNode && parentNode->mParent && parentNode->mParent != scene->mRootNode) - { - parentNode = parentNode->mParent; - } - - auto parentBoneIterator = boneLookup.find(parentNode->mName.C_Str()); - aiMatrix4x4 rootOffsetMatrix{}; - - if (parentBoneIterator != boneLookup.end()) - { - rootOffsetMatrix = parentBoneIterator->second->mOffsetMatrix; - } - - auto inverseOffset = offsetMatrix; - inverseOffset.Inverse(); - - auto parentTransformInverse = parentTransform; - parentTransformInverse.Inverse(); - - //auto azInverse = azOffset.GetInverseFull(); - //auto azCombined = azParentOffset * azInverse; - //combinedTransform = parentOffset * inverseOffset; - - //parentTransform ^-1 * parentParent * azOffsetInverse - //combinedTransform = parentTransformInverse * rootOffsetMatrix * inverseOffset; - - //azNodeLocal = offsets[1] * inverseOffsets[3] * (offsets[3] * inverseOffsets[0]) - finalMat = - offsets.at(AZ::GetMin(offsets.size()-1, (decltype(offsets.size()))1)) * inverseOffsets.at(inverseOffsets.size() - 1) * offsets.at(offsets.size() - 1) * inverseOffsets.at(0); + + localTransform = + offsets.at(AZ::GetMin(offsets.size()-1, static_cast(1))) // parent bone offset, or if there is no parent, then current node offset + * inverseOffsets.at(inverseOffsets.size() - 1) // Inverse of root bone offset + * offsets.at(offsets.size() - 1) // Root bone offset + * inverseOffsets.at(0); // Inverse of current node offset } else { - finalMat = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(GetConcatenatedLocalTransform(currentNode)); + localTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(GetConcatenatedLocalTransform(currentNode)); } - //DataTypes::MatrixType localTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(combinedTransform); - DataTypes::MatrixType localTransform = finalMat; - + // Don't bother adding a node with the identity matrix if (localTransform == DataTypes::MatrixType::Identity()) { return Events::ProcessingResult::Ignored; From 6cf3a2657484f2c7fd7ce9dfbbb607b6d247966b Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Wed, 16 Jun 2021 16:41:50 -0500 Subject: [PATCH 07/91] Duplicating test to run on GPU node --- .../Gem/PythonTests/editor/CMakeLists.txt | 18 ++++++++++- .../editor/test_BasicEditorWorkflows.py | 32 +++++++++++++++++++ 2 files changed, 49 insertions(+), 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index 834254134e..b1e3c59ac1 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -30,7 +30,23 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE periodic TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "SUITE_periodic" + PYTEST_MARKS "SUITE_periodic and not REQUIRES_gpu" + TIMEOUT 1500 + RUNTIME_DEPENDENCIES + Legacy::Editor + AZ::AssetProcessor + AutomatedTesting.Assets + COMPONENT + Editor + ) + + ly_add_pytest( + NAME AutomatedTesting::EditorTests_Main_GPU + TEST_SUITE main + TEST_SERIAL + TEST_REQUIRES gpu + PATH ${CMAKE_CURRENT_LIST_DIR} + PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor diff --git a/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py b/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py index f65401f007..1f0842dbaa 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py +++ b/AutomatedTesting/Gem/PythonTests/editor/test_BasicEditorWorkflows.py @@ -66,3 +66,35 @@ class TestBasicEditorWorkflows(object): timeout=log_monitor_timeout, auto_test_mode=False ) + + @pytest.mark.test_case_id("C6351273", "C6384955", "C16929880", "C15167490", "C15167491") + @pytest.mark.SUITE_main + @pytest.mark.REQUIRES_gpu + def test_BasicEditorWorkflows_GPU_LevelEntityComponentCRUD(self, request, editor, level, launcher_platform): + + # Skip test if running against Debug build + if "debug" in internal_plugin.build_directory: + pytest.skip("Does not execute against debug builds.") + + expected_lines = [ + "Create and load new level: True", + "New entity creation: True", + "Create entity hierarchy: True", + "Add component: True", + "Component update: True", + "Remove component: True", + "Save and Export: True", + "BasicEditorWorkflows_LevelEntityComponent: result=SUCCESS", + ] + + hydra.launch_and_validate_results( + request, + test_directory, + editor, + "BasicEditorWorkflows_LevelEntityComponentCRUD.py", + expected_lines, + cfg_args=[level], + timeout=log_monitor_timeout, + auto_test_mode=False, + null_renderer=False + ) From ff81b0bfd6eb54bb2e4420b1b709c4ed73bfe22b Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Thu, 17 Jun 2021 10:40:33 -0500 Subject: [PATCH 08/91] Use contains method instead of find. Rename parentFillerAnimations -> fillerAnimations --- .../Importers/AssImpAnimationImporter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index 5bdc5a8add..ed6d7dfe30 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -461,7 +461,7 @@ namespace AZ } } - decltype(boneAnimations) parentFillerAnimations; + decltype(boneAnimations) fillerAnimations; // Go through all the animations and make sure we create placeholder animations for any bones missing them for (auto&& anim : boneAnimations) @@ -470,8 +470,8 @@ namespace AZ { if (!IsPivotNode(aiString(boneName.c_str()))) { - if (boneAnimations.find(boneName) == boneAnimations.end() && - parentFillerAnimations.find(boneName) == parentFillerAnimations.end()) + if (!boneAnimations.contains(boneName) && + !fillerAnimations.contains(boneName)) { // Create 1 key for each type that just copies the current transform ConsolidatedNodeAnim emptyAnimation; @@ -494,14 +494,14 @@ namespace AZ emptyAnimation.m_ownedScalingKeys.emplace_back(0, scale); emptyAnimation.mScalingKeys = emptyAnimation.m_ownedScalingKeys.data(); - parentFillerAnimations.insert( + fillerAnimations.insert( AZStd::make_pair(boneName, AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); } } } } - boneAnimations.insert(AZStd::make_move_iterator(parentFillerAnimations.begin()), AZStd::make_move_iterator(parentFillerAnimations.end())); + boneAnimations.insert(AZStd::make_move_iterator(fillerAnimations.begin()), AZStd::make_move_iterator(fillerAnimations.end())); auto animItr = boneAnimations.equal_range(currentNode->mName.C_Str()); From 67cd1ff52f3b243e821c79b192797d2189f60280 Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Thu, 17 Jun 2021 14:44:44 -0500 Subject: [PATCH 09/91] Ensuring Main suite tests don't run GPU tests --- AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index b1e3c59ac1..00c00f9608 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -15,7 +15,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE main TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark" + PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and not REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor From b9dd7a1ecd34b9a9e8ce9204f299086fc6e79cc0 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Thu, 17 Jun 2021 16:16:38 -0700 Subject: [PATCH 10/91] Updating IsNetEntityRole helper methods for more clarity. Also added tooltip scripting and comments for code --- .../Editor/Translation/scriptcanvas_en_us.ts | 19 ++++++++ .../Components/MultiplayerComponent.h | 8 ++-- .../Multiplayer/Components/NetBindComponent.h | 21 +++++++-- .../Components/MultiplayerComponent.cpp | 16 +++---- .../Components/MultiplayerController.cpp | 4 +- .../Source/Components/NetBindComponent.cpp | 43 ++++++++++--------- .../NetworkEntity/NetworkEntityManager.cpp | 2 +- 7 files changed, 74 insertions(+), 39 deletions(-) diff --git a/Assets/Editor/Translation/scriptcanvas_en_us.ts b/Assets/Editor/Translation/scriptcanvas_en_us.ts index a7d29e2dbc..5cafabaf60 100644 --- a/Assets/Editor/Translation/scriptcanvas_en_us.ts +++ b/Assets/Editor/Translation/scriptcanvas_en_us.ts @@ -14679,6 +14679,25 @@ An Entity can be selected by using the pick button, or by dragging an Entity fro + + Method: NetBindComponent + + NETBINDCOMPONENT_ISNETENTITYROLEAUTHORITY_TOOLTIP + Returns true if this network entity is an authoritative proxy on a server (full authority); otherwise false. + + + NETBINDCOMPONENT_ISNETENTITYROLEAUTONOMOUS_TOOLTIP + Returns true if this network entity is an autonomous proxy on a client (can execute local prediction) or if this network entity is an authoritative proxy on a server but has autonomous privileges (ie: a host who is also a player); otherwise false. + + + NETBINDCOMPONENT_ISNETENTITYROLECLIENT_TOOLTIP + Returns true if this network entity is a simulated proxy on a client; otherwise false. + + + NETBINDCOMPONENT_ISNETENTITYROLESERVER_TOOLTIP + Returns true if this network entity is a simulated proxy on a server (ie: a different server may own this entity, but the entity has been replicated to this server; otherwise false. + + Method: Math diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/Components/MultiplayerComponent.h b/Gems/Multiplayer/Code/Include/Multiplayer/Components/MultiplayerComponent.h index 19689171c5..9f2f9f4804 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/Components/MultiplayerComponent.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/Components/MultiplayerComponent.h @@ -63,10 +63,10 @@ namespace Multiplayer //! @} NetEntityId GetNetEntityId() const; - bool IsAuthority() const; - bool IsAutonomous() const; - bool IsServer() const; - bool IsClient() const; + bool IsNetEntityRoleAuthority() const; + bool IsNetEntityRoleAutonomous() const; + bool IsNetEntityRoleServer() const; + bool IsNetEntityRoleClient() const; ConstNetworkEntityHandle GetEntityHandle() const; NetworkEntityHandle GetEntityHandle(); void MarkDirty(); diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/Components/NetBindComponent.h b/Gems/Multiplayer/Code/Include/Multiplayer/Components/NetBindComponent.h index 7d9b7d4086..dd4b9588e4 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/Components/NetBindComponent.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/Components/NetBindComponent.h @@ -64,10 +64,23 @@ namespace Multiplayer //! @} NetEntityRole GetNetEntityRole() const; - bool IsAuthority() const; - bool IsAutonomous() const; - bool IsServer() const; - bool IsClient() const; + + //! IsNetEntityRoleAuthority + //! @return true if this network entity is an authoritative proxy on a server (full authority); otherwise false. + bool IsNetEntityRoleAuthority() const; + + //! IsNetEntityRoleAutonomous + //! @return true if this network entity is an autonomous proxy on a client (can execute local prediction) or if this network entity is an authoritative proxy on a server but has autonomous privileges (ie: a host who is also a player); otherwise false. + bool IsNetEntityRoleAutonomous() const; + + //! IsNetEntityRoleServer + //! @return true if this network entity is a simulated proxy on a server (ie: a different server may have authority for this entity, but the entity has been replicated on this server; otherwise false. + bool IsNetEntityRoleServer() const; + + //! IsNetEntityRoleClient + //! @return true if this network entity is a simulated proxy on a client; otherwise false. + bool IsNetEntityRoleClient() const; + bool HasController() const; NetEntityId GetNetEntityId() const; const PrefabEntityId& GetPrefabEntityId() const; diff --git a/Gems/Multiplayer/Code/Source/Components/MultiplayerComponent.cpp b/Gems/Multiplayer/Code/Source/Components/MultiplayerComponent.cpp index 8542288b23..2ad883c7e7 100644 --- a/Gems/Multiplayer/Code/Source/Components/MultiplayerComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/MultiplayerComponent.cpp @@ -46,24 +46,24 @@ namespace Multiplayer return m_netBindComponent ? m_netBindComponent->GetNetEntityId() : InvalidNetEntityId; } - bool MultiplayerComponent::IsAuthority() const + bool MultiplayerComponent::IsNetEntityRoleAuthority() const { - return m_netBindComponent ? m_netBindComponent->IsAuthority() : false; + return m_netBindComponent ? m_netBindComponent->IsNetEntityRoleAuthority() : false; } - bool MultiplayerComponent::IsAutonomous() const + bool MultiplayerComponent::IsNetEntityRoleAutonomous() const { - return m_netBindComponent ? m_netBindComponent->IsAutonomous() : false; + return m_netBindComponent ? m_netBindComponent->IsNetEntityRoleAutonomous() : false; } - bool MultiplayerComponent::IsServer() const + bool MultiplayerComponent::IsNetEntityRoleServer() const { - return m_netBindComponent ? m_netBindComponent->IsServer() : false; + return m_netBindComponent ? m_netBindComponent->IsNetEntityRoleServer() : false; } - bool MultiplayerComponent::IsClient() const + bool MultiplayerComponent::IsNetEntityRoleClient() const { - return m_netBindComponent ? m_netBindComponent->IsClient() : false; + return m_netBindComponent ? m_netBindComponent->IsNetEntityRoleClient() : false; } ConstNetworkEntityHandle MultiplayerComponent::GetEntityHandle() const diff --git a/Gems/Multiplayer/Code/Source/Components/MultiplayerController.cpp b/Gems/Multiplayer/Code/Source/Components/MultiplayerController.cpp index b0bafccf79..071dfd4ee2 100644 --- a/Gems/Multiplayer/Code/Source/Components/MultiplayerController.cpp +++ b/Gems/Multiplayer/Code/Source/Components/MultiplayerController.cpp @@ -29,12 +29,12 @@ namespace Multiplayer bool MultiplayerController::IsAuthority() const { - return GetNetBindComponent() ? GetNetBindComponent()->IsAuthority() : false; + return GetNetBindComponent() ? GetNetBindComponent()->IsNetEntityRoleAuthority() : false; } bool MultiplayerController::IsAutonomous() const { - return GetNetBindComponent() ? GetNetBindComponent()->IsAutonomous() : false; + return GetNetBindComponent() ? GetNetBindComponent()->IsNetEntityRoleAutonomous() : false; } AZ::Entity* MultiplayerController::GetEntity() const diff --git a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp index 0847d42dd6..d5e83e5751 100644 --- a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp @@ -54,69 +54,72 @@ namespace Multiplayer ->Attribute(AZ::Script::Attributes::Module, "multiplayer") ->Attribute(AZ::Script::Attributes::Category, "Multiplayer") - ->Method("IsAuthority", [](AZ::EntityId id) -> bool { + ->Method("IsNetEntityRoleAuthority", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) { - AZ_Warning( "NetBindComponent", false, "NetBindComponent IsAuthority failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) + AZ_Warning( "NetBindComponent", false, "NetBindComponent IsNetEntityRoleAuthority failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) return false; } NetBindComponent* netBindComponent = entity-> FindComponent(); if (!netBindComponent) { - AZ_Warning( "NetBindComponent", false, "NetBindComponent IsAuthority failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) + AZ_Warning( "NetBindComponent", false, "NetBindComponent IsNetEntityRoleAuthority failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) return false; } - return netBindComponent->IsAuthority(); + return netBindComponent->IsNetEntityRoleAuthority(); }) - ->Method("IsAutonomous", [](AZ::EntityId id) -> bool { + + ->Method("IsNetEntityRoleAutonomous", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) { - AZ_Warning( "NetBindComponent", false, "NetBindComponent IsAutonomous failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) + AZ_Warning( "NetBindComponent", false, "NetBindComponent IsNetEntityRoleAutonomous failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) return false; } NetBindComponent* netBindComponent = entity->FindComponent(); if (!netBindComponent) { - AZ_Warning("NetBindComponent", false, "NetBindComponent IsAutonomous failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) + AZ_Warning("NetBindComponent", false, "NetBindComponent IsNetEntityRoleAutonomous failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) return false; } - return netBindComponent->IsAutonomous(); + return netBindComponent->IsNetEntityRoleAutonomous(); }) - ->Method("IsClient", [](AZ::EntityId id) -> bool { + + ->Method("IsNetEntityRoleClient", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) { - AZ_Warning( "NetBindComponent", false, "NetBindComponent IsClient failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) + AZ_Warning( "NetBindComponent", false, "NetBindComponent IsNetEntityRoleClient failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) return false; } NetBindComponent* netBindComponent = entity->FindComponent(); if (!netBindComponent) { - AZ_Warning("NetBindComponent", false, "NetBindComponent IsClient failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) + AZ_Warning("NetBindComponent", false, "NetBindComponent IsNetEntityRoleClient failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) return false; } - return netBindComponent->IsClient(); + return netBindComponent->IsNetEntityRoleClient(); }) - ->Method("IsServer", [](AZ::EntityId id) -> bool { + + ->Method("IsNetEntityRoleServer", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) { - AZ_Warning( "NetBindComponent", false, "NetBindComponent IsServer failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) + AZ_Warning( "NetBindComponent", false, "NetBindComponent IsNetEntityRoleServer failed. The entity with id %s doesn't exist, please provide a valid entity id.", id.ToString().c_str()) return false; } NetBindComponent* netBindComponent = entity->FindComponent(); if (!netBindComponent) { - AZ_Warning("NetBindComponent", false, "NetBindComponent IsServer failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) + AZ_Warning("NetBindComponent", false, "NetBindComponent IsNetEntityRoleServer failed. Entity '%s' (id: %s) is missing a NetBindComponent, make sure this entity contains a component which derives from NetBindComponent.", entity->GetName().c_str(), id.ToString().c_str()) return false; } - return netBindComponent->IsServer(); + return netBindComponent->IsNetEntityRoleServer(); }) ; } @@ -179,23 +182,23 @@ namespace Multiplayer return m_netEntityRole; } - bool NetBindComponent::IsAuthority() const + bool NetBindComponent::IsNetEntityRoleAuthority() const { return (m_netEntityRole == NetEntityRole::Authority); } - bool NetBindComponent::IsAutonomous() const + bool NetBindComponent::IsNetEntityRoleAutonomous() const { return (m_netEntityRole == NetEntityRole::Autonomous) || (m_netEntityRole == NetEntityRole::Authority) && m_allowAutonomy; } - bool NetBindComponent::IsServer() const + bool NetBindComponent::IsNetEntityRoleServer() const { return (m_netEntityRole == NetEntityRole::Server); } - bool NetBindComponent::IsClient() const + bool NetBindComponent::IsNetEntityRoleClient() const { return (m_netEntityRole == NetEntityRole::Client); } diff --git a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp index b0f1b221e8..3405abdc57 100644 --- a/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp +++ b/Gems/Multiplayer/Code/Source/NetworkEntity/NetworkEntityManager.cpp @@ -96,7 +96,7 @@ namespace Multiplayer { AZ_Assert(entityHandle.GetNetBindComponent(), "No NetBindComponent found on networked entity"); [[maybe_unused]] const bool isClientOnlyEntity = false;// (ServerIdFromEntityId(it->first) == InvalidHostId); - AZ_Assert(entityHandle.GetNetBindComponent()->IsAuthority() || isClientOnlyEntity, "Trying to delete a proxy entity, this will lead to issues deserializing entity updates"); + AZ_Assert(entityHandle.GetNetBindComponent()->IsNetEntityRoleAuthority() || isClientOnlyEntity, "Trying to delete a proxy entity, this will lead to issues deserializing entity updates"); } m_removeList.push_back(entityHandle.GetNetEntityId()); m_removeEntitiesEvent.Enqueue(AZ::TimeMs{ 0 }); From f825e698c9ce4c40f2926e51aebac6c147d763d7 Mon Sep 17 00:00:00 2001 From: sconel Date: Thu, 17 Jun 2021 17:37:00 -0700 Subject: [PATCH 11/91] WIP fix for referenced assets being loaded before their registration --- .../Entity/PrefabEditorEntityOwnershipService.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp index 336b56653b..0ddfdc8536 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp @@ -524,8 +524,6 @@ namespace AzToolsFramework rootSpawnableIndex = m_playInEditorData.m_assets.size(); } - LoadReferencedAssets(product.GetReferencedAssets()); - AZ::Data::AssetInfo info; info.m_assetId = product.GetAsset().GetId(); info.m_assetType = product.GetAssetType(); @@ -536,6 +534,11 @@ namespace AzToolsFramework m_playInEditorData.m_assets.emplace_back(product.ReleaseAsset().release(), AZ::Data::AssetLoadBehavior::Default); } + for (auto& product : context.GetProcessedObjects()) + { + LoadReferencedAssets(product.GetReferencedAssets()); + } + // make sure that PRE_NOTIFY assets get their notify before we activate, so that we can preserve the order of // (load asset) -> (notify) -> (init) -> (activate) AZ::Data::AssetManager::Instance().DispatchEvents(); From 8279b65622e39c1b546b13aeb58884c85adbf1e2 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:14:47 -0700 Subject: [PATCH 12/91] [cpack/stabilization/2106-jenkins] updated installer job temp dir to use WORKSPACE_TMP and added log file dump on error --- scripts/build/Platform/Windows/installer_windows.cmd | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index a6ce15d59e..576e810fb7 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -21,7 +21,7 @@ IF NOT EXIST %OUTPUT_DIRECTORY% ( PUSHD %OUTPUT_DIRECTORY% REM Override the temporary directory used by wix to the workspace -SET "WIX_TEMP=!WORKSPACE!/temp/wix" +SET "WIX_TEMP=!WORKSPACE_TMP!/wix" IF NOT EXIST "%WIX_TEMP%" ( MKDIR "%WIX_TEMP%" ) @@ -52,7 +52,13 @@ IF ERRORLEVEL 1 ( ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% "!CPACK_PATH!" -C %CONFIGURATION% -IF NOT %ERRORLEVEL%==0 GOTO :popd_error +IF NOT %ERRORLEVEL%==0 ( + rem dump the log file generated by cpack specifically for WIX + ECHO **************************************************************** + TYPE "_CPack_Packages\\win64\\WIX\\wix.log" + ECHO **************************************************************** + GOTO :popd_error +) POPD EXIT /b 0 From 059324add979e38b4ea44fce1b08219974bd6d96 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:15:59 -0700 Subject: [PATCH 13/91] [cpack/stabilization/2106-jenkins] updated installer job tags to run nightly --- scripts/build/Platform/Windows/build_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 552ef2c6fd..5b4915939c 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -308,7 +308,7 @@ }, "windows_installer": { "TAGS": [ - "package" + "nightly-clean" ], "COMMAND": "build_installer_windows.cmd", "PARAMETERS": { From 1d8fb2a7f7d30a061b908945a0592dc7621fb614 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:20:40 -0700 Subject: [PATCH 14/91] [cpack/stabilization/2106-jenkins] fixed installer framework include in jenkins job --- scripts/build/Platform/Windows/build_config.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 5b4915939c..feab627d96 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -314,7 +314,7 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX!\"", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX! \"", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" From 6e727e6ab0d7c942ad6183639014ac770e685f82 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:25:03 -0700 Subject: [PATCH 15/91] [cpack/stabilization/2106-jenkins] various changes to shorten cpack install path on windows --- cmake/Packaging.cmake | 3 +-- cmake/Platform/Windows/PackagingPostBuild.cmake | 2 +- cmake/Platform/Windows/Packaging_windows.cmake | 6 ++++++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 2f001cf7ee..e7782ac284 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -32,8 +32,7 @@ set(CPACK_PACKAGE_VENDOR "TBD") set(CPACK_PACKAGE_VERSION "${LY_VERSION_STRING}") set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Installation Tool") -string(TOLOWER ${PROJECT_NAME} _project_name_lower) -set(CPACK_PACKAGE_FILE_NAME "${_project_name_lower}_${LY_VERSION_STRING}_installer") +string(TOLOWER "${CPACK_PACKAGE_NAME}_${CPACK_PACKAGE_VERSION}" CPACK_PACKAGE_FILE_NAME) set(DEFAULT_LICENSE_NAME "Apache-2.0") set(DEFAULT_LICENSE_FILE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index 1dcbedcba7..63f60994c5 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -17,7 +17,7 @@ string(REPLACE "/" "\\" _fixed_package_install_dir ${CPACK_PACKAGE_INSTALL_DIREC set(_cpack_wix_out_dir ${CPACK_TOPLEVEL_DIRECTORY}) set(_bootstrap_out_dir "${CPACK_TOPLEVEL_DIRECTORY}/bootstrap") -set(_bootstrap_filename "${CPACK_PACKAGE_FILE_NAME}.exe") +set(_bootstrap_filename "${CPACK_PACKAGE_FILE_NAME}_installer.exe") set(_bootstrap_output_file ${_cpack_wix_out_dir}/${_bootstrap_filename}) set(_ext_flags diff --git a/cmake/Platform/Windows/Packaging_windows.cmake b/cmake/Platform/Windows/Packaging_windows.cmake index 6dc806ff56..95c00a3d0f 100644 --- a/cmake/Platform/Windows/Packaging_windows.cmake +++ b/cmake/Platform/Windows/Packaging_windows.cmake @@ -26,6 +26,12 @@ set(_cmake_package_name "cmake-${CPACK_DESIRED_CMAKE_VERSION}-windows-x86_64") set(CPACK_CMAKE_PACKAGE_FILE "${_cmake_package_name}.zip") set(CPACK_CMAKE_PACKAGE_HASH "15a49e2ab81c1822d75b1b1a92f7863f58e31f6d6aac1c4103eef2b071be3112") +# workaround for shortening the path cpack installs to by stripping the platform directory and forcing monolithic +# mode to strip out component folders. this unfortunately is the closest we can get to changing the install location +# as CPACK_PACKAGING_INSTALL_PREFIX/CPACK_SET_DESTDIR isn't supported for the WiX generator +set(CPACK_TOPLEVEL_TAG "") +set(CPACK_MONOLITHIC_INSTALL ON) + # CPack will generate the WiX product/upgrade GUIDs further down the chain if they weren't supplied # however, they are unique for each run. instead, let's do the auto generation here and add it to # the cache for run persistence and have the ability to detect if they are still being used. From 071ed777bd767573961667872858a5da71c71436 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:33:48 -0700 Subject: [PATCH 16/91] [cpack/stabilization/2106-jenkins] removed enforcement of aws profile for s3 upload installer artifacts --- cmake/Packaging.cmake | 4 ---- 1 file changed, 4 deletions(-) diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index e7782ac284..39d49653fe 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -136,10 +136,6 @@ if(LY_INSTALLER_UPLOAD_URL) set(CPACK_AWS_PROFILE ${LY_INSTALLER_AWS_PROFILE}) elseif (DEFINED ENV{LY_INSTALLER_AWS_PROFILE}) set(CPACK_AWS_PROFILE $ENV{LY_INSTALLER_AWS_PROFILE}) - else() - message(FATAL_ERROR - "An AWS profile is required for installer S3 uploading. Please provide " - "one via LY_INSTALLER_AWS_PROFILE CLI argument or environment variable") endif() strip_trailing_slash(${LY_INSTALLER_UPLOAD_URL} LY_INSTALLER_UPLOAD_URL) From 7011bb66f18267ffb1890d61ba5b917125a06bf1 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:36:28 -0700 Subject: [PATCH 17/91] [cpack/stabilization/2106-jenkins] missed cpack log file path shortening --- scripts/build/Platform/Windows/installer_windows.cmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 576e810fb7..d4f3482aba 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -55,7 +55,7 @@ ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% IF NOT %ERRORLEVEL%==0 ( rem dump the log file generated by cpack specifically for WIX ECHO **************************************************************** - TYPE "_CPack_Packages\\win64\\WIX\\wix.log" + TYPE "_CPack_Packages\\WIX\\wix.log" ECHO **************************************************************** GOTO :popd_error ) From 1519180cec947ff144ff34ae41c20c83cefc335a Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 08:39:40 -0700 Subject: [PATCH 18/91] [cpack/stabilization/2106-jenkins] updated installer job params to make the online version --- scripts/build/Platform/Windows/build_config.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index feab627d96..38a310e7cf 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -314,7 +314,8 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX! \"", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE", + "EXTRA_CMAKE_OPTIONS": "-DCPACK_WIX_ROOT=\"!WIX! \" -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD", "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" From 484339c4b83ce320531cb8f1dda71be5fccc7941 Mon Sep 17 00:00:00 2001 From: amzn-sj Date: Fri, 18 Jun 2021 12:56:29 -0700 Subject: [PATCH 19/91] Update AWS android package version to rev4 --- cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake index 9f63185ab3..c479463c92 100644 --- a/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake +++ b/cmake/3rdParty/Platform/Android/BuiltInPackages_android.cmake @@ -23,7 +23,7 @@ ly_associate_package(PACKAGE_NAME lux_core-2.2-rev5-multiplatform TARGETS lux # platform-specific: ly_associate_package(PACKAGE_NAME freetype-2.10.4.14-android TARGETS freetype PACKAGE_HASH 74dd75382688323c3a2a5090f473840b5d7e9d2aed1a4fcdff05ed2a09a664f2) ly_associate_package(PACKAGE_NAME tiff-4.2.0.14-android TARGETS tiff PACKAGE_HASH a9b30a1980946390c2fad0ed94562476a1d7ba8c1f36934ae140a89c54a8efd0) -ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev3-android TARGETS AWSNativeSDK PACKAGE_HASH e2192157534cc8c4e22769545d88dff03ec6c1031599716ef63de3ebbb8c9a44) +ly_associate_package(PACKAGE_NAME AWSNativeSDK-1.7.167-rev4-android TARGETS AWSNativeSDK PACKAGE_HASH 9d163696591a836881fc22dac3c94e57b0278771b6c6cec807ff6a5e96f2669d) ly_associate_package(PACKAGE_NAME Lua-5.3.5-rev5-android TARGETS Lua PACKAGE_HASH 1f638e94a17a87fe9e588ea456d5893876094b4db191234380e4c4eb9e06c300) ly_associate_package(PACKAGE_NAME PhysX-4.1.0.25992954-rev1-android TARGETS PhysX PACKAGE_HASH 9c494576c2d4ff04dee5a9e092fcd9d5af4b2845f15ffdfcaabb0dbc5b88a7a9) ly_associate_package(PACKAGE_NAME mikkelsen-1.0.0.4-android TARGETS mikkelsen PACKAGE_HASH 075e8e4940884971063b5a9963014e2e517246fa269c07c7dc55b8cf2cd99705) From bb0c60d1d4f97dc18973dd53360f4df14b47c58b Mon Sep 17 00:00:00 2001 From: sconel Date: Fri, 18 Jun 2021 16:43:14 -0700 Subject: [PATCH 20/91] Correctly add generated spawnables to asset manager in game mode --- .../Entity/PrefabEditorEntityOwnershipService.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp index 0ddfdc8536..1172fc7162 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Entity/PrefabEditorEntityOwnershipService.cpp @@ -532,6 +532,14 @@ namespace AzToolsFramework AZ::Data::AssetCatalogRequestBus::Broadcast( &AZ::Data::AssetCatalogRequestBus::Events::RegisterAsset, info.m_assetId, info); m_playInEditorData.m_assets.emplace_back(product.ReleaseAsset().release(), AZ::Data::AssetLoadBehavior::Default); + + // Ensure the product asset is registered with the AssetManager + // Hold on to the returned asset to keep ref count alive until we assign it the latest data + AZ::Data::Asset asset = + AZ::Data::AssetManager::Instance().FindOrCreateAsset(info.m_assetId, info.m_assetType, AZ::Data::AssetLoadBehavior::Default); + + // Update the asset registered in the AssetManager with the data of our product from the Prefab Processor + AZ::Data::AssetManager::Instance().AssignAssetData(m_playInEditorData.m_assets.back()); } for (auto& product : context.GetProcessedObjects()) From 8b68aa9f5a9ceaac65d99bbcdec6ecec25aa5687 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 16:55:22 -0700 Subject: [PATCH 21/91] [cpack/jenkins-main] rework build tagging to include git repo info in installer job --- cmake/Packaging.cmake | 6 +- .../Platform/Windows/PackagingPostBuild.cmake | 23 ++++++- .../Platform/Windows/installer_windows.cmd | 17 ++++- scripts/build/tools/generate_build_tag.py | 66 +++++++++++++++++++ 4 files changed, 105 insertions(+), 7 deletions(-) create mode 100644 scripts/build/tools/generate_build_tag.py diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 39d49653fe..1656b49e88 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -120,7 +120,7 @@ function(strip_trailing_slash in_url out_url) endif() endfunction() -set(_versioned_target_url_tag ${LY_VERSION_STRING}/${PAL_HOST_PLATFORM_NAME}) +set(CPACK_VERSIONED_TARGET_TAG "${PAL_HOST_PLATFORM_NAME}-${LY_VERSION_STRING}") if(NOT LY_INSTALLER_UPLOAD_URL AND DEFINED ENV{LY_INSTALLER_UPLOAD_URL}) set(LY_INSTALLER_UPLOAD_URL $ENV{LY_INSTALLER_UPLOAD_URL}) @@ -139,7 +139,7 @@ if(LY_INSTALLER_UPLOAD_URL) endif() strip_trailing_slash(${LY_INSTALLER_UPLOAD_URL} LY_INSTALLER_UPLOAD_URL) - set(CPACK_UPLOAD_URL ${LY_INSTALLER_UPLOAD_URL}/${_versioned_target_url_tag}) + set(CPACK_UPLOAD_URL ${LY_INSTALLER_UPLOAD_URL}) endif() # IMPORTANT: required to be included AFTER setting all property overrides @@ -189,7 +189,7 @@ if(LY_INSTALLER_DOWNLOAD_URL) # this will set the following variables: CPACK_DOWNLOAD_SITE, CPACK_DOWNLOAD_ALL, and CPACK_UPLOAD_DIRECTORY (local) cpack_configure_downloads( - ${LY_INSTALLER_DOWNLOAD_URL}/${_versioned_target_url_tag} + ${LY_INSTALLER_DOWNLOAD_URL} UPLOAD_DIRECTORY ${CMAKE_BINARY_DIR}/_CPack_Uploads # to match the _CPack_Packages directory ALL ) diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index 63f60994c5..a28ce51f41 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -24,10 +24,24 @@ set(_ext_flags -ext WixBalExtension ) +set(_build_id_file ${CPACK_BINARY_DIR}/build_id.txt) +if(EXISTS ${_build_id_file}) + file(READ ${_build_id_file} _build_id) + + set(_full_download_url ${CPACK_DOWNLOAD_SITE}/${_build_id}/${CPACK_VERSIONED_TARGET_TAG}) + set(_full_upload_url ${CPACK_UPLOAD_URL}/${_build_id}/${CPACK_VERSIONED_TARGET_TAG}) +else() + # format: YYYY-MM-DD-HHmm UTC + string(TIMESTAMP _timestamp "%Y%-%m-%d-%H%m" UTC) + + set(_full_download_url ${CPACK_DOWNLOAD_SITE}/notag/${_timestamp}/${CPACK_VERSIONED_TARGET_TAG}) + set(_full_upload_url ${CPACK_UPLOAD_URL}/notag/${_timestamp}/${CPACK_VERSIONED_TARGET_TAG}) +endif() + set(_addtional_defines -dCPACK_BOOTSTRAP_THEME_FILE=${CPACK_BINARY_DIR}/BootstrapperTheme -dCPACK_BOOTSTRAP_UPGRADE_GUID=${CPACK_WIX_BOOTSTRAP_UPGRADE_GUID} - -dCPACK_DOWNLOAD_SITE=${CPACK_DOWNLOAD_SITE} + -dCPACK_DOWNLOAD_SITE=${_full_download_url} -dCPACK_LOCAL_INSTALLER_DIR=${_cpack_wix_out_dir} -dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} -dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir} @@ -109,7 +123,7 @@ file(TO_NATIVE_PATH "${_root_path}/scripts/build/tools/upload_to_s3.py" _upload_ file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) # strip the scheme and extract the bucket/key prefix from the URL -string(REPLACE "s3://" "" _stripped_url ${CPACK_UPLOAD_URL}) +string(REPLACE "s3://" "" _stripped_url ${_full_upload_url}) string(REPLACE "/" ";" _tokens ${_stripped_url}) list(POP_FRONT _tokens _bucket) @@ -127,12 +141,15 @@ set(_upload_command --profile ${CPACK_AWS_PROFILE} ) +message(STATUS "Uploading artifacts to ${_full_upload_url}") execute_process( COMMAND ${_upload_command} RESULT_VARIABLE _upload_result ERROR_VARIABLE _upload_errors ) -if (NOT ${_upload_result} EQUAL 0) +if (${_upload_result} EQUAL 0) + message(STATUS "Artifact uploading complete!") +else() message(FATAL_ERROR "An error occurred uploading artifacts. ${_upload_errors}") endif() diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index d4f3482aba..5caf8b7b80 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -50,10 +50,25 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) +REM generate the build ID for artifact upload tagging +PUSHD "%~dp0/../../../.." +SET "ENGINE_ROOT=%cd%" +POPD + +SET "GEN_BUILD_ID_SCRIPT=%ENGINE_ROOT%/scripts/build/tools/generate_build_tag.py" +SET "BUILD_ID_FILE=_CPack/build_id.txt" + +ECHO [ci_build] "%ENGINE_ROOT%/python/python.cmd" -u "%GEN_BUILD_ID_SCRIPT%" "%BUILD_ID_FILE%" +CALL "%ENGINE_ROOT%/python/python.cmd" -u "%GEN_BUILD_ID_SCRIPT%" "%BUILD_ID_FILE%" +IF ERRORLEVEL 1 ( + ECHO [ci_build] Failed to generate build ID + GOTO :popd_error +) + ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% "!CPACK_PATH!" -C %CONFIGURATION% IF NOT %ERRORLEVEL%==0 ( - rem dump the log file generated by cpack specifically for WIX + REM dump the log file generated by cpack specifically for WIX ECHO **************************************************************** TYPE "_CPack_Packages\\WIX\\wix.log" ECHO **************************************************************** diff --git a/scripts/build/tools/generate_build_tag.py b/scripts/build/tools/generate_build_tag.py new file mode 100644 index 0000000000..56817c064f --- /dev/null +++ b/scripts/build/tools/generate_build_tag.py @@ -0,0 +1,66 @@ +# +# 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. +# + +import argparse +import os +import pathlib +import shutil +import subprocess +import sys + + +def run_git_command(args, repo_root): + + process = subprocess.run(['git', *args], + stdout=subprocess.PIPE, + stderr=subprocess.PIPE, + cwd=repo_root, + env=os.environ.copy(), + universal_newlines=True, + ) + + if process.returncode != 0: + print( + f'An error occurred while running a command\n' + f'Command: git {subprocess.list2cmdline(args)}\n' + f'Return Code: {process.returncode}\n' + f'Error: {process.stderr}' + ) + exit(1) + + output = process.stdout.splitlines() + # something went wrong and we somehow got more information then requested + if len(output) != 1: + print(f'Unexpected output received from command: git {subprocess.list2cmdline(args)}') + exit(1) + + return output[0].strip('"') + + +if __name__ == "__main__": + parser = argparse.ArgumentParser(description='Generates a build ID based on the state of the git repository') + parser.add_argument('output_file', help='Path to the output file where the build ID will be written to') + parsed_args = parser.parse_args() + + repo_root = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) + + branch = run_git_command(['branch', '--show-current'], repo_root) + branch = branch.replace('/', '-') + + commit_hash = run_git_command(['show', '--format="%h"', '--no-patch'], repo_root) + + # include the commit date to allow some sensible way of sorting + commit_date = run_git_command(['show', '-s', '--format="%cs"', commit_hash], repo_root) + + with open(parsed_args.output_file, 'w') as out_file: + out_file.write(f'{branch}/{commit_date}-{commit_hash}') + + sys.exit(0) From a057cbb03a6c2681eed5388b023f5a0140a86187 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 17:16:26 -0700 Subject: [PATCH 22/91] [cpack/jenkins-main] updated installer job params --- scripts/build/Platform/Windows/build_config.json | 5 ++++- scripts/build/Platform/Windows/build_installer_windows.cmd | 2 ++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 38a310e7cf..674d6c11bd 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -316,9 +316,12 @@ "OUTPUT_DIRECTORY": "build\\windows_vs2019", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE", "EXTRA_CMAKE_OPTIONS": "-DCPACK_WIX_ROOT=\"!WIX! \" -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", + "BUILD_TYPE": "staging", + "BUILD_ID": "spectra-prism", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD", - "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" + "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", + "REGION": "us-west-2" } }, "project_enginesource_profile_vs2019": { diff --git a/scripts/build/Platform/Windows/build_installer_windows.cmd b/scripts/build/Platform/Windows/build_installer_windows.cmd index 4f31fee085..beada918dc 100644 --- a/scripts/build/Platform/Windows/build_installer_windows.cmd +++ b/scripts/build/Platform/Windows/build_installer_windows.cmd @@ -10,6 +10,8 @@ REM remove or modify any license notices. This file is distributed on an "AS IS" REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM +set "LY_INSTALLER_UPLOAD_URL=s3://%BUILD_ID%-%BUILD_TYPE%-%REGION%" + CALL "%~dp0build_windows.cmd" IF NOT %ERRORLEVEL%==0 GOTO :error From a0d6e2919857a11e2957abe342c2c5f797b1686b Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 18:05:26 -0700 Subject: [PATCH 23/91] [cpack/jenkins-main] additional logging to build id generator script --- scripts/build/tools/generate_build_tag.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/scripts/build/tools/generate_build_tag.py b/scripts/build/tools/generate_build_tag.py index 56817c064f..0996f613a7 100644 --- a/scripts/build/tools/generate_build_tag.py +++ b/scripts/build/tools/generate_build_tag.py @@ -39,7 +39,11 @@ def run_git_command(args, repo_root): output = process.stdout.splitlines() # something went wrong and we somehow got more information then requested if len(output) != 1: - print(f'Unexpected output received from command: git {subprocess.list2cmdline(args)}') + print(f'Unexpected output received.\n' + f'Command: git {subprocess.list2cmdline(args)}\n' + f'Output:{process.stdout}\n' + f'Error: {process.stderr}\n' + ) exit(1) return output[0].strip('"') From c507422760997dd035d24a29ce553dc33ff628d1 Mon Sep 17 00:00:00 2001 From: scottr Date: Fri, 18 Jun 2021 20:52:04 -0700 Subject: [PATCH 24/91] [cpack/jenkins-main] update build url tag generation to use existing env vars from Jenkins --- scripts/build/Jenkins/Jenkinsfile | 6 +++++ .../build/Platform/Windows/build_config.json | 6 ++--- .../Windows/build_installer_windows.cmd | 2 +- .../Platform/Windows/installer_windows.cmd | 26 ++++++++++--------- 4 files changed, 23 insertions(+), 17 deletions(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 693cf31727..295c92e4ab 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -256,6 +256,12 @@ def CheckoutRepo(boolean disableSubmodules = false) { env.CHANGE_ID = readFile file: 'commitid' env.CHANGE_ID = env.CHANGE_ID.trim() palRm('commitid') + + // CHANGE_DATE is used by the installer to provide some ability to sort tagged builds in addition to BRANCH_NAME and CHANGE_ID + palSh("git show -s --format=\"%cs\" ${env.CHANGE_ID} > commitdate", 'Getting commit date') + env.CHANGE_DATE = readFile file: 'commitdate' + env.CHANGE_DATE = env.CHANGE_DATE.trim() + palRm('commitdate') } def PreBuildCommonSteps(Map pipelineConfig, String repositoryName, String projectName, String pipeline, String branchName, String platform, String buildType, String workspace, boolean mount = true, boolean disableSubmodules = false) { diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index 674d6c11bd..c13c6939a7 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -316,12 +316,10 @@ "OUTPUT_DIRECTORY": "build\\windows_vs2019", "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE", "EXTRA_CMAKE_OPTIONS": "-DCPACK_WIX_ROOT=\"!WIX! \" -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", - "BUILD_TYPE": "staging", - "BUILD_ID": "spectra-prism", + "CPACK_BUCKET": "spectra-prism-staging-us-west-2", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD", - "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo", - "REGION": "us-west-2" + "CMAKE_NATIVE_BUILD_ARGS": "/m /nologo" } }, "project_enginesource_profile_vs2019": { diff --git a/scripts/build/Platform/Windows/build_installer_windows.cmd b/scripts/build/Platform/Windows/build_installer_windows.cmd index beada918dc..5d1408bd60 100644 --- a/scripts/build/Platform/Windows/build_installer_windows.cmd +++ b/scripts/build/Platform/Windows/build_installer_windows.cmd @@ -10,7 +10,7 @@ REM remove or modify any license notices. This file is distributed on an "AS IS" REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM -set "LY_INSTALLER_UPLOAD_URL=s3://%BUILD_ID%-%BUILD_TYPE%-%REGION%" +SET "LY_INSTALLER_UPLOAD_URL=s3://%CPACK_BUCKET%" CALL "%~dp0build_windows.cmd" IF NOT %ERRORLEVEL%==0 GOTO :error diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 5caf8b7b80..5deb4f931d 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -50,21 +50,23 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -REM generate the build ID for artifact upload tagging -PUSHD "%~dp0/../../../.." -SET "ENGINE_ROOT=%cd%" -POPD +REM use the git info to generate an identifier used by the online installer urls +SET "BUILD_ID_FILE=_CPack\\build_id.txt" -SET "GEN_BUILD_ID_SCRIPT=%ENGINE_ROOT%/scripts/build/tools/generate_build_tag.py" -SET "BUILD_ID_FILE=_CPack/build_id.txt" - -ECHO [ci_build] "%ENGINE_ROOT%/python/python.cmd" -u "%GEN_BUILD_ID_SCRIPT%" "%BUILD_ID_FILE%" -CALL "%ENGINE_ROOT%/python/python.cmd" -u "%GEN_BUILD_ID_SCRIPT%" "%BUILD_ID_FILE%" -IF ERRORLEVEL 1 ( - ECHO [ci_build] Failed to generate build ID - GOTO :popd_error +SET BRANCH_ID="" +REM limit branch separators to 6 +FOR /F "tokens=1-6 delims=/" %%a in ("!BRANCH_NAME!") DO ( + SET BRANCH_ID=%%a + if NOT "%%b"=="" SET BRANCH_ID=!BRANCH_ID!-%%b + if NOT "%%c"=="" SET BRANCH_ID=!BRANCH_ID!-%%c + if NOT "%%d"=="" SET BRANCH_ID=!BRANCH_ID!-%%d + if NOT "%%e"=="" SET BRANCH_ID=!BRANCH_ID!-%%e + if NOT "%%f"=="" SET BRANCH_ID=!BRANCH_ID!-%%f ) +REM write out the build ID to disk so cpack can consume it +ECHO %BRANCH_ID%/%CHANGE_DATE%-%CHANGE_ID:~0,7% > "%BUILD_ID_FILE%" + ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% "!CPACK_PATH!" -C %CONFIGURATION% IF NOT %ERRORLEVEL%==0 ( From 68d90366a86c60aa319f488c3466d581e9eaffa6 Mon Sep 17 00:00:00 2001 From: scottr Date: Sat, 19 Jun 2021 07:15:23 -0700 Subject: [PATCH 25/91] [cpack/jenkins-main] missed escaping a character in git command for jenkinsfile --- scripts/build/Jenkins/Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 295c92e4ab..053383aa72 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -258,7 +258,7 @@ def CheckoutRepo(boolean disableSubmodules = false) { palRm('commitid') // CHANGE_DATE is used by the installer to provide some ability to sort tagged builds in addition to BRANCH_NAME and CHANGE_ID - palSh("git show -s --format=\"%cs\" ${env.CHANGE_ID} > commitdate", 'Getting commit date') + palSh("git show -s --format=\"%%cs\" ${env.CHANGE_ID} > commitdate", 'Getting commit date') env.CHANGE_DATE = readFile file: 'commitdate' env.CHANGE_DATE = env.CHANGE_DATE.trim() palRm('commitdate') From 2f83fd09672bff583abb4db1184dc78e838f1173 Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Fri, 18 Jun 2021 09:27:13 -0700 Subject: [PATCH 26/91] Added 2 benchmarks for StorageDriveWin Two benchmarks were added in order to compare performance with and without file read sharing enabled on Windows. Note that the benchmark results do fluctuate. Micro-benchmarks are not ideal when profiling something like the streaming file system due to the number of threads and OS layers involved, but still provides some insights. Also note that the CPU counter is not useful in this benchmark because the main thread spends most of its time asleep while waiting for the read to complete, which is recorded as (near) zero time by the benchmark tool. This change also reduces the log spam the tests could produce. --- .../IO/Streamer/StorageDriveTests_Windows.cpp | 140 ++++++++++++++++++ 1 file changed, 140 insertions(+) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index bab531deb6..9781b60543 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -18,6 +18,10 @@ #include #include +#if defined(HAVE_BENCHMARK) +#include +#endif + #include #include @@ -46,6 +50,7 @@ namespace AZ::IO options.m_hasSeekPenalty = HasSeekPenalty; options.m_enableUnbufferedReads = TestEnableUnbufferReads; options.m_enableSharing = TestEnableSharedReads; + options.m_minimalReporting = true; return StorageDriveWin({ "c:/" }, TestMaxFileHandles, TestMaxMetaDataEntries, TestPhysicalSectorSize, TestLogicalSectorSize, TestMaxIOChannels, TestOverCommit, options); @@ -151,6 +156,7 @@ namespace AZ::IO m_configurationOptions.m_hasSeekPenalty = HasSeekPenalty; m_configurationOptions.m_enableUnbufferedReads = TestEnableUnbufferReads; m_configurationOptions.m_enableSharing = TestEnableSharedReads; + m_configurationOptions.m_minimalReporting = true; m_storageDriveWin = AZStd::make_shared(AZStd::vector{drive}, TestMaxFileHandles, TestMaxMetaDataEntries, TestPhysicalSectorSize, TestLogicalSectorSize, TestMaxIOChannels, overCommit, m_configurationOptions); @@ -1148,3 +1154,137 @@ namespace AZ::IO azfree(buffers[numRequests - 1]); } } // namespace AZ::IO + +#ifdef HAVE_BENCHMARK +namespace Benchmark +{ + class StorageDriveWindowsFixture : public benchmark::Fixture + { + public: + constexpr static char* TestFileName = "StreamerBenchmark.bin"; + constexpr static size_t FileSize = 64_mib; + + void SetupStreamer(bool enableFileSharing) + { + using namespace AZ::IO; + + m_fileIO = new UnitTest::TestFileIOBase(); + m_previousFileIO = AZ::IO::FileIOBase::GetInstance(); + AZ::IO::FileIOBase::SetInstance(nullptr); + AZ::IO::FileIOBase::SetInstance(m_fileIO); + + SystemFile file; + file.Open(TestFileName, SystemFile::OpenMode::SF_OPEN_CREATE | SystemFile::OpenMode::SF_OPEN_READ_WRITE); + AZStd::unique_ptr buffer(new char[FileSize]); + ::memset(buffer.get(), 'c', FileSize); + + file.Write(buffer.get(), FileSize); + file.Close(); + + AZStd::optional absolutePath = AZ::Utils::ConvertToAbsolutePath(TestFileName); + if (absolutePath.has_value()) + { + AZStd::string drive; + AZ::StringFunc::Path::GetDrive(absolutePath->c_str(), drive); + + m_absolutePath = *absolutePath; + + StorageDriveWin::ConstructionOptions options; + options.m_hasSeekPenalty = false; + options.m_enableUnbufferedReads = true; // Leave this on otherwise repeated loads will be using the Windows cache instead. + options.m_enableSharing = enableFileSharing; + options.m_minimalReporting = true; + AZStd::shared_ptr storageDriveWin = + AZStd::make_shared(AZStd::vector{ drive }, 32, 32, 4_kib, 512, 8, 0, options); + + AZStd::unique_ptr stack = AZStd::make_unique(AZStd::move(storageDriveWin)); + m_streamer = aznew Streamer(AZStd::thread_desc{}, AZStd::move(stack)); + } + } + + void TearDown([[maybe_unused]] const ::benchmark::State& state) override + { + using namespace AZ::IO; + + AZStd::string temp; + m_absolutePath.swap(temp); + + delete m_streamer; + + SystemFile::Delete(TestFileName); + + AZ::IO::FileIOBase::SetInstance(nullptr); + AZ::IO::FileIOBase::SetInstance(m_previousFileIO); + delete m_fileIO; + } + + void RepeatedlyReadFile(benchmark::State& state) + { + using namespace AZ::IO; + using namespace AZStd::chrono; + + AZStd::unique_ptr buffer(new char[FileSize]); + + for (auto _ : state) + { + AZStd::binary_semaphore waitForReads; + AZStd::atomic end; + auto callback = [&end, &waitForReads]([[maybe_unused]] FileRequestHandle request) + { + benchmark::DoNotOptimize(end = high_resolution_clock::now()); + waitForReads.release(); + }; + + FileRequestPtr request = m_streamer->Read(m_absolutePath, buffer.get(), state.range(0), state.range(0)); + m_streamer->SetRequestCompleteCallback(request, callback); + + system_clock::time_point start; + benchmark::DoNotOptimize(start = high_resolution_clock::now()); + m_streamer->QueueRequest(request); + + waitForReads.try_acquire_for(AZStd::chrono::seconds(5)); + auto durationInSeconds = duration_cast>(end.load() - start); + + state.SetIterationTime(durationInSeconds.count()); + + m_streamer->QueueRequest(m_streamer->FlushCaches()); + } + } + + AZStd::string m_absolutePath; + AZ::IO::Streamer* m_streamer{}; + AZ::IO::FileIOBase* m_previousFileIO{}; + UnitTest::TestFileIOBase* m_fileIO{}; + }; + + BENCHMARK_DEFINE_F(StorageDriveWindowsFixture, ReadsBaseline)(benchmark::State& state) + { + SetupStreamer(false); + RepeatedlyReadFile(state); + } + + BENCHMARK_DEFINE_F(StorageDriveWindowsFixture, ReadsWithFileReadSharingEnabled)(benchmark::State& state) + { + using namespace AZ::IO; + + SetupStreamer(true); + RepeatedlyReadFile(state); + } + + // For these benchmarks the CPU stat doesn't provide useful information because it uses GetThreadTimes on Window but since the main + // thread is mostly sleeping while waiting for the read on the Streamer thread to complete this will report values (close to) zero. + + BENCHMARK_REGISTER_F(StorageDriveWindowsFixture, ReadsBaseline) + ->RangeMultiplier(8) + ->Range(1024, 64_mib) + ->UseManualTime() + ->Unit(benchmark::kMillisecond); + + BENCHMARK_REGISTER_F(StorageDriveWindowsFixture, ReadsWithFileReadSharingEnabled) + ->RangeMultiplier(8) + ->Range(1024, 64_mib) + ->UseManualTime() + ->Unit(benchmark::kMillisecond); + +} // namespace Benchmark +#endif // HAVE_BENCHMARK From ee39b28dac351bfae8da8779c2650f70f82c8dda Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Fri, 18 Jun 2021 16:51:15 -0700 Subject: [PATCH 27/91] Updates to AZ::IO::Streamer configurations - On Windows the game now has file read sharing enabled for debug and profile builds. On Windows 10 the performance impact is neglectable, so it's been turned on to remove the need for the "cl_streamerDevMode" command line option. - The drive that handles the virtual file system has been added to the game by default for debug and profile builds. Previously this required using "cl_streamerDevMode" which can now be omitted. A previous update already made it so that the drive would only be added if /Amazon/AzCore/Bootstrap/remote_filesystem was set to 1, but the configuration wasn't updated to reflect this. - Removed some comments to keep the setreg files clean. The non-specialized versions of the same setreg files still have the comments. - Removed the "DevMode" configuration (used by cl_streamerDevMode) from the game except for debug and profile. This configuration contained development tools which are not needed for release builds. --- .../AzCore/IO/Streamer/StorageDrive_Windows.h | 3 +- .../Platform/Windows/streamer.editor.setreg | 14 ---- .../Windows/streamer.game.debug.setreg | 74 +++++++++++++++++++ .../Windows/streamer.game.profile.setreg | 74 +++++++++++++++++++ .../Platform/Windows/streamer.game.setreg | 21 +----- Registry/streamer.game.debug.setreg | 65 ++++++++++++++++ Registry/streamer.game.profile.setreg | 65 ++++++++++++++++ Registry/streamer.game.setreg | 14 ---- 8 files changed, 280 insertions(+), 50 deletions(-) create mode 100644 Registry/Platform/Windows/streamer.game.debug.setreg create mode 100644 Registry/Platform/Windows/streamer.game.profile.setreg create mode 100644 Registry/streamer.game.debug.setreg create mode 100644 Registry/streamer.game.profile.setreg diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h index 479828c9d3..d51fdc36f3 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StorageDrive_Windows.h @@ -44,8 +44,7 @@ namespace AZ::IO //! make adjustments. For the most optimal performance align read buffers to the physicalSectorSize. u8 m_enableUnbufferedReads : 1; //! Globally enable file sharing. This allows files to used outside AZ::IO::Streamer, including other applications - //! while in use by AZ::IO::Streamer. File sharing can negatively impact performance and is recommended for - //! development only. + //! while in use by AZ::IO::Streamer. u8 m_enableSharing : 1; //! If true, only information that's explicitly requested or issues are reported. If false, status information //! such as when drives are created and destroyed is reported as well. diff --git a/Registry/Platform/Windows/streamer.editor.setreg b/Registry/Platform/Windows/streamer.editor.setreg index 0f7eb3e63d..ed5bb36019 100644 --- a/Registry/Platform/Windows/streamer.editor.setreg +++ b/Registry/Platform/Windows/streamer.editor.setreg @@ -13,33 +13,19 @@ [ { "$type": "AZ::IO::StorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024 }, { "$type": "AZ::IO::WindowsStorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024, - // The maximum number of files to keep the meta data such as the size around for. "MaxMetaDataCache": 1024, - // Number of requests the drive keeps after its queue is full. - // Overcommitting allows for requests to be immediately available after a request completes without needing - // any scheduling, but this also doesn't allow these requests to be rescheduled or updated. "Overcommit": 8, - // Allows files to be shared. This can be needed if the file needs to be opened in multiple locations, such - // as the editor and the Asset Processor. Turning this feature on comes at a small performance cost. "EnableFileSharing": true, - // Unbuffered reads bypass the OS file cache for faster file reads. This helps speed up initial file loads - // and is best for applications that only read a file once such as the game. For applications that frequently - // re-read files such as the editor it's better to turn this feature off. "EnableUnbufferedReads": false, - // If true, only information that's explicitly requested or issues are reported. If false, status information - // such as when drives are created and destroyed is reported as well. "MinimalReporting": false }, { "$type": "AzFramework::RemoteStorageDriveConfig", - // The maximum number of file handles that the drive will cache. "MaxFileHandles": 1024 } ] diff --git a/Registry/Platform/Windows/streamer.game.debug.setreg b/Registry/Platform/Windows/streamer.game.debug.setreg new file mode 100644 index 0000000000..7994dcc9eb --- /dev/null +++ b/Registry/Platform/Windows/streamer.game.debug.setreg @@ -0,0 +1,74 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 32, + "MaxMetaDataCache": 32, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": true, + "MinimalReporting": false + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 1024, + "MaxMetaDataCache": 1024, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/Platform/Windows/streamer.game.profile.setreg b/Registry/Platform/Windows/streamer.game.profile.setreg new file mode 100644 index 0000000000..7994dcc9eb --- /dev/null +++ b/Registry/Platform/Windows/streamer.game.profile.setreg @@ -0,0 +1,74 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 32, + "MaxMetaDataCache": 32, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": true, + "MinimalReporting": false + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::WindowsStorageDriveConfig", + "MaxFileHandles": 1024, + "MaxMetaDataCache": 1024, + "Overcommit": 8, + "EnableFileSharing": true, + "EnableUnbufferedReads": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/Platform/Windows/streamer.game.setreg b/Registry/Platform/Windows/streamer.game.setreg index 7788227fb5..67ea014d2b 100644 --- a/Registry/Platform/Windows/streamer.game.setreg +++ b/Registry/Platform/Windows/streamer.game.setreg @@ -27,8 +27,7 @@ // will avoid saturating the IO controller which can be needed if the drive is used by other applications. "Overcommit": 8, // Globally enable file sharing. This allows files to used outside AZ::IO::Streamer, including other - // applications while in use by AZ::IO::Streamer. File sharing can negatively impact performance and is - // recommended for development only. + // applications while in use by AZ::IO::Streamer. "EnableFileSharing": false, // Use unbuffered reads for the fastest possible read speeds by bypassing the Windows file cache. This // results in a faster read the first time a file is read, but subsequent reads will possibly be slower as @@ -63,24 +62,6 @@ "MaxNumJobs": 2 } ] - }, - "DevMode": - { - "Stack": - [ - { - "$type": "AZ::IO::WindowsStorageDriveConfig", - "MaxFileHandles": 1024, - "MaxMetaDataCache": 1024, - "Overcommit": 8, - "EnableFileSharing": true, - "EnableUnbufferedReads": false - }, - { - "$type": "AzFramework::RemoteStorageDriveConfig", - "MaxFileHandles": 1024 - } - ] } } } diff --git a/Registry/streamer.game.debug.setreg b/Registry/streamer.game.debug.setreg new file mode 100644 index 0000000000..1ea1dcd614 --- /dev/null +++ b/Registry/streamer.game.debug.setreg @@ -0,0 +1,65 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 32 + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/streamer.game.profile.setreg b/Registry/streamer.game.profile.setreg new file mode 100644 index 0000000000..1ea1dcd614 --- /dev/null +++ b/Registry/streamer.game.profile.setreg @@ -0,0 +1,65 @@ +{ + "Amazon": + { + "AzCore": + { + "Streamer": + { + "Profiles": + { + "Generic": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 32 + }, + { + "$type": "AZ::IO::ReadSplitterConfig", + "BufferSizeMib": 6, + "SplitSize": "MaxTransfer", + "AdjustOffset": true, + "SplitAlignedRequests": false + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AZ::IO::BlockCacheConfig", + "CacheSizeMib": 10, + "BlockSize": "MaxTransfer" + }, + { + "$type": "AZ::IO::DedicatedCacheConfig", + "CacheSizeMib": 2, + "BlockSize": "MemoryAlignment", + "WriteOnlyEpilog": true + }, + { + "$type": "AZ::IO::FullFileDecompressorConfig", + "MaxNumReads": 2, + "MaxNumJobs": 2 + } + ] + }, + "DevMode": + { + "Stack": + [ + { + "$type": "AZ::IO::StorageDriveConfig", + "MaxFileHandles": 1024 + }, + { + "$type": "AzFramework::RemoteStorageDriveConfig", + "MaxFileHandles": 1024 + } + ] + } + } + } + } + } +} \ No newline at end of file diff --git a/Registry/streamer.game.setreg b/Registry/streamer.game.setreg index 972fb80fb2..40451fd95c 100644 --- a/Registry/streamer.game.setreg +++ b/Registry/streamer.game.setreg @@ -57,20 +57,6 @@ "MaxNumJobs": 2 } ] - }, - "DevMode": - { - "Stack": - [ - { - "$type": "AZ::IO::StorageDriveConfig", - "MaxFileHandles": 1024 - }, - { - "$type": "AzFramework::RemoteStorageDriveConfig", - "MaxFileHandles": 1024 - } - ] } } } From 6161b9771ed4cdfa676ff26544e67150ec34c16f Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Fri, 18 Jun 2021 20:26:02 -0700 Subject: [PATCH 28/91] Typo fixed in AZ::IO::Streamer. --- .../AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp index 5a19bc4f54..28831a00b0 100644 --- a/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp +++ b/Code/Framework/AzCore/Platform/Windows/AzCore/IO/Streamer/StreamerConfiguration_Windows.cpp @@ -312,7 +312,7 @@ namespace AZ::IO { if (reportHardware) { - AZ_Printf("Streamer", "Skipping drive '%s' because to no paths make use of it.\n", driveIt); + AZ_Printf("Streamer", "Skipping drive '%s' because no paths make use of it.\n", driveIt); } while (*driveIt++); continue; From 57e88fc01a7869ab05c369dbadda15487b703bee Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Sat, 19 Jun 2021 14:05:01 -0700 Subject: [PATCH 29/91] Added new lines to Streamer.*.setreg files at the end --- Registry/Platform/Windows/streamer.editor.setreg | 2 +- Registry/Platform/Windows/streamer.game.debug.setreg | 2 +- Registry/Platform/Windows/streamer.game.profile.setreg | 2 +- Registry/Platform/Windows/streamer.game.setreg | 2 +- Registry/Platform/Windows/streamer.test.setreg | 2 +- Registry/streamer.editor.setreg | 2 +- Registry/streamer.game.debug.setreg | 2 +- Registry/streamer.game.profile.setreg | 2 +- Registry/streamer.game.setreg | 2 +- Registry/streamer.setreg | 2 +- Registry/streamer.test.setreg | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/Registry/Platform/Windows/streamer.editor.setreg b/Registry/Platform/Windows/streamer.editor.setreg index ed5bb36019..42f3fc9b7f 100644 --- a/Registry/Platform/Windows/streamer.editor.setreg +++ b/Registry/Platform/Windows/streamer.editor.setreg @@ -34,4 +34,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/Platform/Windows/streamer.game.debug.setreg b/Registry/Platform/Windows/streamer.game.debug.setreg index 7994dcc9eb..9165829b1b 100644 --- a/Registry/Platform/Windows/streamer.game.debug.setreg +++ b/Registry/Platform/Windows/streamer.game.debug.setreg @@ -71,4 +71,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/Platform/Windows/streamer.game.profile.setreg b/Registry/Platform/Windows/streamer.game.profile.setreg index 7994dcc9eb..9165829b1b 100644 --- a/Registry/Platform/Windows/streamer.game.profile.setreg +++ b/Registry/Platform/Windows/streamer.game.profile.setreg @@ -71,4 +71,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/Platform/Windows/streamer.game.setreg b/Registry/Platform/Windows/streamer.game.setreg index 67ea014d2b..29f85d1727 100644 --- a/Registry/Platform/Windows/streamer.game.setreg +++ b/Registry/Platform/Windows/streamer.game.setreg @@ -67,4 +67,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/Platform/Windows/streamer.test.setreg b/Registry/Platform/Windows/streamer.test.setreg index 13e4fa2d57..c9a225a0b0 100644 --- a/Registry/Platform/Windows/streamer.test.setreg +++ b/Registry/Platform/Windows/streamer.test.setreg @@ -54,4 +54,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.editor.setreg b/Registry/streamer.editor.setreg index 33eff0e5b6..7acc3f5486 100644 --- a/Registry/streamer.editor.setreg +++ b/Registry/streamer.editor.setreg @@ -27,4 +27,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.game.debug.setreg b/Registry/streamer.game.debug.setreg index 1ea1dcd614..be1be3c073 100644 --- a/Registry/streamer.game.debug.setreg +++ b/Registry/streamer.game.debug.setreg @@ -62,4 +62,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.game.profile.setreg b/Registry/streamer.game.profile.setreg index 1ea1dcd614..be1be3c073 100644 --- a/Registry/streamer.game.profile.setreg +++ b/Registry/streamer.game.profile.setreg @@ -62,4 +62,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.game.setreg b/Registry/streamer.game.setreg index 40451fd95c..69f3189d46 100644 --- a/Registry/streamer.game.setreg +++ b/Registry/streamer.game.setreg @@ -62,4 +62,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.setreg b/Registry/streamer.setreg index 79e80bbf5c..48177628c2 100644 --- a/Registry/streamer.setreg +++ b/Registry/streamer.setreg @@ -26,4 +26,4 @@ } } } -} \ No newline at end of file +} diff --git a/Registry/streamer.test.setreg b/Registry/streamer.test.setreg index 21504f659a..0adb01fca8 100644 --- a/Registry/streamer.test.setreg +++ b/Registry/streamer.test.setreg @@ -45,4 +45,4 @@ } } } -} \ No newline at end of file +} From f03b3623d4676bbc999d5be8b42da482010fb393 Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 11:45:41 -0700 Subject: [PATCH 30/91] [cpack/jenkins-main] fixed git date format on unix machines in jenkinsfile --- scripts/build/Jenkins/Jenkinsfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index 053383aa72..f8507d94f4 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -258,7 +258,10 @@ def CheckoutRepo(boolean disableSubmodules = false) { palRm('commitid') // CHANGE_DATE is used by the installer to provide some ability to sort tagged builds in addition to BRANCH_NAME and CHANGE_ID - palSh("git show -s --format=\"%%cs\" ${env.CHANGE_ID} > commitdate", 'Getting commit date') + commitDateFmt = '%%cs' + if (env.IS_UNIX) commitDateFmt = '%cs' + + palSh("git show -s --format=${commitDateFmt} ${env.CHANGE_ID} > commitdate", 'Getting commit date') env.CHANGE_DATE = readFile file: 'commitdate' env.CHANGE_DATE = env.CHANGE_DATE.trim() palRm('commitdate') From 646fc30dab17bda704e2faa50be2f4167c60d959 Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 13:31:59 -0700 Subject: [PATCH 31/91] [cpack/jenkins-main] build tag generator script now uses jenkins env vars and matches commands used --- scripts/build/tools/generate_build_tag.py | 42 ++++++++++++----------- 1 file changed, 22 insertions(+), 20 deletions(-) diff --git a/scripts/build/tools/generate_build_tag.py b/scripts/build/tools/generate_build_tag.py index 0996f613a7..78158e430c 100644 --- a/scripts/build/tools/generate_build_tag.py +++ b/scripts/build/tools/generate_build_tag.py @@ -32,39 +32,41 @@ def run_git_command(args, repo_root): f'An error occurred while running a command\n' f'Command: git {subprocess.list2cmdline(args)}\n' f'Return Code: {process.returncode}\n' - f'Error: {process.stderr}' + f'Error: {process.stderr}', + file=sys.stderr ) exit(1) output = process.stdout.splitlines() - # something went wrong and we somehow got more information then requested - if len(output) != 1: - print(f'Unexpected output received.\n' - f'Command: git {subprocess.list2cmdline(args)}\n' - f'Output:{process.stdout}\n' - f'Error: {process.stderr}\n' - ) - exit(1) + if not output: + print(f'No output received for command: git {subprocess.list2cmdline(args)}.') + output return output[0].strip('"') if __name__ == "__main__": - parser = argparse.ArgumentParser(description='Generates a build ID based on the state of the git repository') - parser.add_argument('output_file', help='Path to the output file where the build ID will be written to') - parsed_args = parser.parse_args() - + ''' + Generates a build ID based on the state of the git repository. Will first attempt to use + existing environment variable (e.g. BRANCH_NAME, CHANGE_ID, CHANGE_DATE) before falling + back to running git commands directly + ''' repo_root = os.path.realpath(os.path.join(os.path.dirname(__file__), '..', '..')) - branch = run_git_command(['branch', '--show-current'], repo_root) + branch = os.environ.get('BRANCH_NAME') + if not branch: + branch = run_git_command(['rev-parse', '--abbrev-ref', 'HEAD'], repo_root) branch = branch.replace('/', '-') - commit_hash = run_git_command(['show', '--format="%h"', '--no-patch'], repo_root) + commit_hash = os.environ.get('CHANGE_ID') + if not commit_hash: + commit_hash = run_git_command(['rev-parse', 'HEAD'], repo_root) + commit_hash = commit_hash[0:9] # include the commit date to allow some sensible way of sorting - commit_date = run_git_command(['show', '-s', '--format="%cs"', commit_hash], repo_root) + commit_date = os.environ.get('CHANGE_DATE') + if not commit_date: + commit_date = run_git_command(['show', '-s', '--format=%cs', commit_hash], repo_root) - with open(parsed_args.output_file, 'w') as out_file: - out_file.write(f'{branch}/{commit_date}-{commit_hash}') - - sys.exit(0) + print(f'{branch}/{commit_date}-{commit_hash}') + exit(0) From 21d92a414e895531e2e2ad4e8b591f50810270ed Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 13:38:16 -0700 Subject: [PATCH 32/91] [cpack/jenkins-main] update commit date format string to something that works on all machines --- scripts/build/Jenkins/Jenkinsfile | 4 ++-- scripts/build/tools/generate_build_tag.py | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/build/Jenkins/Jenkinsfile b/scripts/build/Jenkins/Jenkinsfile index f8507d94f4..7bb26fdf8c 100644 --- a/scripts/build/Jenkins/Jenkinsfile +++ b/scripts/build/Jenkins/Jenkinsfile @@ -258,8 +258,8 @@ def CheckoutRepo(boolean disableSubmodules = false) { palRm('commitid') // CHANGE_DATE is used by the installer to provide some ability to sort tagged builds in addition to BRANCH_NAME and CHANGE_ID - commitDateFmt = '%%cs' - if (env.IS_UNIX) commitDateFmt = '%cs' + commitDateFmt = '%%cI' + if (env.IS_UNIX) commitDateFmt = '%cI' palSh("git show -s --format=${commitDateFmt} ${env.CHANGE_ID} > commitdate", 'Getting commit date') env.CHANGE_DATE = readFile file: 'commitdate' diff --git a/scripts/build/tools/generate_build_tag.py b/scripts/build/tools/generate_build_tag.py index 78158e430c..b37e180ea6 100644 --- a/scripts/build/tools/generate_build_tag.py +++ b/scripts/build/tools/generate_build_tag.py @@ -66,7 +66,8 @@ if __name__ == "__main__": # include the commit date to allow some sensible way of sorting commit_date = os.environ.get('CHANGE_DATE') if not commit_date: - commit_date = run_git_command(['show', '-s', '--format=%cs', commit_hash], repo_root) + commit_date = run_git_command(['show', '-s', '--format=%cI', commit_hash], repo_root) + commit_date = commit_date[0:10] print(f'{branch}/{commit_date}-{commit_hash}') exit(0) From e8f250bed80f2904c0057358f20e2b024b9b658b Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 14:31:10 -0700 Subject: [PATCH 33/91] [cpack/jenkins-main] rework build tag generation to be at cpack time through LY_INSTALLER_AUTO_GEN_TAG --- cmake/Packaging.cmake | 30 +++++++++-- cmake/PackagingConfig.cmake | 52 +++++++++++++++++++ .../Platform/Windows/PackagingPostBuild.cmake | 20 ++----- .../Platform/Windows/installer_windows.cmd | 17 ------ 4 files changed, 80 insertions(+), 39 deletions(-) create mode 100644 cmake/PackagingConfig.cmake diff --git a/cmake/Packaging.cmake b/cmake/Packaging.cmake index 1656b49e88..b22b08d64b 100644 --- a/cmake/Packaging.cmake +++ b/cmake/Packaging.cmake @@ -14,11 +14,29 @@ if(NOT PAL_TRAIT_BUILD_CPACK_SUPPORTED) endif() # public facing options will be used for conversion into cpack specific ones below. -set(LY_INSTALLER_DOWNLOAD_URL "" CACHE STRING "URL embedded into the installer to download additional artifacts") set(LY_INSTALLER_LICENSE_URL "" CACHE STRING "Optionally embed a link to the license instead of raw text") + +set(LY_INSTALLER_AUTO_GEN_TAG OFF CACHE BOOL +"Automatically generate a build tag based on the git repo and append it to the download/upload URLs. \ +Format: /-" +) + +set(LY_INSTALLER_DOWNLOAD_URL "" CACHE STRING +"Base URL embedded into the installer to download additional artifacts, the host target and version \ +number will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the \ +full URL format will be: //" +) + set(LY_INSTALLER_UPLOAD_URL "" CACHE STRING - "URL used to automatically upload the artifacts. Can also be set via LY_INSTALLER_UPLOAD_URL environment variable. Currently only accepts S3 URLs e.g. s3:///") -set(LY_INSTALLER_AWS_PROFILE "" CACHE STRING "AWS CLI profile for uploading artifacts. Can also be set via LY_INSTALLER_AWS_PROFILE environment variable.") +"Base URL used to upload the installer artifacts after generation, the host target and version number \ +will automatically appended as '/'. If LY_INSTALLER_AUTO_GEN_TAG is set, the full URL \ +format will be: //. Can also be set via LY_INSTALLER_UPLOAD_URL environment \ +variable. Currently only accepts S3 URLs e.g. s3:///" +) + +set(LY_INSTALLER_AWS_PROFILE "" CACHE STRING +"AWS CLI profile for uploading artifacts. Can also be set via LY_INSTALLER_AWS_PROFILE environment variable." +) set(CPACK_DESIRED_CMAKE_VERSION 3.20.2) @@ -46,6 +64,10 @@ set(CPACK_PACKAGE_INSTALL_DIRECTORY "${CPACK_PACKAGE_NAME}/${CPACK_PACKAGE_VERSI set(CPACK_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cmake) set(CPACK_BINARY_DIR ${CMAKE_BINARY_DIR}/_CPack) # to match other CPack out dirs +# this config file allows the dynamic setting of cpack variables at cpack-time instead of cmake configure +set(CPACK_PROJECT_CONFIG_FILE ${CPACK_SOURCE_DIR}/PackagingConfig.cmake) +set(CPACK_AUTO_GEN_TAG ${LY_INSTALLER_AUTO_GEN_TAG}) + # attempt to apply platform specific settings ly_get_absolute_pal_filename(pal_dir ${CPACK_SOURCE_DIR}/Platform/${PAL_HOST_PLATFORM_NAME}) include(${pal_dir}/Packaging_${PAL_HOST_PLATFORM_NAME_LOWERCASE}.cmake) @@ -120,8 +142,6 @@ function(strip_trailing_slash in_url out_url) endif() endfunction() -set(CPACK_VERSIONED_TARGET_TAG "${PAL_HOST_PLATFORM_NAME}-${LY_VERSION_STRING}") - if(NOT LY_INSTALLER_UPLOAD_URL AND DEFINED ENV{LY_INSTALLER_UPLOAD_URL}) set(LY_INSTALLER_UPLOAD_URL $ENV{LY_INSTALLER_UPLOAD_URL}) endif() diff --git a/cmake/PackagingConfig.cmake b/cmake/PackagingConfig.cmake new file mode 100644 index 0000000000..aaf7554115 --- /dev/null +++ b/cmake/PackagingConfig.cmake @@ -0,0 +1,52 @@ +# +# 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. +# + +set(_target_name ${CMAKE_HOST_SYSTEM_NAME}) +if(${_target_name} STREQUAL Darwin) + set(_target_name Mac) +endif() + +if(CPACK_AUTO_GEN_TAG) + set(_python_script python.sh) + if(${_target_name} STREQUAL WINDOWS) + set(_python_script python.cmd) + endif() + + file(REAL_PATH "${CPACK_SOURCE_DIR}/.." _root_path) + file(TO_NATIVE_PATH "${_root_path}/python/${_python_script}" _python_cmd) + file(TO_NATIVE_PATH "${_root_path}/scripts/build/tools/generate_build_tag.py" _gen_tag_script) + + execute_process( + COMMAND ${_python_cmd} -s -u ${_gen_tag_script} + RESULT_VARIABLE _gen_tag_result + OUTPUT_VARIABLE _gen_tag_output + ERROR_VARIABLE _gen_tag_errors + OUTPUT_STRIP_TRAILING_WHITESPACE + ERROR_STRIP_TRAILING_WHITESPACE + ) + + if (NOT ${_gen_tag_result} EQUAL 0) + message(FATAL_ERROR "Failed to generate build tag!") + endif() + + set(_url_tag ${_gen_tag_output}) +else() + set(_url_tag ${CPACK_PACKAGE_VERSION}) +endif() + +set(_full_tag ${_url_tag}/${_target_name}) + +if(CPACK_DOWNLOAD_SITE) + set(CPACK_DOWNLOAD_SITE ${CPACK_DOWNLOAD_SITE}/${_full_tag}) +endif() +if(CPACK_UPLOAD_URL) + set(CPACK_UPLOAD_URL ${CPACK_UPLOAD_URL}/${_full_tag}) +endif() \ No newline at end of file diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index a28ce51f41..fae9e00e84 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -24,24 +24,10 @@ set(_ext_flags -ext WixBalExtension ) -set(_build_id_file ${CPACK_BINARY_DIR}/build_id.txt) -if(EXISTS ${_build_id_file}) - file(READ ${_build_id_file} _build_id) - - set(_full_download_url ${CPACK_DOWNLOAD_SITE}/${_build_id}/${CPACK_VERSIONED_TARGET_TAG}) - set(_full_upload_url ${CPACK_UPLOAD_URL}/${_build_id}/${CPACK_VERSIONED_TARGET_TAG}) -else() - # format: YYYY-MM-DD-HHmm UTC - string(TIMESTAMP _timestamp "%Y%-%m-%d-%H%m" UTC) - - set(_full_download_url ${CPACK_DOWNLOAD_SITE}/notag/${_timestamp}/${CPACK_VERSIONED_TARGET_TAG}) - set(_full_upload_url ${CPACK_UPLOAD_URL}/notag/${_timestamp}/${CPACK_VERSIONED_TARGET_TAG}) -endif() - set(_addtional_defines -dCPACK_BOOTSTRAP_THEME_FILE=${CPACK_BINARY_DIR}/BootstrapperTheme -dCPACK_BOOTSTRAP_UPGRADE_GUID=${CPACK_WIX_BOOTSTRAP_UPGRADE_GUID} - -dCPACK_DOWNLOAD_SITE=${_full_download_url} + -dCPACK_DOWNLOAD_SITE=${CPACK_DOWNLOAD_SITE} -dCPACK_LOCAL_INSTALLER_DIR=${_cpack_wix_out_dir} -dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} -dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir} @@ -123,7 +109,7 @@ file(TO_NATIVE_PATH "${_root_path}/scripts/build/tools/upload_to_s3.py" _upload_ file(TO_NATIVE_PATH "${_cpack_wix_out_dir}" _cpack_wix_out_dir) # strip the scheme and extract the bucket/key prefix from the URL -string(REPLACE "s3://" "" _stripped_url ${_full_upload_url}) +string(REPLACE "s3://" "" _stripped_url ${CPACK_UPLOAD_URL}) string(REPLACE "/" ";" _tokens ${_stripped_url}) list(POP_FRONT _tokens _bucket) @@ -141,7 +127,7 @@ set(_upload_command --profile ${CPACK_AWS_PROFILE} ) -message(STATUS "Uploading artifacts to ${_full_upload_url}") +message(STATUS "Uploading artifacts to ${CPACK_UPLOAD_URL}") execute_process( COMMAND ${_upload_command} RESULT_VARIABLE _upload_result diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 5deb4f931d..368658ea95 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -50,23 +50,6 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -REM use the git info to generate an identifier used by the online installer urls -SET "BUILD_ID_FILE=_CPack\\build_id.txt" - -SET BRANCH_ID="" -REM limit branch separators to 6 -FOR /F "tokens=1-6 delims=/" %%a in ("!BRANCH_NAME!") DO ( - SET BRANCH_ID=%%a - if NOT "%%b"=="" SET BRANCH_ID=!BRANCH_ID!-%%b - if NOT "%%c"=="" SET BRANCH_ID=!BRANCH_ID!-%%c - if NOT "%%d"=="" SET BRANCH_ID=!BRANCH_ID!-%%d - if NOT "%%e"=="" SET BRANCH_ID=!BRANCH_ID!-%%e - if NOT "%%f"=="" SET BRANCH_ID=!BRANCH_ID!-%%f -) - -REM write out the build ID to disk so cpack can consume it -ECHO %BRANCH_ID%/%CHANGE_DATE%-%CHANGE_ID:~0,7% > "%BUILD_ID_FILE%" - ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% "!CPACK_PATH!" -C %CONFIGURATION% IF NOT %ERRORLEVEL%==0 ( From 3ca839a58094cd20372814081e021e6864f30b8c Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 14:45:03 -0700 Subject: [PATCH 34/91] [cpack/jenkins-main] update installer job params and how they are applied --- scripts/build/Platform/Windows/build_config.json | 4 ++-- scripts/build/Platform/Windows/build_installer_windows.cmd | 2 -- scripts/build/Platform/Windows/installer_windows.cmd | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/build/Platform/Windows/build_config.json b/scripts/build/Platform/Windows/build_config.json index c13c6939a7..45cea2b5d8 100644 --- a/scripts/build/Platform/Windows/build_config.json +++ b/scripts/build/Platform/Windows/build_config.json @@ -314,8 +314,8 @@ "PARAMETERS": { "CONFIGURATION": "profile", "OUTPUT_DIRECTORY": "build\\windows_vs2019", - "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE", - "EXTRA_CMAKE_OPTIONS": "-DCPACK_WIX_ROOT=\"!WIX! \" -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", + "CMAKE_OPTIONS": "-G \"Visual Studio 16 2019\" -DCMAKE_SYSTEM_VERSION=10.0 -DLY_UNITY_BUILD=TRUE -DLY_DISABLE_TEST_MODULES=TRUE -DCPACK_WIX_ROOT=\"!WIX! \"", + "EXTRA_CMAKE_OPTIONS": "-DLY_INSTALLER_AUTO_GEN_TAG=ON -DLY_INSTALLER_DOWNLOAD_URL=https://dkb1uj4hs9ikv.cloudfront.net -DLY_INSTALLER_LICENSE_URL=https://example.com", "CPACK_BUCKET": "spectra-prism-staging-us-west-2", "CMAKE_LY_PROJECTS": "", "CMAKE_TARGET": "ALL_BUILD", diff --git a/scripts/build/Platform/Windows/build_installer_windows.cmd b/scripts/build/Platform/Windows/build_installer_windows.cmd index 5d1408bd60..4f31fee085 100644 --- a/scripts/build/Platform/Windows/build_installer_windows.cmd +++ b/scripts/build/Platform/Windows/build_installer_windows.cmd @@ -10,8 +10,6 @@ REM remove or modify any license notices. This file is distributed on an "AS IS" REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. REM -SET "LY_INSTALLER_UPLOAD_URL=s3://%CPACK_BUCKET%" - CALL "%~dp0build_windows.cmd" IF NOT %ERRORLEVEL%==0 GOTO :error diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 368658ea95..1254e38d3a 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -50,8 +50,8 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% -"!CPACK_PATH!" -C %CONFIGURATION% +ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% -D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS% +"!CPACK_PATH!" -C %CONFIGURATION% -D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS% IF NOT %ERRORLEVEL%==0 ( REM dump the log file generated by cpack specifically for WIX ECHO **************************************************************** From 25f99bce79bdac0dc0f10c37d400c9727730454b Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 14:48:48 -0700 Subject: [PATCH 35/91] [cpack/jenkins-main] fixed incorrect host name comparison string for python script name --- cmake/PackagingConfig.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/PackagingConfig.cmake b/cmake/PackagingConfig.cmake index aaf7554115..86a9667c36 100644 --- a/cmake/PackagingConfig.cmake +++ b/cmake/PackagingConfig.cmake @@ -16,7 +16,7 @@ endif() if(CPACK_AUTO_GEN_TAG) set(_python_script python.sh) - if(${_target_name} STREQUAL WINDOWS) + if(${_target_name} STREQUAL Windows) set(_python_script python.cmd) endif() @@ -34,7 +34,7 @@ if(CPACK_AUTO_GEN_TAG) ) if (NOT ${_gen_tag_result} EQUAL 0) - message(FATAL_ERROR "Failed to generate build tag!") + message(FATAL_ERROR "Failed to generate build tag! Errors: ${_gen_tag_errors}") endif() set(_url_tag ${_gen_tag_output}) From 587aa58b8793922e0ed3c603de4d06bc4d3b575e Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 15:16:18 -0700 Subject: [PATCH 36/91] [cpack/jenkins-main] fixed bug with implicit aws upload profile --- cmake/Platform/Windows/PackagingPostBuild.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index fae9e00e84..89c9837cf5 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -124,9 +124,12 @@ set(_upload_command --file_regex="${_file_regex}" --bucket ${_bucket} --key_prefix ${_prefix} - --profile ${CPACK_AWS_PROFILE} ) +if(CPACK_AWS_PROFILE) + list(APPEND _upload_command --profile ${CPACK_AWS_PROFILE}) +endif() + message(STATUS "Uploading artifacts to ${CPACK_UPLOAD_URL}") execute_process( COMMAND ${_upload_command} From b3a5afe8a326accfbc1e0f3bbc20fc564980c470 Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 17:20:57 -0700 Subject: [PATCH 37/91] [cpack/jenkins-main] trailing new line in PackagingConfig.cmake --- cmake/PackagingConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/PackagingConfig.cmake b/cmake/PackagingConfig.cmake index 86a9667c36..b340219ff8 100644 --- a/cmake/PackagingConfig.cmake +++ b/cmake/PackagingConfig.cmake @@ -49,4 +49,4 @@ if(CPACK_DOWNLOAD_SITE) endif() if(CPACK_UPLOAD_URL) set(CPACK_UPLOAD_URL ${CPACK_UPLOAD_URL}/${_full_tag}) -endif() \ No newline at end of file +endif() From b089facc232ec020c7566077c3440a5fc03221f3 Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 20:00:23 -0700 Subject: [PATCH 38/91] [cpack/jenkins-main] fixed bug where some resources were not embedded in the bootstrapper --- cmake/Platform/Windows/Packaging/Bootstrapper.wxs | 8 ++++++++ cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in | 2 +- cmake/Platform/Windows/PackagingPostBuild.cmake | 1 + 3 files changed, 10 insertions(+), 1 deletion(-) diff --git a/cmake/Platform/Windows/Packaging/Bootstrapper.wxs b/cmake/Platform/Windows/Packaging/Bootstrapper.wxs index c7146b1b7f..cb9d86ede8 100644 --- a/cmake/Platform/Windows/Packaging/Bootstrapper.wxs +++ b/cmake/Platform/Windows/Packaging/Bootstrapper.wxs @@ -17,6 +17,10 @@ Value="[ProgramFiles64Folder]$(var.CPACK_PACKAGE_INSTALL_DIRECTORY)" bal:Overridable="yes"/> + + + + + + @@ -34,6 +40,8 @@ ThemeFile="$(var.CPACK_BOOTSTRAP_THEME_FILE).xml" LocalizationFile="$(var.CPACK_BOOTSTRAP_THEME_FILE).wxl" ShowVersion="yes" /> + + diff --git a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in index f9a177b646..93984d06b8 100644 --- a/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in +++ b/cmake/Platform/Windows/Packaging/BootstrapperTheme.xml.in @@ -76,7 +76,7 @@ - + #(loc.FailureHeader) #(loc.FailureInstallHeader) #(loc.FailureUninstallHeader) diff --git a/cmake/Platform/Windows/PackagingPostBuild.cmake b/cmake/Platform/Windows/PackagingPostBuild.cmake index 89c9837cf5..83dff8354e 100644 --- a/cmake/Platform/Windows/PackagingPostBuild.cmake +++ b/cmake/Platform/Windows/PackagingPostBuild.cmake @@ -32,6 +32,7 @@ set(_addtional_defines -dCPACK_PACKAGE_FILE_NAME=${CPACK_PACKAGE_FILE_NAME} -dCPACK_PACKAGE_INSTALL_DIRECTORY=${_fixed_package_install_dir} -dCPACK_WIX_PRODUCT_LOGO=${CPACK_WIX_PRODUCT_LOGO} + -dCPACK_RESOURCE_PATH=${CPACK_SOURCE_DIR}/Platform/Windows/Packaging ) if(CPACK_LICENSE_URL) From 00bb33587ae40edfeb6260290e06fbbe1915c6a9 Mon Sep 17 00:00:00 2001 From: scottr Date: Sun, 20 Jun 2021 20:17:11 -0700 Subject: [PATCH 39/91] [cpack/jenkins-main] fixed bug applying some cpack build job parameters --- scripts/build/Platform/Windows/installer_windows.cmd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/build/Platform/Windows/installer_windows.cmd b/scripts/build/Platform/Windows/installer_windows.cmd index 1254e38d3a..f7d4394dc8 100644 --- a/scripts/build/Platform/Windows/installer_windows.cmd +++ b/scripts/build/Platform/Windows/installer_windows.cmd @@ -50,8 +50,12 @@ IF ERRORLEVEL 1 ( GOTO :popd_error ) -ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% -D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS% -"!CPACK_PATH!" -C %CONFIGURATION% -D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS% +IF NOT "%CPACK_BUCKET%"=="" ( + SET "CPACK_OPTIONS=-D CPACK_UPLOAD_URL=s3://%CPACK_BUCKET% %CPACK_OPTIONS%" +) + +ECHO [ci_build] "!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% +"!CPACK_PATH!" -C %CONFIGURATION% %CPACK_OPTIONS% IF NOT %ERRORLEVEL%==0 ( REM dump the log file generated by cpack specifically for WIX ECHO **************************************************************** From 526a0f128906741fc8bf188c53ff86370c728de9 Mon Sep 17 00:00:00 2001 From: Gene Walters Date: Sun, 20 Jun 2021 20:51:59 -0700 Subject: [PATCH 40/91] Fix for Jenkins Validation: removing tabs and removing unwanted spaces. --- .../Code/Source/Components/NetBindComponent.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp index d5e83e5751..352bc92d1c 100644 --- a/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp +++ b/Gems/Multiplayer/Code/Source/Components/NetBindComponent.cpp @@ -70,7 +70,7 @@ namespace Multiplayer } return netBindComponent->IsNetEntityRoleAuthority(); }) - + ->Method("IsNetEntityRoleAutonomous", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) @@ -87,7 +87,7 @@ namespace Multiplayer } return netBindComponent->IsNetEntityRoleAutonomous(); }) - + ->Method("IsNetEntityRoleClient", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) @@ -104,8 +104,8 @@ namespace Multiplayer } return netBindComponent->IsNetEntityRoleClient(); }) - - ->Method("IsNetEntityRoleServer", [](AZ::EntityId id) -> bool { + + ->Method("IsNetEntityRoleServer", [](AZ::EntityId id) -> bool { AZ::Entity* entity = AZ::Interface::Get()->FindEntity(id); if (!entity) { From a3b7cbeffcae29cb25cad7a063848c1eb96ff741 Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Mon, 21 Jun 2021 10:02:10 +0100 Subject: [PATCH 41/91] New level dialog has no way to select a different folder --- Code/Sandbox/Editor/NewLevelDialog.cpp | 151 +++++++++++++++----- Code/Sandbox/Editor/NewLevelDialog.h | 14 +- Code/Sandbox/Editor/NewLevelDialog.ui | 185 ++++++++++++++++--------- 3 files changed, 245 insertions(+), 105 deletions(-) diff --git a/Code/Sandbox/Editor/NewLevelDialog.cpp b/Code/Sandbox/Editor/NewLevelDialog.cpp index 2b727665cd..75717462b7 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.cpp +++ b/Code/Sandbox/Editor/NewLevelDialog.cpp @@ -17,7 +17,10 @@ // Qt #include +#include +#include #include +#include // Editor #include "NewTerrainDialog.h" @@ -30,11 +33,33 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING // Folder in which levels are stored static const char kNewLevelDialog_LevelsFolder[] = "Levels"; +class LevelFolderValidator : public QValidator +{ +public: + LevelFolderValidator(QObject* parent) + : QValidator(parent) + { + m_parentDialog = qobject_cast(parent); + } + + QValidator::State validate([[maybe_unused]] QString& input, [[maybe_unused]] int& pos) const override + { + if (m_parentDialog->ValidateLevel()) + { + return QValidator::Acceptable; + } + + return QValidator::Intermediate; + } + +private: + CNewLevelDialog* m_parentDialog; +}; + // CNewLevelDialog dialog CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/) : QDialog(pParent) - , m_ilevelFolders(0) , m_bUpdate(false) , ui(new Ui::CNewLevelDialog) , m_initialized(false) @@ -43,46 +68,70 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("New Level")); - setMaximumSize(QSize(320, 280)); + setMaximumSize(QSize(430, 180)); adjustSize(); - // Default level folder is root (Levels/) - m_ilevelFolders = 0; - m_bIsResize = false; + + ui->TITLE->setText(tr("Assign a name and location to the new level.")); + ui->STATIC1->setText(tr("Location:")); + ui->STATIC2->setText(tr("Name:")); + // Level name only supports ASCII characters QRegExp rx("[_a-zA-Z0-9-]+"); QValidator* validator = new QRegExpValidator(rx, this); ui->LEVEL->setValidator(validator); - connect(ui->LEVEL_FOLDERS, SIGNAL(activated(int)), this, SLOT(OnCbnSelendokLevelFolders())); + validator = new LevelFolderValidator(this); + ui->LEVEL_FOLDERS->lineEdit()->setValidator(validator); + ui->LEVEL_FOLDERS->setErrorToolTip( + QString("The location must be a folder underneath the current project's %1 folder. (%2)") + .arg(kNewLevelDialog_LevelsFolder) + .arg(GetLevelsFolder())); + + ui->LEVEL_FOLDERS->setClearButtonEnabled(true); + QToolButton* clearButton = AzQtComponents::LineEdit::getClearButton(ui->LEVEL_FOLDERS->lineEdit()); + assert(clearButton); + connect(clearButton, &QToolButton::clicked, this, &CNewLevelDialog::OnClearButtonClicked); + + connect(ui->LEVEL_FOLDERS->lineEdit(), &QLineEdit::textEdited, this, &CNewLevelDialog::OnLevelNameChange); + connect(ui->LEVEL_FOLDERS, &AzQtComponents::BrowseEdit::attachedButtonTriggered, this, &CNewLevelDialog::PopupAssetPicker); + connect(ui->LEVEL, &QLineEdit::textChanged, this, &CNewLevelDialog::OnLevelNameChange); + m_levelFolders = GetLevelsFolder(); + m_level = ""; // First of all, keyboard focus is related to widget tab order, and the default tab order is based on the order in which // widgets are constructed. Therefore, creating more widgets changes the keyboard focus. That is why setFocus() is called last. // Secondly, using singleShot() allows setFocus() slot of the QLineEdit instance to be invoked right after the event system // is ready to do so. Therefore, it is better to use singleShot() than directly call setFocus(). - QTimer::singleShot(0, ui->LEVEL, SLOT(setFocus())); + QTimer::singleShot(0, ui->LEVEL, SLOT(OnStartup())); + + ReloadLevelFolder(); } CNewLevelDialog::~CNewLevelDialog() { } +void CNewLevelDialog::OnStartup() +{ + UpdateData(false); + setFocus(); +} + void CNewLevelDialog::UpdateData(bool fromUi) { if (fromUi) { m_level = ui->LEVEL->text(); - m_levelFolders = ui->LEVEL_FOLDERS->currentText(); - m_ilevelFolders = ui->LEVEL_FOLDERS->currentIndex(); + m_levelFolders = ui->LEVEL_FOLDERS->text(); } else { ui->LEVEL->setText(m_level); - ui->LEVEL_FOLDERS->setCurrentText(m_levelFolders); - ui->LEVEL_FOLDERS->setCurrentIndex(m_ilevelFolders); + ui->LEVEL_FOLDERS->lineEdit()->setText(m_levelFolders); } } @@ -90,7 +139,7 @@ void CNewLevelDialog::UpdateData(bool fromUi) void CNewLevelDialog::OnInitDialog() { - ReloadLevelFolders(); + ReloadLevelFolder(); // Disable OK until some text is entered if (QPushButton* button = ui->buttonBox->button(QDialogButtonBox::Ok)) @@ -104,28 +153,19 @@ void CNewLevelDialog::OnInitDialog() ////////////////////////////////////////////////////////////////////////// -void CNewLevelDialog::ReloadLevelFolders() +void CNewLevelDialog::ReloadLevelFolder() { - QString levelsFolder = QString(Path::GetEditingGameDataFolder().c_str()) + "/" + kNewLevelDialog_LevelsFolder; - m_itemFolders.clear(); - ui->LEVEL_FOLDERS->clear(); - ui->LEVEL_FOLDERS->addItem(QString(kNewLevelDialog_LevelsFolder) + '/'); - ReloadLevelFoldersRec(levelsFolder); + ui->LEVEL_FOLDERS->lineEdit()->clear(); + ui->LEVEL_FOLDERS->setText(QString(kNewLevelDialog_LevelsFolder) + '/'); } -////////////////////////////////////////////////////////////////////////// -void CNewLevelDialog::ReloadLevelFoldersRec(const QString& currentFolder) +QString CNewLevelDialog::GetLevelsFolder() const { - QDir dir(currentFolder); + QDir projectDir = QDir(Path::GetEditingGameDataFolder().c_str()); + QDir projectLevelsDir = QDir(QStringLiteral("%1/%2").arg(projectDir.absolutePath()).arg(kNewLevelDialog_LevelsFolder)); - QFileInfoList infoList = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); - - foreach(const QFileInfo &fi, infoList) - { - m_itemFolders.push_back(fi.baseName()); - ui->LEVEL_FOLDERS->addItem(QString(kNewLevelDialog_LevelsFolder) + '/' + fi.baseName()); - } + return projectLevelsDir.absolutePath(); } ////////////////////////////////////////////////////////////////////////// @@ -133,26 +173,47 @@ QString CNewLevelDialog::GetLevel() const { QString output = m_level; - if (m_itemFolders.size() > 0 && m_ilevelFolders > 0) + QDir projectLevelsDir = QDir(GetLevelsFolder()); + + if (!m_levelFolders.isEmpty()) { - output = m_itemFolders[m_ilevelFolders - 1] + "/" + m_level; + output = m_levelFolders + "/" + m_level; } - return output; + QString relativePath = projectLevelsDir.relativeFilePath(output); + + return relativePath; } -////////////////////////////////////////////////////////////////////////// -void CNewLevelDialog::OnCbnSelendokLevelFolders() +bool CNewLevelDialog::ValidateLevel() { - UpdateData(); + // Check that the selected folder is in or below the project/LEVELS folder. + QDir projectLevelsDir = QDir(GetLevelsFolder()); + + QString selectedFolder = ui->LEVEL_FOLDERS->text(); + QString absolutePath = QDir::cleanPath(projectLevelsDir.absoluteFilePath(selectedFolder)); + QString relativePath = projectLevelsDir.relativeFilePath(absolutePath); + + // Prevent saving to a different drive. + if (projectLevelsDir.absolutePath()[0] != absolutePath[0]) + { + return false; + } + + if (relativePath.startsWith("..")) + { + return false; + } + + return true; } void CNewLevelDialog::OnLevelNameChange() { - m_level = ui->LEVEL->text(); + UpdateData(true); // QRegExpValidator means the string will always be valid as long as it's not empty: - const bool valid = !m_level.isEmpty(); + const bool valid = !m_level.isEmpty() && ValidateLevel(); // Use the validity to dynamically change the Ok button's enabled state if (QPushButton* button = ui->buttonBox->button(QDialogButtonBox::Ok)) @@ -161,6 +222,24 @@ void CNewLevelDialog::OnLevelNameChange() } } +void CNewLevelDialog::OnClearButtonClicked() +{ + ui->LEVEL_FOLDERS->lineEdit()->setText(GetLevelsFolder()); + UpdateData(true); + +} + +void CNewLevelDialog::PopupAssetPicker() +{ + QString newPath = QFileDialog::getExistingDirectory(nullptr, QObject::tr("Choose Destination Folder"), GetLevelsFolder()); + + if (!newPath.isEmpty()) + { + ui->LEVEL_FOLDERS->setText(newPath); + OnLevelNameChange(); + } +} + ////////////////////////////////////////////////////////////////////////// void CNewLevelDialog::IsResize(bool bIsResize) { diff --git a/Code/Sandbox/Editor/NewLevelDialog.h b/Code/Sandbox/Editor/NewLevelDialog.h index fd32c03700..f995ebd69c 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.h +++ b/Code/Sandbox/Editor/NewLevelDialog.h @@ -34,6 +34,7 @@ #include +#include #include #endif @@ -50,28 +51,29 @@ public: CNewLevelDialog(QWidget* pParent = nullptr); // standard constructor ~CNewLevelDialog(); - QString GetLevel() const; void IsResize(bool bIsResize); - + bool ValidateLevel(); protected: void UpdateData(bool fromUi = true); void OnInitDialog(); - void ReloadLevelFolders(); - void ReloadLevelFoldersRec(const QString& currentFolder); + void ReloadLevelFolder(); void showEvent(QShowEvent* event); + QString GetLevelsFolder() const; + protected slots: - void OnCbnSelendokLevelFolders(); void OnLevelNameChange(); + void OnClearButtonClicked(); + void PopupAssetPicker(); + void OnStartup(); public: QString m_level; QString m_levelFolders; - int m_ilevelFolders; bool m_bIsResize; bool m_bUpdate; diff --git a/Code/Sandbox/Editor/NewLevelDialog.ui b/Code/Sandbox/Editor/NewLevelDialog.ui index 053616c78d..14227fbb53 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.ui +++ b/Code/Sandbox/Editor/NewLevelDialog.ui @@ -6,74 +6,133 @@ 0 0 - 320 - 280 + 430 + 180 - - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - - - - Level - - - - - - Name: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - LEVEL - + + + + + Qt::Vertical + + + + 20 + 10 + + + + + + + + Assign a name and location to the new level. + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - + + + + + Qt::Vertical + + + + 20 + 20 + + + + + + + + + + border: 0px; + + + + + + Name + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + LEVEL + + + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + + 100 + 0 + + + + Location + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop + + + LEVEL_FOLDERS + + + + + + + + 0 + 0 + + + + + + + + + + + + + Qt::Vertical + + + + + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + - - - - - Folder: - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - LEVEL_FOLDERS - - - - - - - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - + + + + + AzQtComponents::BrowseEdit + QWidget +
AzQtComponents/Components/Widgets/BrowseEdit.h
+ 1 +
+
From 772a75b5bcd5e5af5949325f86942b36ba28cf14 Mon Sep 17 00:00:00 2001 From: greerdv Date: Mon, 21 Jun 2021 11:12:50 +0100 Subject: [PATCH 42/91] exposing non-uniform scale component id as a behavior constant for hydra --- .../ToolsComponents/EditorNonUniformScaleComponent.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp index f72de82f36..4cd18cbc91 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/ToolsComponents/EditorNonUniformScaleComponent.cpp @@ -13,6 +13,7 @@ #include #include #include +#include #include #include @@ -57,6 +58,13 @@ namespace AzToolsFramework ->Attribute(AZ::Edit::Attributes::Visibility, AZ::Edit::PropertyVisibility::ShowChildrenOnly); } } + + if (auto behaviorContext = azrtti_cast(context)) + { + behaviorContext->ConstantProperty("EditorNonUniformScaleComponentTypeId", BehaviorConstant(EditorNonUniformScaleComponent::RTTI_Type())) + ->Attribute(AZ::Script::Attributes::Module, "editor") + ->Attribute(AZ::Script::Attributes::Scope, AZ::Script::Attributes::ScopeFlags::Automation); + } } void EditorNonUniformScaleComponent::GetDependentServices(AZ::ComponentDescriptor::DependencyArrayType& dependent) From a8ba1a99afc854227e685d414243c7b76c781cbe Mon Sep 17 00:00:00 2001 From: sphrose <82213493+sphrose@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:57:14 +0100 Subject: [PATCH 43/91] Update BasicEditorWorkflows_LevelEntityComponentCRUD.py --- .../BasicEditorWorkflows_LevelEntityComponentCRUD.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py index 5d4218efd0..c195672760 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py +++ b/AutomatedTesting/Gem/PythonTests/editor/EditorScripts/BasicEditorWorkflows_LevelEntityComponentCRUD.py @@ -79,8 +79,6 @@ class TestBasicEditorWorkflows(EditorTestHelper): grp_box = new_level_dlg.findChild(QtWidgets.QGroupBox, "STATIC_GROUP1") level_name = grp_box.findChild(QtWidgets.QLineEdit, "LEVEL") level_name.setText(self.args["level"]) - level_folders = grp_box.findChild(QtWidgets.QComboBox, "LEVEL_FOLDERS") - level_folders.setCurrentText("Levels/") button_box = new_level_dlg.findChild(QtWidgets.QDialogButtonBox, "buttonBox") button_box.button(QtWidgets.QDialogButtonBox.Ok).click() From 5e4f021d556995389d2ac3b7ea676ebe7c1daa11 Mon Sep 17 00:00:00 2001 From: John Jones-Steele Date: Mon, 21 Jun 2021 15:28:41 +0100 Subject: [PATCH 44/91] Cherry picked from development --- .../AzQtComponents/Components/Style.cpp | 25 ++++++++++++++++++- .../Images/Notifications/link.svg | 4 +-- .../Private/Editor/UI/AWSCoreEditorMenu.h | 1 + .../Source/Editor/UI/AWSCoreEditorMenu.cpp | 16 ++++++++++++ 4 files changed, 43 insertions(+), 3 deletions(-) diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp index 0f58f06420..0d770d2d8e 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp +++ b/Code/Framework/AzQtComponents/AzQtComponents/Components/Style.cpp @@ -493,7 +493,30 @@ namespace AzQtComponents } } break; - } + case CE_MenuItem: + { + const QMenu* menu = qobject_cast(widget); + QAction* action = menu->activeAction(); + if (action) + { + QMenu* subMenu = action->menu(); + if (subMenu) + { + QVariant noHover = subMenu->property("noHover"); + if (noHover.isValid() && noHover.toBool()) + { + // First draw as standard to get the correct hover background for the complete control. + QProxyStyle::drawControl(element, option, painter, widget); + // Now draw the icon as non-hovered so control behaves as designed. + QStyleOptionMenuItem myOpt = *qstyleoption_cast(option); + myOpt.state &= ~QStyle::State_Selected; + return QProxyStyle::drawControl(element, &myOpt, painter, widget); + } + } + } + } + break; + } return QProxyStyle::drawControl(element, option, painter, widget); } diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Notifications/link.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Notifications/link.svg index dfd21d157f..6f5608c092 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Images/Notifications/link.svg +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Notifications/link.svg @@ -1,4 +1,4 @@ - - + + diff --git a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h b/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h index c892f86b66..ab03223323 100644 --- a/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h +++ b/Gems/AWSCore/Code/Include/Private/Editor/UI/AWSCoreEditorMenu.h @@ -46,6 +46,7 @@ namespace AWSCore void InitializeAWSDocActions(); void InitializeAWSGlobalDocsSubMenu(); void InitializeAWSFeatureGemActions(); + void AddSpaceForIcon(QMenu* menu); // AWSCoreEditorRequestBus interface implementation void SetAWSClientAuthEnabled() override; diff --git a/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.cpp b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.cpp index c319788547..a592c7417a 100644 --- a/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.cpp +++ b/Gems/AWSCore/Code/Source/Editor/UI/AWSCoreEditorMenu.cpp @@ -35,6 +35,8 @@ namespace AWSCore { + static constexpr int IconSize = 16; + AWSCoreEditorMenu::AWSCoreEditorMenu(const QString& text) : QMenu(text) , m_resourceMappingToolWatcher(nullptr) @@ -43,6 +45,7 @@ namespace AWSCore InitializeResourceMappingToolAction(); this->addSeparator(); InitializeAWSFeatureGemActions(); + AddSpaceForIcon(this); AWSCoreEditorRequestBus::Handler::BusConnect(); } @@ -136,6 +139,8 @@ namespace AWSCore globalDocsMenu->addAction(AddExternalLinkAction(AWSAndScriptCanvasActionText, AWSAndScriptCanvasUrl, ":/Notifications/link.svg")); globalDocsMenu->addAction(AddExternalLinkAction(AWSAndComponentsActionText, AWSAndComponentsUrl, ":/Notifications/link.svg")); globalDocsMenu->addAction(AddExternalLinkAction(CallAWSResourcesActionText, CallAWSResourcesUrl, ":/Notifications/link.svg")); + + AddSpaceForIcon(globalDocsMenu); } void AWSCoreEditorMenu::InitializeAWSFeatureGemActions() @@ -170,6 +175,8 @@ namespace AWSCore AWSClientAuthPlatformSpecificActionText, AWSClientAuthPlatformSpecificUrl, ":/Notifications/link.svg")); subMenu->addAction(AddExternalLinkAction( AWSClientAuthAPIReferenceActionText, AWSClientAuthAPIReferenceUrl, ":/Notifications/link.svg")); + + AddSpaceForIcon(subMenu); } void AWSCoreEditorMenu::SetAWSMetricsEnabled() @@ -198,6 +205,7 @@ namespace AWSCore QDesktopServices::openUrl(QUrl::fromLocalFile(configFilePath.c_str())); }); subMenu->addAction(settingsAction); + AddSpaceForIcon(subMenu); } QMenu* AWSCoreEditorMenu::SetAWSFeatureSubMenu(const AZStd::string& menuText) @@ -209,6 +217,7 @@ namespace AWSCore { QMenu* subMenu = new QMenu(QObject::tr(menuText.c_str())); subMenu->setIcon(QIcon(QString(":/Notifications/checkmark.svg"))); + subMenu->setProperty("noHover", true); this->insertMenu(*itr, subMenu); this->removeAction(*itr); return subMenu; @@ -216,4 +225,11 @@ namespace AWSCore } return nullptr; } + + void AWSCoreEditorMenu::AddSpaceForIcon(QMenu* menu) + { + QSize size = menu->sizeHint(); + size.setWidth(size.width() + IconSize); + menu->setFixedSize(size); + } } // namespace AWSCore From 9f934a6f63e6fb880b26e995e5c976d0c1ca72bf Mon Sep 17 00:00:00 2001 From: amzn-sean <75276488+amzn-sean@users.noreply.github.com> Date: Mon, 21 Jun 2021 16:25:45 +0100 Subject: [PATCH 45/91] add Draw Helpers changed notification + physx draw helpers listens to it (#1456) --- .../Viewport/ViewportMessages.h | 13 ++++ Code/Sandbox/Editor/ViewportTitleDlg.cpp | 8 +- Gems/PhysX/Code/Editor/DebugDraw.cpp | 78 ++++++++++++++++--- Gems/PhysX/Code/Editor/DebugDraw.h | 20 ++++- 4 files changed, 104 insertions(+), 15 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h index 85250f2a32..b4d0342c44 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Viewport/ViewportMessages.h @@ -210,6 +210,19 @@ namespace AzToolsFramework //! Type to inherit to implement ViewportInteractionRequests. using ViewportInteractionRequestBus = AZ::EBus; + //! An interface to notify when changes to viewport settings have happened. + class ViewportSettingNotifications + { + public: + virtual void OnGridSnappingChanged([[maybe_unused]] bool enabled) {} + virtual void OnDrawHelpersChanged([[maybe_unused]] bool enabled) {} + + protected: + ViewportSettingNotifications() = default; + }; + + using ViewportSettingsNotificationBus = AZ::EBus; + //! Requests to freeze the Viewport Input //! Added to prevent a bug with the legacy CryEngine Viewport code that would //! keep doing raycast tests even when no level is loaded, causing a crash. diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.cpp b/Code/Sandbox/Editor/ViewportTitleDlg.cpp index dc4815eb6a..491d31a2ff 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.cpp +++ b/Code/Sandbox/Editor/ViewportTitleDlg.cpp @@ -45,6 +45,7 @@ #include #include +#include AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING #include "ui_ViewportTitleDlg.h" @@ -57,13 +58,16 @@ inline namespace Helpers { void ToggleHelpers() { - GetIEditor()->GetDisplaySettings()->DisplayHelpers(!GetIEditor()->GetDisplaySettings()->IsDisplayHelpers()); + const bool newValue = !GetIEditor()->GetDisplaySettings()->IsDisplayHelpers(); + GetIEditor()->GetDisplaySettings()->DisplayHelpers(newValue); GetIEditor()->Notify(eNotify_OnDisplayRenderUpdate); - if (GetIEditor()->GetDisplaySettings()->IsDisplayHelpers() == false) + if (newValue == false) { GetIEditor()->GetObjectManager()->SendEvent(EVENT_HIDE_HELPER); } + AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Broadcast( + &AzToolsFramework::ViewportInteraction::ViewportSettingNotifications::OnDrawHelpersChanged, newValue); } bool IsHelpersShown() diff --git a/Gems/PhysX/Code/Editor/DebugDraw.cpp b/Gems/PhysX/Code/Editor/DebugDraw.cpp index 829b776e28..1f1c24b9ad 100644 --- a/Gems/PhysX/Code/Editor/DebugDraw.cpp +++ b/Gems/PhysX/Code/Editor/DebugDraw.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -56,6 +57,15 @@ namespace PhysX return false; } + bool IsDrawColliderReadOnly() + { + bool helpersVisible = false; + AzToolsFramework::EditorRequestBus::BroadcastResult(helpersVisible, + &AzToolsFramework::EditorRequests::DisplayHelpersVisible); + // if helpers are visible, draw colliders is NOT read only and can be changed. + return !helpersVisible; + } + static void BuildAABBVerts(const AZ::Aabb& aabb, AZStd::vector& verts, AZStd::vector& points, @@ -145,28 +155,42 @@ namespace PhysX "PhysX Collider Debug Draw", "Manages global and per-collider debug draw settings and logic") ->DataElement(AZ::Edit::UIHandlers::CheckBox, &Collider::m_locallyEnabled, "Draw collider", "Shows the geometry for the collider in the viewport") - ->Attribute(AZ::Edit::Attributes::CheckboxTooltip, - "If set, the geometry of this collider is visible in the viewport") - ->Attribute(AZ::Edit::Attributes::Visibility, - VisibilityFunc{ []() { return IsGlobalColliderDebugCheck(GlobalCollisionDebugState::Manual); } }) + ->Attribute(AZ::Edit::Attributes::CheckboxTooltip, + "If set, the geometry of this collider is visible in the viewport. 'Draw Helpers' needs to be enabled to use.") + ->Attribute(AZ::Edit::Attributes::Visibility, + VisibilityFunc{ []() { return IsGlobalColliderDebugCheck(GlobalCollisionDebugState::Manual); } }) + ->Attribute(AZ::Edit::Attributes::ReadOnly, &IsDrawColliderReadOnly) ->DataElement(AZ::Edit::UIHandlers::Button, &Collider::m_globalButtonState, "Draw collider", "Shows the geometry for the collider in the viewport") - ->Attribute(AZ::Edit::Attributes::ButtonText, "Global override") - ->Attribute(AZ::Edit::Attributes::ButtonTooltip, - "A global setting is overriding this property (to disable the override, " - "set the Global Collision Debug setting to \"Set manually\" in the PhysX Configuration)") - ->Attribute(AZ::Edit::Attributes::Visibility, - VisibilityFunc{ []() { return !IsGlobalColliderDebugCheck(GlobalCollisionDebugState::Manual); } }) - ->Attribute(AZ::Edit::Attributes::ChangeNotify, &OpenPhysXSettingsWindow) + ->Attribute(AZ::Edit::Attributes::ButtonText, "Global override") + ->Attribute(AZ::Edit::Attributes::ButtonTooltip, + "A global setting is overriding this property (to disable the override, " + "set the Global Collision Debug setting to \"Set manually\" in the PhysX Configuration)." + "'Draw Helpers' needs to be enabled to use.") + ->Attribute(AZ::Edit::Attributes::Visibility, + VisibilityFunc{ []() { return !IsGlobalColliderDebugCheck(GlobalCollisionDebugState::Manual); } }) + ->Attribute(AZ::Edit::Attributes::ChangeNotify, &OpenPhysXSettingsWindow) + ->Attribute(AZ::Edit::Attributes::ReadOnly, &IsDrawColliderReadOnly) ; } } } + Collider::Collider() + : m_debugDisplayDataChangedEvent( + [this]([[maybe_unused]] const PhysX::Debug::DebugDisplayData& data) + { + this->RefreshTreeHelper(); + }) + { + + } + void Collider::Connect(AZ::EntityId entityId) { m_entityId = entityId; AzFramework::EntityDebugDisplayEventBus::Handler::BusConnect(m_entityId); + AzToolsFramework::EntitySelectionEvents::Bus::Handler::BusConnect(m_entityId); } void Collider::SetDisplayCallback(const DisplayCallback* callback) @@ -176,6 +200,11 @@ namespace PhysX void Collider::Disconnect() { + if (AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusIsConnected()) + { + AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect(); + } + AzToolsFramework::EntitySelectionEvents::Bus::Handler::BusDisconnect(); AzFramework::EntityDebugDisplayEventBus::Handler::BusDisconnect(); m_displayCallback = nullptr; m_entityId = AZ::EntityId(); @@ -731,6 +760,33 @@ namespace PhysX } } + void Collider::OnDrawHelpersChanged([[maybe_unused]] bool enabled) + { + RefreshTreeHelper(); + } + + void Collider::OnSelected() + { + AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusConnect( + AzFramework::g_defaultSceneEntityDebugDisplayId); + if (auto* physXDebug = AZ::Interface::Get()) + { + physXDebug->RegisterDebugDisplayDataChangedEvent(m_debugDisplayDataChangedEvent); + } + } + + void Collider::OnDeselected() + { + AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler::BusDisconnect(); + m_debugDisplayDataChangedEvent.Disconnect(); + } + + void Collider::RefreshTreeHelper() + { + AzToolsFramework::ToolsApplicationEvents::Bus::Broadcast( + &AzToolsFramework::ToolsApplicationEvents::Bus::Events::InvalidatePropertyDisplay, AzToolsFramework::Refresh_AttributesAndValues); + } + AZStd::string Collider::GetEntityName() const { AZStd::string entityName; diff --git a/Gems/PhysX/Code/Editor/DebugDraw.h b/Gems/PhysX/Code/Editor/DebugDraw.h index c43634717a..34b3b57667 100644 --- a/Gems/PhysX/Code/Editor/DebugDraw.h +++ b/Gems/PhysX/Code/Editor/DebugDraw.h @@ -15,8 +15,11 @@ #include #include #include +#include +#include #include #include +#include namespace PhysX { @@ -40,13 +43,15 @@ namespace PhysX class Collider : protected AzFramework::EntityDebugDisplayEventBus::Handler + , protected AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler + , protected AzToolsFramework::EntitySelectionEvents::Bus::Handler { public: AZ_CLASS_ALLOCATOR(Collider, AZ::SystemAllocator, 0); AZ_RTTI(Collider, "{7DE9CA01-DF1E-4D72-BBF4-76C9136BE6A2}"); static void Reflect(AZ::ReflectContext* context); - Collider() = default; + Collider(); void Connect(AZ::EntityId entityId); void SetDisplayCallback(const DisplayCallback* callback); @@ -109,11 +114,20 @@ namespace PhysX const AZStd::vector& GetIndices(AZ::u32 geomIndex) const; protected: - // AzFramework::EntityDebugDisplayEventBus + // AzFramework::EntityDebugDisplayEventBus overrides ... void DisplayEntityViewport( const AzFramework::ViewportInfo& viewportInfo, AzFramework::DebugDisplayRequests& debugDisplay) override; + // AzToolsFramework::ViewportInteraction::ViewportSettingsNotificationBus::Handler overrides ... + void OnDrawHelpersChanged(bool enabled) override; + + // AzToolsFramework::EntitySelectionEvents::Bus::Handler overrides ... + void OnSelected() override; + void OnDeselected() override; + + void RefreshTreeHelper(); + // Internal mesh drawing subroutines void DrawTriangleMesh( AzFramework::DebugDisplayRequests& debugDisplay, const Physics::ColliderConfiguration& colliderConfig, AZ::u32 geomIndex, @@ -143,6 +157,8 @@ namespace PhysX }; mutable AZStd::vector m_geometry; + + PhysX::Debug::DebugDisplayDataChangedEvent::Handler m_debugDisplayDataChangedEvent; }; } // namespace DebugDraw } // namespace PhysX From d2d588901e42cddc0a473edc1ffd3aefa59f3db1 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:00:27 -0500 Subject: [PATCH 46/91] Address PR feedback --- .../Importers/AssImpAnimationImporter.cpp | 34 +++++++++++-------- .../Importers/AssImpBoneImporter.cpp | 23 ++++++++----- .../Importers/AssImpBoneImporter.h | 1 + 3 files changed, 35 insertions(+), 23 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp index ed6d7dfe30..b81d013b87 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpAnimationImporter.cpp @@ -449,13 +449,13 @@ namespace AZ AZStd::unordered_set boneList; - for (int i = 0; i < scene->mNumMeshes; ++i) + for (int meshIndex = 0; meshIndex < scene->mNumMeshes; ++meshIndex) { - auto mesh = scene->mMeshes[i]; + aiMesh* mesh = scene->mMeshes[meshIndex]; - for (auto boneIndex = 0; boneIndex < mesh->mNumBones; ++boneIndex) + for (int boneIndex = 0; boneIndex < mesh->mNumBones; ++boneIndex) { - auto bone = mesh->mBones[boneIndex]; + aiBone* bone = mesh->mBones[boneIndex]; boneList.insert(bone->mName.C_Str()); } @@ -463,20 +463,22 @@ namespace AZ decltype(boneAnimations) fillerAnimations; - // Go through all the animations and make sure we create placeholder animations for any bones missing them + // Go through all the animations and make sure we create animations for bones who's parents don't have an animation for (auto&& anim : boneAnimations) { - for (auto boneName : boneList) + const aiNode* node = scene->mRootNode->FindNode(anim.first.c_str()); + const aiNode* parent = node->mParent; + + while (parent && parent != scene->mRootNode) { - if (!IsPivotNode(aiString(boneName.c_str()))) + if (!IsPivotNode(parent->mName)) { - if (!boneAnimations.contains(boneName) && - !fillerAnimations.contains(boneName)) + if (!boneAnimations.contains(parent->mName.C_Str()) && + !fillerAnimations.contains(parent->mName.C_Str())) { // Create 1 key for each type that just copies the current transform ConsolidatedNodeAnim emptyAnimation; - auto node = scene->mRootNode->FindNode(boneName.c_str()); - aiMatrix4x4 globalTransform = GetConcatenatedLocalTransform(node); + aiMatrix4x4 globalTransform = GetConcatenatedLocalTransform(parent); aiVector3D position, scale; aiQuaternion rotation; @@ -484,7 +486,7 @@ namespace AZ globalTransform.Decompose(scale, rotation, position); emptyAnimation.mNumRotationKeys = emptyAnimation.mNumPositionKeys = emptyAnimation.mNumScalingKeys = 1; - + emptyAnimation.m_ownedPositionKeys.emplace_back(0, position); emptyAnimation.mPositionKeys = emptyAnimation.m_ownedPositionKeys.data(); @@ -493,11 +495,13 @@ namespace AZ emptyAnimation.m_ownedScalingKeys.emplace_back(0, scale); emptyAnimation.mScalingKeys = emptyAnimation.m_ownedScalingKeys.data(); - - fillerAnimations.insert( - AZStd::make_pair(boneName, AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); + + fillerAnimations.insert(AZStd::make_pair( + parent->mName.C_Str(), AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation)))); } } + + parent = parent->mParent; } } diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp index 648007ca47..1958c09b3c 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp @@ -98,6 +98,20 @@ namespace AZ } } + aiMatrix4x4 AssImpBoneImporter::CalculateWorldTransform(const aiNode* currentNode) + { + aiMatrix4x4 transform = {}; + const aiNode* iteratingNode = currentNode; + + while (iteratingNode) + { + transform = iteratingNode->mTransformation * transform; + iteratingNode = iteratingNode->mParent; + } + + return transform; + } + Events::ProcessingResult AssImpBoneImporter::ImportBone(AssImpNodeEncounteredContext& context) { AZ_TraceContext("Importer", "Bone"); @@ -166,14 +180,7 @@ namespace AZ createdBoneData = AZStd::make_shared(); } - aiMatrix4x4 transform{}; - const aiNode* iteratingNode = currentNode; - - while (iteratingNode) - { - transform = iteratingNode->mTransformation * transform; - iteratingNode = iteratingNode->mParent; - } + aiMatrix4x4 transform = CalculateWorldTransform(currentNode); SceneAPI::DataTypes::MatrixType globalTransform = AssImpSDKWrapper::AssImpTypeConverter::ToTransform(transform); diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h index bc4bdd474e..47cc1922cb 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h @@ -32,6 +32,7 @@ namespace AZ static void Reflect(ReflectContext* context); + aiMatrix4x4 CalculateWorldTransform(const aiNode* currentNode); Events::ProcessingResult ImportBone(AssImpNodeEncounteredContext& context); }; } // namespace FbxSceneBuilder From 22ff37ecda23c8c845ee4583132ffd84b517fd29 Mon Sep 17 00:00:00 2001 From: Eric Phister <52085794+amzn-phist@users.noreply.github.com> Date: Mon, 21 Jun 2021 11:18:03 -0500 Subject: [PATCH 47/91] Fixes issue with ACE displaying only banks (#1427) Updates to some AzCore functions a while ago made some path functions strip off a trailing slash, which caused bad paths to be used when loading middleware data. Updated the code to use better path APIs. --- .../Code/Source/Editor/AudioSystemEditor_wwise.cpp | 8 ++++---- .../Code/Source/Editor/AudioSystemEditor_wwise.h | 2 +- .../Code/Source/Editor/AudioWwiseLoader.cpp | 12 ++++++------ .../Code/Include/Editor/IAudioSystemEditor.h | 3 ++- .../Code/Source/Editor/AudioControlsEditorWindow.cpp | 2 +- 5 files changed, 14 insertions(+), 13 deletions(-) diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp index c9ab5a135e..b21c008353 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.cpp @@ -17,6 +17,7 @@ #include #include #include +#include #include #include @@ -540,11 +541,10 @@ namespace AudioControls } //-------------------------------------------------------------------------------------------// - AZStd::string CAudioSystemEditor_wwise::GetDataPath() const + AZ::IO::FixedMaxPath CAudioSystemEditor_wwise::GetDataPath() const { - AZStd::string path(Path::GetEditingGameDataFolder()); - AZ::StringFunc::Path::Join(path.c_str(), "sounds/wwise_project/", path); - return path; + auto projectPath = AZ::IO::FixedMaxPath{ AZ::Utils::GetProjectPath() }; + return (projectPath / "sounds" / "wwise_project"); } } // namespace AudioControls diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h index ee7b54217d..e2a9fdf5d7 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioSystemEditor_wwise.h @@ -86,7 +86,7 @@ namespace AudioControls const AZStd::string_view GetTypeIcon(TImplControlType type) const override; const AZStd::string_view GetTypeIconSelected(TImplControlType type) const override; AZStd::string GetName() const override; - AZStd::string GetDataPath() const; + AZ::IO::FixedMaxPath GetDataPath() const override; void DataSaved() override {} void ConnectionRemoved(IAudioSystemControl* control) override; ////////////////////////////////////////////////////////// diff --git a/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp b/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp index 074e25d39a..3f2aac2b98 100644 --- a/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp +++ b/Gems/AudioEngineWwise/Code/Source/Editor/AudioWwiseLoader.cpp @@ -54,12 +54,12 @@ namespace AudioControls void CAudioWwiseLoader::Load(CAudioSystemEditor_wwise* audioSystemImpl) { m_audioSystemImpl = audioSystemImpl; - const AZStd::string wwiseProjectFullPath(m_audioSystemImpl->GetDataPath()); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::GameParametersFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::GameStatesFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::SwitchesFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::EventsFolder); - LoadControlsInFolder(wwiseProjectFullPath + WwiseStrings::EnvironmentsFolder); + const AZ::IO::FixedMaxPath wwiseProjectFullPath{ m_audioSystemImpl->GetDataPath() }; + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::GameParametersFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::GameStatesFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::SwitchesFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::EventsFolder }.Native()); + LoadControlsInFolder(AZ::IO::FixedMaxPath{ wwiseProjectFullPath / WwiseStrings::EnvironmentsFolder }.Native()); LoadSoundBanks(Audio::Wwise::GetBanksRootPath(), "", false); } diff --git a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h index ac2bc8c0b8..0ccd1390af 100644 --- a/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h +++ b/Gems/AudioSystem/Code/Include/Editor/IAudioSystemEditor.h @@ -14,6 +14,7 @@ #pragma once #include +#include #include #include @@ -151,7 +152,7 @@ namespace AudioControls //! Gets the folder where the implementation specific controls data are stored. //! This is used by the ACE to update if controls are changed while the editor is open. //! @return String with the path to the folder where the implementation specific controls are stored. - virtual AZStd::string GetDataPath() const = 0; + virtual AZ::IO::FixedMaxPath GetDataPath() const = 0; //! Informs the plugin that the ACE has saved the data in case it needs to do any clean up. virtual void DataSaved() = 0; diff --git a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp index 7e3528362e..68d5a30af9 100644 --- a/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp +++ b/Gems/AudioSystem/Code/Source/Editor/AudioControlsEditorWindow.cpp @@ -218,7 +218,7 @@ namespace AudioControls IAudioSystemEditor* pAudioSystemImpl = CAudioControlsEditorPlugin::GetAudioSystemEditorImpl(); if (pAudioSystemImpl) { - StartWatchingFolder(pAudioSystemImpl->GetDataPath()); + StartWatchingFolder(pAudioSystemImpl->GetDataPath().LexicallyNormal().Native()); m_pMiddlewareDockWidget->setWindowTitle(QString(pAudioSystemImpl->GetName().c_str()) + " Controls"); } } From 514cfc3b4c2bd2aae9704b6bfb71eb2b906ee1e9 Mon Sep 17 00:00:00 2001 From: amzn-mike <80125227+amzn-mike@users.noreply.github.com> Date: Mon, 21 Jun 2021 12:27:13 -0500 Subject: [PATCH 48/91] Fix compile error --- .../SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp | 2 +- .../SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp index 1958c09b3c..e726547c98 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.cpp @@ -98,7 +98,7 @@ namespace AZ } } - aiMatrix4x4 AssImpBoneImporter::CalculateWorldTransform(const aiNode* currentNode) + aiMatrix4x4 CalculateWorldTransform(const aiNode* currentNode) { aiMatrix4x4 transform = {}; const aiNode* iteratingNode = currentNode; diff --git a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h index 47cc1922cb..86069cdd9e 100644 --- a/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h +++ b/Code/Tools/SceneAPI/FbxSceneBuilder/Importers/AssImpBoneImporter.h @@ -31,8 +31,7 @@ namespace AZ ~AssImpBoneImporter() override = default; static void Reflect(ReflectContext* context); - - aiMatrix4x4 CalculateWorldTransform(const aiNode* currentNode); + Events::ProcessingResult ImportBone(AssImpNodeEncounteredContext& context); }; } // namespace FbxSceneBuilder From b7f6b57e16379fcbc34f8c5629b6e11976f5db44 Mon Sep 17 00:00:00 2001 From: Chris Santora Date: Mon, 21 Jun 2021 10:34:36 -0700 Subject: [PATCH 49/91] Fixed a couple builders to avoid adding job dependencies on source files that don't exist. This removes mostly benign (but noisy) messages about "Failed to find builder dependency". Changed AssetUtils::GetPossibleDepenencyPaths to return all possible source paths, rather than stopping when one is found. This function is now used to report a list of all possible source dependencies, so that CreateJobs will get called by the AP whenever a file shows up at one of those locations. If a file was missing before and then appears, this will cause the builders to wake up and add the appropriate job dependencies on the new files. In ShaderVariantAssetBuilder and MaterialBuilder, we now use GetPossibleDepenencyPaths to report source dependencies rather than job dependencies. We only report a job dependency when the actual source file has been identified. This should all now be consistent with the intended design of the AP's dependency systems (the prior approach was a hack based on misunderstanding of what source dependencies are). SrgLayoutBuilder's change is a bit tricky. The above changes did not fix all of the "Failed to find builder dependency" messages because AzslBuilder sometimes skips particular files in CreateJobs. When this happens, it is invalid to report an AzslBuilder job dependency on that file. So I copied the same conditional code that is used to skip an azsli file in CreateJobs, and used that to skip AddAzslBuilderJobDependency() in SrgLayoutBuilder as well. With all these changes combined, I do think we've solved the issue where jobs fail to evict outdated jobs, as described in ATOM-15134. However, we are not yet seeing the iteration time improvements we were hoping for. Before these changes I was seeing roughly a 0.5 minute delay for the initial change, and a 2 minute delay for a subsequent change. With these changes it's more like 0.5 mibutes and 1.5 minutes. It appears that the AP scan is being starved by all the AssetBuilder processing going on, and perhaps IO contention. I suspect that this will be greatly improved on the development branch where we no longer have AzslBuilder and SrgLayoutBuilder slowing things down. ATOM-15136 Builder dependency errors reported in mainline ATOM-15134 Replace GetPossibleDepenencyPaths Approach with Source Dependencies --- .../Editor/ShaderVariantAssetBuilder.cpp | 60 ++++++++++++++----- .../Code/Source/Editor/SrgLayoutBuilder.cpp | 10 ++++ .../Include/Atom/RPI.Edit/Common/AssetUtils.h | 1 + .../RPI.Builders/Material/MaterialBuilder.cpp | 53 ++++++++++++---- .../Source/RPI.Edit/Common/AssetUtils.cpp | 21 +------ 5 files changed, 102 insertions(+), 43 deletions(-) diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp index 7114b50906..7697b7820b 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/ShaderVariantAssetBuilder.cpp @@ -72,22 +72,43 @@ namespace AZ static constexpr uint32_t ShaderVariantJobVariantParam = 3; static constexpr uint32_t ShouldExitEarlyFromProcessJobParam = 4; - static void AddShaderAssetJobDependency( - AssetBuilderSDK::JobDescriptor& jobDescriptor, - const AssetBuilderSDK::PlatformInfo& platformInfo, - const AZStd::string& shaderVariantListFilePath, - const AZStd::string& shaderFilePath) + //! Adds source file dependencies for every place a referenced file may appear, and detects if one of + //! those possible paths resolves to the expected file. + //! @param currentFilePath - the full path to the file being processed + //! @param referencedParentPath - the path to a reference file, which may be relative to the @currentFilePath, or may be a full asset path. + //! @param sourceFileDependencies - new source file dependencies will be added to this list + //! @param foundSourceFile - if one of the source file dependencies is found, the highest priority one will be indicated here, otherwise this will be empty. + //! @return true if the referenced file was found and @foundSourceFile was set + bool LocateReferencedSourceFile( + AZStd::string_view currentFilePath, AZStd::string_view referencedParentPath, + AZStd::vector& sourceFileDependencies, + AZStd::string& foundSourceFile) { - AZStd::vector possibleDependencies = AZ::RPI::AssetUtils::GetPossibleDepenencyPaths(shaderVariantListFilePath, shaderFilePath); + foundSourceFile.clear(); + + bool found = false; + + AZStd::vector possibleDependencies = RPI::AssetUtils::GetPossibleDepenencyPaths(currentFilePath, referencedParentPath); for (auto& file : possibleDependencies) { - AssetBuilderSDK::JobDependency jobDependency; - jobDependency.m_jobKey = ShaderAssetBuilder::ShaderAssetBuilderJobKey; - jobDependency.m_platformIdentifier = platformInfo.m_identifier; - jobDependency.m_type = AssetBuilderSDK::JobDependencyType::Order; - jobDependency.m_sourceFile.m_sourceFileDependencyPath = file; - jobDescriptor.m_jobDependencyList.push_back(jobDependency); + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceFileDependencyPath = file; + sourceFileDependencies.push_back(sourceFileDependency); + + if (!found) + { + AZ::Data::AssetInfo sourceInfo; + AZStd::string watchFolder; + AzToolsFramework::AssetSystemRequestBus::BroadcastResult(found, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetSourceInfoBySourcePath, file.c_str(), sourceInfo, watchFolder); + + if (found) + { + foundSourceFile = file; + } + } } + + return found; } //! Returns true if @sourceFileFullPath starts with a valid asset processor scan folder, false otherwise. @@ -334,6 +355,9 @@ namespace AZ response.m_result = AssetBuilderSDK::CreateJobsResultCode::Success; return; } + + AZStd::string foundShaderFile; + LocateReferencedSourceFile(variantListFullPath, shaderVariantList.m_shaderFilePath, response.m_sourceFileDependencyList, foundShaderFile); for (const AssetBuilderSDK::PlatformInfo& info : request.m_enabledPlatforms) { @@ -349,8 +373,16 @@ namespace AZ jobDescriptor.m_jobKey = GetShaderVariantTreeAssetJobKey(); jobDescriptor.SetPlatformIdentifier(info.m_identifier.data()); - - AddShaderAssetJobDependency(jobDescriptor, info, variantListFullPath, shaderVariantList.m_shaderFilePath); + + if (!foundShaderFile.empty()) + { + AssetBuilderSDK::JobDependency jobDependency; + jobDependency.m_jobKey = ShaderAssetBuilder::ShaderAssetBuilderJobKey; + jobDependency.m_platformIdentifier = info.m_identifier; + jobDependency.m_type = AssetBuilderSDK::JobDependencyType::Order; + jobDependency.m_sourceFile.m_sourceFileDependencyPath = foundShaderFile; + jobDescriptor.m_jobDependencyList.push_back(jobDependency); + } jobDescriptor.m_jobParameters.emplace(ShaderSourceFilePathJobParam, shaderSourceFileFullPath); diff --git a/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutBuilder.cpp b/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutBuilder.cpp index a7721c84a2..9a3eda055e 100644 --- a/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutBuilder.cpp +++ b/Gems/Atom/Asset/Shader/Code/Source/Editor/SrgLayoutBuilder.cpp @@ -203,6 +203,16 @@ namespace AZ // queue up AzslBuilder dependencies: for (RHI::ShaderPlatformInterface* shaderPlatformInterface : platformInterfaces) { + const bool isAzsli = AzFramework::StringFunc::Path::IsExtension(fullPath.c_str(), "azsli"); + if (isAzsli) + { + auto skipCheck = ShaderBuilderUtility::ShouldSkipFileForSrgProcessing(SrgLayoutBuilderName, fullPath); + if (skipCheck != ShaderBuilderUtility::SrgSkipFileResult::ContinueProcess) + { + continue; + } + } + AddAzslBuilderJobDependency(jobDescriptor, info.m_identifier, shaderPlatformInterface->GetAPIName().GetCStr(), fullPath); } response.m_createJobOutputs.push_back(jobDescriptor); diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h index 554d20dede..4db2187551 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Edit/Common/AssetUtils.h @@ -66,6 +66,7 @@ namespace AZ //! it's possible that b.json could be found in either MyGem/Assets/Foo/Bar/a.json or in MyGem/Assets/Bar/a.json. //! @param originatingSourceFilePath Path to a file that references referencedSourceFilePath. May be absolute or relative to asset-root. //! @param referencedSourceFilePath The referenced path as it appears in the originating file. May be relative to the originating file location or relative to asset-root. + //! @return the list of possible paths, ordered from highest priority to lowest priority AZStd::vector GetPossibleDepenencyPaths(const AZStd::string& originatingSourceFilePath, const AZStd::string& referencedSourceFilePath); // Definitions... diff --git a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp index d31b6b3802..d52bba2482 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Builders/Material/MaterialBuilder.cpp @@ -67,16 +67,41 @@ namespace AZ BusDisconnect(); } - void AddPossibleJobDependencies(const char* jobKey, AZStd::string_view currentFilePath, AZStd::string_view referencedParentPath, AZStd::vector& jobDependencies) + //! Adds all relevant dependencies for a referenced source file, considering that the path might be relative to the original file location or a full asset path. + //! This will usually include multiple source dependencies and a single job dependency, but will include only source dependencies if the file is not found. + //! Note the AssetBuilderSDK::JobDependency::m_platformIdentifier will not be set by this function. The calling code must set this value before passing back + //! to the AssetBuilderSDK::CreateJobsResponse. + void AddPossibleDependencies( + AZStd::string_view currentFilePath, AZStd::string_view referencedParentPath, + AZStd::vector& sourceFileDependencies, + const char* jobKey, AZStd::vector& jobDependencies) { - AZStd::vector possibleDependencies = AssetUtils::GetPossibleDepenencyPaths(currentFilePath, referencedParentPath); + bool dependencyFileFound = false; + + AZStd::vector possibleDependencies = RPI::AssetUtils::GetPossibleDepenencyPaths(currentFilePath, referencedParentPath); for (auto& file : possibleDependencies) { - AssetBuilderSDK::JobDependency jobDependency; - jobDependency.m_jobKey = jobKey; - jobDependency.m_type = AssetBuilderSDK::JobDependencyType::Order; - jobDependency.m_sourceFile.m_sourceFileDependencyPath = file; - jobDependencies.push_back(jobDependency); + AssetBuilderSDK::SourceFileDependency sourceFileDependency; + sourceFileDependency.m_sourceFileDependencyPath = file; + sourceFileDependencies.push_back(sourceFileDependency); + + // The first path found is the highest priority, and will have a job dependency, as this is the one + // the builder will actually use + if (!dependencyFileFound) + { + AZ::Data::AssetInfo sourceInfo; + AZStd::string watchFolder; + AzToolsFramework::AssetSystemRequestBus::BroadcastResult(dependencyFileFound, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetSourceInfoBySourcePath, file.c_str(), sourceInfo, watchFolder); + + if (dependencyFileFound) + { + AssetBuilderSDK::JobDependency jobDependency; + jobDependency.m_jobKey = jobKey; + jobDependency.m_type = AssetBuilderSDK::JobDependencyType::Order; + jobDependency.m_sourceFile.m_sourceFileDependencyPath = file; + jobDependencies.push_back(jobDependency); + } + } } } @@ -123,7 +148,7 @@ namespace AZ // We'll build up this one JobDescriptor and reuse it to register each of the platforms AssetBuilderSDK::JobDescriptor outputJobDescriptor; outputJobDescriptor.m_jobKey = JobKey; - + // Load the file so we can detect and report dependencies. // If the file is a .materialtype, report dependencies on the .shader files. // If the file is a .material, report a dependency on the .materialtype and parent .material file @@ -152,7 +177,9 @@ namespace AZ for (auto& shader : materialTypeSourceData.GetValue().m_shaderCollection) { - AddPossibleJobDependencies("Shader Asset", request.m_sourceFile, shader.m_shaderFilePath, outputJobDescriptor.m_jobDependencyList); + AddPossibleDependencies(request.m_sourceFile, shader.m_shaderFilePath, + response.m_sourceFileDependencyList, "Shader Asset", + outputJobDescriptor.m_jobDependencyList); } for (auto& functor : materialTypeSourceData.GetValue().m_materialFunctorSourceData) @@ -161,7 +188,9 @@ namespace AZ for (const MaterialFunctorSourceData::AssetDependency& dependency : dependencies) { - AddPossibleJobDependencies(dependency.m_jobKey.c_str(), request.m_sourceFile, dependency.m_sourceFilePath, outputJobDescriptor.m_jobDependencyList); + AddPossibleDependencies(request.m_sourceFile, dependency.m_sourceFilePath, + response.m_sourceFileDependencyList, + dependency.m_jobKey.c_str(), outputJobDescriptor.m_jobDependencyList); } } } @@ -196,7 +225,9 @@ namespace AZ // Register dependency on the parent material source file so we can load it and use it's data to build this variant material. // Note, we don't need a direct dependency on the material type because the parent material will depend on it. - AddPossibleJobDependencies(JobKey, request.m_sourceFile, parentMaterialPath, outputJobDescriptor.m_jobDependencyList); + AddPossibleDependencies(request.m_sourceFile, parentMaterialPath, + response.m_sourceFileDependencyList, + JobKey, outputJobDescriptor.m_jobDependencyList); } } diff --git a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp index 32cffc771a..8fa0094a53 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Edit/Common/AssetUtils.cpp @@ -109,31 +109,16 @@ namespace AZ AZStd::vector GetPossibleDepenencyPaths(const AZStd::string& originatingSourceFilePath, const AZStd::string& referencedSourceFilePath) { - // We potentially add the parent dependency as both a direct path and a relative path rather than use AssetUtils::ResolvePathReference - // because there is no guarantee that the Asset Processor has seen the parent file yet (which ResolvePathReference requires). - // In that case, we have to add both possible locations because we don't know where it will show up. - AZStd::vector results; - // The first dependency we add is using the referencedSourceFilePath as a relative path. This gives relative paths priority over asset-root paths. + // Use the referencedSourceFilePath as a relative path starting at originatingSourceFilePath AZStd::string combinedPath = originatingSourceFilePath; AzFramework::StringFunc::Path::StripFullName(combinedPath); AzFramework::StringFunc::Path::Join(combinedPath.c_str(), referencedSourceFilePath.c_str(), combinedPath); results.push_back(combinedPath); - // If the parent file exists at the relative path, then there is no need to report a dependency on the asset-root path. - bool assetFound = false; - AZ::Data::AssetInfo sourceInfo; - AZStd::string watchFolder; - AzToolsFramework::AssetSystemRequestBus::BroadcastResult(assetFound, &AzToolsFramework::AssetSystem::AssetSystemRequest::GetSourceInfoBySourcePath, combinedPath.c_str(), sourceInfo, watchFolder); - - if (!assetFound) - { - // The parent file wasn't found at the relative path, so we need a dependency on the asset-root path in case the file - // exists there. Note, we still keep the relative path dependency above because we don't know whether it's missing because - // it doesn't exist, or just because the AP hasn't found it yet. - results.push_back(referencedSourceFilePath); - } + // Use the referencedSourceFilePath as a standard asset path + results.push_back(referencedSourceFilePath); return results; } From 74bb2737ca3eaed752a0ebdf8ade6895076d6dcf Mon Sep 17 00:00:00 2001 From: Terry Michaels Date: Mon, 21 Jun 2021 12:50:26 -0500 Subject: [PATCH 50/91] Replaced menu icon in secondary toolbar (#1459) --- .../AzQtComponents/Images/Menu/menu.svg | 11 +++++++++++ .../AzQtComponents/Images/resources.qrc | 1 + Code/Sandbox/Editor/ViewportTitleDlg.ui | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/menu.svg diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/menu.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/menu.svg new file mode 100644 index 0000000000..e97da32e09 --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/menu.svg @@ -0,0 +1,11 @@ + + + Buttons / Dropdown button with Icon / no arrow + + + + + + + + \ No newline at end of file diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc index cc66558367..bf110c1899 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc @@ -28,5 +28,6 @@ Menu/script_canvas_editor.svg Menu/trackview_editor.svg Menu/ui_editor.svg + Menu/menu.svg diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.ui b/Code/Sandbox/Editor/ViewportTitleDlg.ui index 2d547bfa99..58b4ec70c6 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.ui +++ b/Code/Sandbox/Editor/ViewportTitleDlg.ui @@ -94,7 +94,7 @@ - :/stylesheet/img/UI20/menu-centered.svg:/stylesheet/img/UI20/menu-centered.svg + :/Menu/menu.svg:/Menu/menu.svg From 40a84c3c7472fe99c618d6011b88ca017e32af25 Mon Sep 17 00:00:00 2001 From: greerdv Date: Mon, 21 Jun 2021 20:09:48 +0100 Subject: [PATCH 51/91] add editor python script to help with migrating levels with non-uniform scale --- scripts/migration/non_uniform_scale.py | 57 ++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 scripts/migration/non_uniform_scale.py diff --git a/scripts/migration/non_uniform_scale.py b/scripts/migration/non_uniform_scale.py new file mode 100644 index 0000000000..a645c6818f --- /dev/null +++ b/scripts/migration/non_uniform_scale.py @@ -0,0 +1,57 @@ +import sys +import azlmbr +from pathlib import Path + +def fixup_current_level(threshold): + nonUniformScaleComponentId = azlmbr.editor.EditorNonUniformScaleComponentTypeId + + # iterate over all entities in the level + entityIdList = azlmbr.entity.SearchBus(azlmbr.bus.Broadcast, 'SearchEntities', azlmbr.entity.SearchFilter()) + for entityId in entityIdList: + name = azlmbr.editor.EditorEntityInfoRequestBus(azlmbr.bus.Event, 'GetName', entityId) + local = azlmbr.components.TransformBus(azlmbr.bus.Event, 'GetLocalScale', entityId) + + # only process entities where the non-uniformity is greater than the threshold + local_max = max(local.x, local.y, local.z) + local_min = min(local.x, local.y, local.z) + if local_max / local_min > 1 + threshold: + + # check if there is already a Non-uniform Scale component + getComponentOutcome = azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast, 'GetComponentOfType', entityId, nonUniformScaleComponentId) + if getComponentOutcome.IsSuccess(): + print(f"skipping {name} as it already has a Non-uniform Scale component") + + else: + # add Non-uniform Scale component and set it to the non-uniform part of the local scale + azlmbr.editor.EditorComponentAPIBus(azlmbr.bus.Broadcast,'AddComponentsOfType', entityId, [nonUniformScaleComponentId]) + vec = azlmbr.math.Vector3(local.x / local_max, local.y / local_max, local.z / local_max) + azlmbr.entity.NonUniformScaleRequestBus(azlmbr.bus.Event, 'SetScale', entityId, vec) + print(f"added non-uniform scale component for {name}: {local.x}, {local.y}, {local.z}") + +if __name__ == '__main__': + # handle the arguments manually since argparse causes problems when run through EditorPythonBindings + process_all_levels = "--all" in sys.argv + + # ignore entities where the relative difference between the min and max scale values is less than this threshold + threshold = 0.001 + for i in range(len(sys.argv) - 1): + if sys.argv[i] == "--threshold": + try: + threshold = float(sys.argv[i + 1]) + except ValueError: + print(f"invalid threshold value {sys.argv[i + 1]}, using default value {threshold}") + pass + + if process_all_levels: + game_folder = Path(azlmbr.legacy.general.get_game_folder()) + level_folder = game_folder / 'Levels' + levels = [str(level) for level in level_folder.rglob('*.ly')] + [str(level) for level in level_folder.rglob('*.cry')] + for level in levels: + if "_savebackup" not in level: + print(f'loading level {level}') + azlmbr.legacy.general.open_level_no_prompt(level) + azlmbr.legacy.general.idle_wait(2.0) + fixup_current_level(threshold) + azlmbr.legacy.general.save_level() + else: + fixup_current_level(threshold) From 46f8c7c1ba9ccc77b09eca752062c278fa7312f6 Mon Sep 17 00:00:00 2001 From: cgalvan Date: Mon, 21 Jun 2021 16:03:49 -0500 Subject: [PATCH 52/91] [LYN-3412] Updated LandscapeCanvas component to properly serialize with prefabs. (#1224) * [LYN-3412] Updated LandscapeCanvas component to properly serialize with prefabs. * [LYN-3412] Updated PR with feedback. * [LYN-3412] Reverted unintentional changes. * [LYN-3412] Removed one more comment. * [LYN-3412] Additional PR feedback fixed. --- .../Material/MaterialAssignmentSerializer.cpp | 4 +- .../Integration/GraphCanvasMetadata.h | 1 + .../Code/Include/GraphModel/Model/Graph.h | 10 +- .../Code/Include/GraphModel/Model/Slot.h | 28 +++ .../Source/Integration/GraphController.cpp | 6 +- Gems/GraphModel/Code/Source/Model/Graph.cpp | 8 +- Gems/GraphModel/Code/Source/Model/Slot.cpp | 162 +++++++++++++++++- .../Code/Source/Editor/MainWindow.cpp | 42 ++++- .../Code/Source/Editor/MainWindow.h | 8 + 9 files changed, 248 insertions(+), 21 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp index a895c04b95..551b561200 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Material/MaterialAssignmentSerializer.cpp @@ -173,7 +173,7 @@ namespace AZ { if (inputPropertyValue.IsObject() && inputPropertyValue.HasMember("Value") && inputPropertyValue.HasMember("$type")) { - // Requiring explicit type info to differentiate be=tween colors versus vectors and numeric types + // Requiring explicit type info to differentiate between colors versus vectors and numeric types const AZ::Uuid baseTypeId = azrtti_typeid(); AZ::Uuid typeId = AZ::Uuid::CreateNull(); result.Combine(LoadTypeId(typeId, inputPropertyValue, context, &baseTypeId)); @@ -198,7 +198,7 @@ namespace AZ { outputPropertyValue.SetObject(); - // Storing explicit type info to differentiate be=tween colors versus vectors and numeric types + // Storing explicit type info to differentiate between colors versus vectors and numeric types rapidjson::Value typeValue; result.Combine(StoreTypeId(typeValue, azrtti_typeid(), context)); outputPropertyValue.AddMember("$type", typeValue, context.GetJsonAllocator()); diff --git a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphCanvasMetadata.h b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphCanvasMetadata.h index d08acd0b17..1937341cd2 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphCanvasMetadata.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Integration/GraphCanvasMetadata.h @@ -14,6 +14,7 @@ // AZ #include +#include #include // Graph Model diff --git a/Gems/GraphModel/Code/Include/GraphModel/Model/Graph.h b/Gems/GraphModel/Code/Include/GraphModel/Model/Graph.h index 50c1287080..f3dd85575f 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Model/Graph.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Model/Graph.h @@ -14,10 +14,10 @@ // AZ #include #include -#include #include // Graph Model +#include #include #include @@ -136,9 +136,9 @@ namespace GraphModel //! Set/gets a bundle of generic metadata that is provided by the node graph UI //! system. This may include node positions, comment blocks, node groupings, and //! bookmarks, for example. - void SetUiMetadata(const AZStd::any& uiMetadata); - const AZStd::any& GetUiMetadata() const; - AZStd::any& GetUiMetadata(); + void SetUiMetadata(const GraphModelIntegration::GraphCanvasMetadata& uiMetadata); + const GraphModelIntegration::GraphCanvasMetadata& GetUiMetadata() const; + GraphModelIntegration::GraphCanvasMetadata& GetUiMetadata(); AZStd::shared_ptr FindSlot(const Endpoint& endpoint); @@ -157,7 +157,7 @@ namespace GraphModel ConnectionList m_connections; //! Used to store and serialize metadata from the graph UI, like node positions, comments, group boxes, etc. - AZStd::any m_uiMetadata; + GraphModelIntegration::GraphCanvasMetadata m_uiMetadata; //! Used to store all of our node <-> wrapper node mappings NodeWrappingMap m_nodeWrappings; diff --git a/Gems/GraphModel/Code/Include/GraphModel/Model/Slot.h b/Gems/GraphModel/Code/Include/GraphModel/Model/Slot.h index 0ce02ffa9d..0b012fd2cd 100644 --- a/Gems/GraphModel/Code/Include/GraphModel/Model/Slot.h +++ b/Gems/GraphModel/Code/Include/GraphModel/Model/Slot.h @@ -12,6 +12,7 @@ #pragma once // AZ +#include #include #include #include @@ -165,6 +166,32 @@ namespace GraphModel ExtendableSlotConfiguration m_extendableSlotConfiguration; }; + //! Custom JSON serializer for Slot because we use an AZStd::any for m_value + class JsonSlotSerializer + : public AZ::BaseJsonSerializer + { + public: + AZ_RTTI(JsonSlotSerializer, "{8AC96D70-7BCD-4D68-8813-269938982D51}", AZ::BaseJsonSerializer); + AZ_CLASS_ALLOCATOR(JsonSlotSerializer, AZ::SystemAllocator, 0); + + AZ::JsonSerializationResult::Result Load( + void* outputValue, const AZ::Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + AZ::JsonDeserializerContext& context) override; + + AZ::JsonSerializationResult::Result Store( + rapidjson::Value& outputValue, const void* inputValue, const void* defaultValue, const AZ::Uuid& valueTypeId, + AZ::JsonSerializerContext& context) override; + + private: + template + bool LoadAny( + AZStd::any& propertyValue, const rapidjson::Value& inputPropertyValue, AZ::JsonDeserializerContext& context, + AZ::JsonSerializationResult::ResultCode& result); + template + bool StoreAny( + const AZStd::any& propertyValue, rapidjson::Value& outputPropertyValue, AZ::JsonSerializerContext& context, + AZ::JsonSerializationResult::ResultCode& result); + }; //!!! Start in Graph.h for high level GraphModel documentation !!! @@ -180,6 +207,7 @@ namespace GraphModel class Slot : public GraphElement, public AZStd::enable_shared_from_this { friend class Graph; // So the Graph can update the Slot's cache of Connection pointers + friend class JsonSlotSerializer; // So we can set the m_value and m_subId directly from the serializer public: AZ_CLASS_ALLOCATOR(Slot, AZ::SystemAllocator, 0); diff --git a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp index f6ce6282f4..bb5291637e 100644 --- a/Gems/GraphModel/Code/Source/Integration/GraphController.cpp +++ b/Gems/GraphModel/Code/Source/Integration/GraphController.cpp @@ -1338,11 +1338,7 @@ namespace GraphModelIntegration GraphCanvasMetadata* GraphController::GetGraphMetadata() { - if (!m_graph->GetUiMetadata().is()) - { - m_graph->SetUiMetadata(AZStd::any(GraphCanvasMetadata())); - } - GraphCanvasMetadata* graphCanvasMetadata = AZStd::any_cast(&m_graph->GetUiMetadata()); + GraphCanvasMetadata* graphCanvasMetadata = &m_graph->GetUiMetadata(); AZ_Assert(graphCanvasMetadata, "GraphCanvasMetadata not initialized"); return graphCanvasMetadata; } diff --git a/Gems/GraphModel/Code/Source/Model/Graph.cpp b/Gems/GraphModel/Code/Source/Model/Graph.cpp index 809679e9f6..e82b5d8e15 100644 --- a/Gems/GraphModel/Code/Source/Model/Graph.cpp +++ b/Gems/GraphModel/Code/Source/Model/Graph.cpp @@ -37,7 +37,7 @@ namespace GraphModel if (serializeContext) { serializeContext->Class() - ->Version(1) + ->Version(2) ->Field("m_nodes", &Graph::m_nodes) ->Field("m_connections", &Graph::m_connections) ->Field("m_uiMetadata", &Graph::m_uiMetadata) @@ -312,19 +312,19 @@ namespace GraphModel } - void Graph::SetUiMetadata(const AZStd::any& uiMetadata) + void Graph::SetUiMetadata(const GraphModelIntegration::GraphCanvasMetadata& uiMetadata) { m_uiMetadata = uiMetadata; } - const AZStd::any& Graph::GetUiMetadata() const + const GraphModelIntegration::GraphCanvasMetadata& Graph::GetUiMetadata() const { return m_uiMetadata; } - AZStd::any& Graph::GetUiMetadata() + GraphModelIntegration::GraphCanvasMetadata& Graph::GetUiMetadata() { return m_uiMetadata; } diff --git a/Gems/GraphModel/Code/Source/Model/Slot.cpp b/Gems/GraphModel/Code/Source/Model/Slot.cpp index e5fb9f8cb8..6433129af8 100644 --- a/Gems/GraphModel/Code/Source/Model/Slot.cpp +++ b/Gems/GraphModel/Code/Source/Model/Slot.cpp @@ -11,9 +11,14 @@ */ // AZ +#include +#include +#include +#include #include #include #include +#include #include // Graph Model @@ -294,13 +299,164 @@ namespace GraphModel ///////////////////////////////////////////////////////// // Slot + AZ::JsonSerializationResult::Result JsonSlotSerializer::Load( + void* outputValue, const AZ::Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + AZ::JsonDeserializerContext& context) + { + namespace JSR = AZ::JsonSerializationResult; + + AZ_Assert( + azrtti_typeid() == outputValueTypeId, + "Unable to deserialize Slot from json because the provided type is %s.", + outputValueTypeId.ToString().c_str()); + + Slot* slot = reinterpret_cast(outputValue); + AZ_Assert(slot, "Output value for JsonSlotSerializer can't be null."); + + JSR::ResultCode result(JSR::Tasks::ReadField); + + auto serializedSlotValue = inputValue.FindMember("m_value"); + if (serializedSlotValue != inputValue.MemberEnd()) + { + AZStd::any slotValue; + if (LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result) || + LoadAny(slotValue, serializedSlotValue->value, context, result)) + { + slot->m_value = slotValue; + } + } + + // Load m_subId normally because it's just an int + { + SlotSubId slotSubId = 0; + result.Combine(ContinueLoadingFromJsonObjectField( + &slotSubId, azrtti_typeid(), inputValue, + "m_subId", context)); + slot->m_subId = slotSubId; + } + + return context.Report( + result, + result.GetProcessing() != JSR::Processing::Halted ? "Succesfully loaded Slot information." + : "Failed to load Slot information."); + } + + AZ::JsonSerializationResult::Result JsonSlotSerializer::Store( + rapidjson::Value& outputValue, const void* inputValue, [[maybe_unused]] const void* defaultValue, const AZ::Uuid& valueTypeId, + AZ::JsonSerializerContext& context) + { + namespace JSR = AZ::JsonSerializationResult; + + AZ_Assert( + azrtti_typeid() == valueTypeId, + "Unable to Serialize Slot because the provided type is %s.", valueTypeId.ToString().c_str()); + + const Slot* slot = reinterpret_cast(inputValue); + AZ_Assert(slot, "Input value for JsonSlotSerializer can't be null."); + + outputValue.SetObject(); + + JSR::ResultCode result(JSR::Tasks::WriteValue); + + { + AZ::ScopedContextPath subPathPropertyOverrides(context, "m_value"); + + if (!slot->m_value.empty()) + { + rapidjson::Value outputPropertyValue; + if (StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result) || + StoreAny(slot->m_value, outputPropertyValue, context, result)) + { + outputValue.AddMember("m_value", outputPropertyValue, context.GetJsonAllocator()); + } + } + } + + { + AZ::ScopedContextPath subSlotId(context, "m_subId"); + SlotSubId defaultSubId = 0; + + result.Combine(ContinueStoringToJsonObjectField( + outputValue, "m_subId", &slot->m_subId, &defaultSubId, + azrtti_typeid(), context)); + } + + return context.Report( + result, + result.GetProcessing() != JSR::Processing::Halted ? "Successfully stored MaterialAssignment information." + : "Failed to store MaterialAssignment information."); + } + + template + bool JsonSlotSerializer::LoadAny( + AZStd::any& propertyValue, const rapidjson::Value& inputPropertyValue, AZ::JsonDeserializerContext& context, + AZ::JsonSerializationResult::ResultCode& result) + { + auto valueItr = inputPropertyValue.FindMember("Value"); + auto typeItr = inputPropertyValue.FindMember("$type"); + if ((valueItr != inputPropertyValue.MemberEnd()) && (typeItr != inputPropertyValue.MemberEnd())) + { + // Requiring explicit type info to differentiate between colors versus vectors and numeric types + const AZ::Uuid baseTypeId = azrtti_typeid(); + AZ::Uuid typeId = AZ::Uuid::CreateNull(); + result.Combine(LoadTypeId(typeId, inputPropertyValue, context, &baseTypeId)); + + if (typeId == azrtti_typeid()) + { + T value; + result.Combine(ContinueLoadingFromJsonObjectField(&value, azrtti_typeid(), inputPropertyValue, "Value", context)); + propertyValue = value; + return true; + } + } + return false; + } + + template + bool JsonSlotSerializer::StoreAny( + const AZStd::any& propertyValue, rapidjson::Value& outputPropertyValue, AZ::JsonSerializerContext& context, + AZ::JsonSerializationResult::ResultCode& result) + { + if (propertyValue.is()) + { + outputPropertyValue.SetObject(); + + // Storing explicit type info to differentiate between colors versus vectors and numeric types + rapidjson::Value typeValue; + result.Combine(StoreTypeId(typeValue, azrtti_typeid(), context)); + outputPropertyValue.AddMember("$type", typeValue, context.GetJsonAllocator()); + + T value = AZStd::any_cast(propertyValue); + result.Combine( + ContinueStoringToJsonObjectField(outputPropertyValue, "Value", &value, nullptr, azrtti_typeid(), context)); + return true; + } + return false; + } + void Slot::Reflect(AZ::ReflectContext* context) { - AZ::SerializeContext* serializeContext = azrtti_cast(context); - if (serializeContext) + if (auto jsonContext = azrtti_cast(context)) + { + jsonContext->Serializer()->HandlesType(); + } + + if (auto serializeContext = azrtti_cast(context)) { serializeContext->Class() - ->Version(0) + ->Version(1) ->Field("m_value", &Slot::m_value) ->Field("m_subId", &Slot::m_subId) // m_slotDescription is not reflected because that data is populated procedurally by each node diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp index 3879cd2597..2f3a7d7ab4 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.cpp @@ -460,10 +460,10 @@ namespace LandscapeCanvasEditor GraphCanvas::StyleManagerRequestBus::Event(editorId, &GraphCanvas::StyleManagerRequests::RegisterDataPaletteStyle, LandscapeCanvas::AreaTypeId, "VegetationAreaDataColorPalette"); LandscapeCanvas::LandscapeCanvasRequestBus::Handler::BusConnect(); - AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusConnect(AzToolsFramework::GetEntityContextId()); AzToolsFramework::EntityCompositionNotificationBus::Handler::BusConnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusConnect(); + AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusConnect(); CrySystemEventBus::Handler::BusConnect(); AZ::EntitySystemBus::Handler::BusConnect(); @@ -480,6 +480,7 @@ namespace LandscapeCanvasEditor { AZ::EntitySystemBus::Handler::BusDisconnect(); CrySystemEventBus::Handler::BusDisconnect(); + AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler::BusDisconnect(); AzToolsFramework::ToolsApplicationNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorPickModeNotificationBus::Handler::BusDisconnect(); AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); @@ -883,6 +884,10 @@ namespace LandscapeCanvasEditor if (landscapeCanvasComponent) { landscapeCanvasComponent->m_graph = *m_serializeContext->CloneObject(graph.get()); + + // Mark the Landscape Canvas entity as dirty so the changes to the graph will be picked up on the next save + AzToolsFramework::ScopedUndoBatch undo("Update Landscape Canvas Graph"); + AzToolsFramework::ToolsApplicationRequests::Bus::Broadcast(&AzToolsFramework::ToolsApplicationRequests::Bus::Events::AddDirtyEntity, rootEntityId); } } } @@ -1572,7 +1577,7 @@ namespace LandscapeCanvasEditor void MainWindow::HandleEditorEntityCreated(const AZ::EntityId& entityId, GraphCanvas::GraphId graphId) { - if (m_ignoreGraphUpdates) + if (m_ignoreGraphUpdates || m_prefabPropagationInProgress) { return; } @@ -1622,6 +1627,11 @@ namespace LandscapeCanvasEditor void MainWindow::OnEditorEntityDeleted(const AZ::EntityId& entityId) { + if (m_prefabPropagationInProgress) + { + return; + } + m_queuedEntityDeletes.push_back(entityId); QTimer::singleShot(0, [this, entityId]() { @@ -2456,6 +2466,11 @@ namespace LandscapeCanvasEditor void MainWindow::EntityParentChanged(AZ::EntityId entityId, AZ::EntityId newParentId, AZ::EntityId oldParentId) { + if (m_prefabPropagationInProgress) + { + return; + } + GraphCanvas::GraphId oldGraphId = FindGraphContainingEntity(oldParentId); GraphCanvas::GraphId newGraphId = FindGraphContainingEntity(newParentId); @@ -2482,6 +2497,20 @@ namespace LandscapeCanvasEditor } } + void MainWindow::OnPrefabInstancePropagationBegin() + { + // Ignore graph updates during prefab propagation because the entities will be + // deleted and re-created, which would inadvertantly trigger our logic to close + // the graph when the corresponding entity is deleted. + m_prefabPropagationInProgress = true; + } + + void MainWindow::OnPrefabInstancePropagationEnd() + { + // See comment above in OnPrefabInstancePropagationBegin + m_prefabPropagationInProgress = false; + } + void MainWindow::OnCryEditorEndCreate() { UpdateGraphEnabled(); @@ -2490,6 +2519,15 @@ namespace LandscapeCanvasEditor void MainWindow::OnCryEditorEndLoad() { UpdateGraphEnabled(); + + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusConnect(); + } + + void MainWindow::OnCryEditorCloseScene() + { + UpdateGraphEnabled(); + + AzToolsFramework::EditorEntityContextNotificationBus::Handler::BusDisconnect(); } void MainWindow::OnCryEditorSceneClosed() diff --git a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h index eddf998d8d..e6887eecfd 100644 --- a/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h +++ b/Gems/LandscapeCanvas/Code/Source/Editor/MainWindow.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -84,6 +85,7 @@ namespace LandscapeCanvasEditor , private AzToolsFramework::EntityCompositionNotificationBus::Handler , private AzToolsFramework::PropertyEditorEntityChangeNotificationBus::MultiHandler , private AzToolsFramework::ToolsApplicationNotificationBus::Handler + , private AzToolsFramework::Prefab::PrefabPublicNotificationBus::Handler , private CrySystemEventBus::Handler { Q_OBJECT @@ -183,10 +185,15 @@ namespace LandscapeCanvasEditor void EntityParentChanged(AZ::EntityId entityId, AZ::EntityId newParentId, AZ::EntityId oldParentId) override; //////////////////////////////////////////////////////////////////////// + //! PrefabPublicNotificationBus overrides + void OnPrefabInstancePropagationBegin() override; + void OnPrefabInstancePropagationEnd() override; + //////////////////////////////////////////////////////////////////////// // CrySystemEventBus overrides void OnCryEditorEndCreate() override; void OnCryEditorEndLoad() override; + void OnCryEditorCloseScene() override; void OnCryEditorSceneClosed() override; //////////////////////////////////////////////////////////////////////// @@ -246,6 +253,7 @@ namespace LandscapeCanvasEditor AZ::SerializeContext* m_serializeContext = nullptr; bool m_ignoreGraphUpdates = false; + bool m_prefabPropagationInProgress = false; bool m_inObjectPickMode = false; using DeletedNodePositionsMap = AZStd::unordered_map; From ca76a4d1ab29074a209b190388b2149ea0ff08b5 Mon Sep 17 00:00:00 2001 From: Terry Michaels Date: Mon, 21 Jun 2021 16:11:50 -0500 Subject: [PATCH 53/91] Moved helpers to the top level menu bar above viewport (#1464) --- .../AzQtComponents/Images/Menu/helpers.svg | 24 +++++++++++++++++++ .../AzQtComponents/Images/resources.qrc | 1 + Code/Sandbox/Editor/ViewportTitleDlg.cpp | 16 +++++++------ Code/Sandbox/Editor/ViewportTitleDlg.h | 2 +- Code/Sandbox/Editor/ViewportTitleDlg.ui | 12 ++++++++++ 5 files changed, 47 insertions(+), 8 deletions(-) create mode 100644 Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/helpers.svg diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/helpers.svg b/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/helpers.svg new file mode 100644 index 0000000000..e782a7066a --- /dev/null +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/Menu/helpers.svg @@ -0,0 +1,24 @@ + + + Helpers Icon + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc index bf110c1899..74610dca90 100644 --- a/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc +++ b/Code/Framework/AzQtComponents/AzQtComponents/Images/resources.qrc @@ -29,5 +29,6 @@ Menu/trackview_editor.svg Menu/ui_editor.svg Menu/menu.svg + Menu/helpers.svg diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.cpp b/Code/Sandbox/Editor/ViewportTitleDlg.cpp index 491d31a2ff..5b13b1d308 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.cpp +++ b/Code/Sandbox/Editor/ViewportTitleDlg.cpp @@ -130,6 +130,7 @@ CViewportTitleDlg::CViewportTitleDlg(QWidget* pParent) SetupCameraDropdownMenu(); SetupResolutionDropdownMenu(); SetupViewportInformationMenu(); + SetupHelpersButton(); SetupOverflowMenu(); Audio::AudioSystemRequestBus::Broadcast(&Audio::AudioSystemRequestBus::Events::PushRequest, gSettings.bMuteAudio ? m_oMuteAudioRequest : m_oUnmuteAudioRequest); @@ -211,15 +212,16 @@ void CViewportTitleDlg::SetupViewportInformationMenu() } +void CViewportTitleDlg::SetupHelpersButton() +{ + connect(m_ui->m_helpers, &QToolButton::clicked, this, &CViewportTitleDlg::OnToggleHelpers); + m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); +} + void CViewportTitleDlg::SetupOverflowMenu() { // Setup the overflow menu QMenu* overFlowMenu = new QMenu(this); - m_debugHelpersAction = new QAction("Debug Helpers", overFlowMenu); - m_debugHelpersAction->setCheckable(true); - m_debugHelpersAction->setChecked(Helpers::IsHelpersShown()); - connect(m_debugHelpersAction, &QAction::triggered, this, &CViewportTitleDlg::OnToggleHelpers); - overFlowMenu->addAction(m_debugHelpersAction); m_audioMuteAction = new QAction("Mute Audio", overFlowMenu); connect(m_audioMuteAction, &QAction::triggered, this, &CViewportTitleDlg::OnBnClickedMuteAudio); @@ -333,7 +335,7 @@ void CViewportTitleDlg::OnMaximize() void CViewportTitleDlg::OnToggleHelpers() { Helpers::ToggleHelpers(); - m_debugHelpersAction->setChecked(Helpers::IsHelpersShown()); + m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); } void CViewportTitleDlg::SetNoViewportInfo() @@ -759,7 +761,7 @@ void CViewportTitleDlg::OnEditorNotifyEvent(EEditorNotifyEvent event) switch (event) { case eNotify_OnDisplayRenderUpdate: - m_debugHelpersAction->setChecked(Helpers::IsHelpersShown()); + m_ui->m_helpers->setChecked(Helpers::IsHelpersShown()); break; case eNotify_OnBeginGameMode: case eNotify_OnEndGameMode: diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.h b/Code/Sandbox/Editor/ViewportTitleDlg.h index 255354dcbb..e4670e7873 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.h +++ b/Code/Sandbox/Editor/ViewportTitleDlg.h @@ -102,6 +102,7 @@ protected: void SetupResolutionDropdownMenu(); void SetupViewportInformationMenu(); void SetupOverflowMenu(); + void SetupHelpersButton(); QString m_title; @@ -172,7 +173,6 @@ protected: QAction* m_normalInformationAction = nullptr; QAction* m_fullInformationAction = nullptr; QAction* m_compactInformationAction = nullptr; - QAction* m_debugHelpersAction = nullptr; QAction* m_audioMuteAction = nullptr; QAction* m_enableVRAction = nullptr; QAction* m_enableGridSnappingAction = nullptr; diff --git a/Code/Sandbox/Editor/ViewportTitleDlg.ui b/Code/Sandbox/Editor/ViewportTitleDlg.ui index 58b4ec70c6..7d8e9d50d4 100644 --- a/Code/Sandbox/Editor/ViewportTitleDlg.ui +++ b/Code/Sandbox/Editor/ViewportTitleDlg.ui @@ -81,6 +81,18 @@ + + + + + :/Menu/helpers.svg:/Menu/helpers.svg + + + + true + + + From b69b6af305ebbdee9cdd2e12749d485be52dfea6 Mon Sep 17 00:00:00 2001 From: greerdv Date: Mon, 21 Jun 2021 22:28:50 +0100 Subject: [PATCH 54/91] add copyright notice --- scripts/migration/non_uniform_scale.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts/migration/non_uniform_scale.py b/scripts/migration/non_uniform_scale.py index a645c6818f..038cb1144b 100644 --- a/scripts/migration/non_uniform_scale.py +++ b/scripts/migration/non_uniform_scale.py @@ -1,3 +1,14 @@ +# +# 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. +# + import sys import azlmbr from pathlib import Path From ac7ec103c8460fb155bcff67b06fda6bacb85d7f Mon Sep 17 00:00:00 2001 From: mnaumov Date: Mon, 21 Jun 2021 15:20:22 -0700 Subject: [PATCH 55/91] Fixing PDO offset tooltip --- .../Common/Assets/Materials/Types/EnhancedPBR.materialtype | 2 +- .../Assets/Materials/Types/StandardMultilayerPBR.materialtype | 2 +- .../Common/Assets/Materials/Types/StandardPBR.materialtype | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype index ff0c4c59da..c635f94d56 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype @@ -1015,7 +1015,7 @@ { "id": "pdo", "displayName": "Pixel Depth Offset", - "description": "Whether to enable the pixel depth offset feature.", + "description": "Enable PDO to offset the original pixel depths. This will affect any shaders using depth, for example, when receiving shadows.", "type": "Bool", "defaultValue": false, "connection": { diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype index c07eac3d47..d9a21e7662 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype @@ -417,7 +417,7 @@ { "id": "pdo", "displayName": "Pixel Depth Offset", - "description": "Whether to enable the pixel depth offset feature.", + "description": "Enable PDO to offset the original pixel depths. This will affect any shaders using depth, for example, when receiving shadows.", "type": "Bool", "defaultValue": false, "connection": { diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype index 2d94f66edf..fd2c74dae0 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype @@ -956,7 +956,7 @@ { "id": "pdo", "displayName": "Pixel Depth Offset", - "description": "Whether to enable the pixel depth offset feature.", + "description": "Enable PDO to offset the original pixel depths. This will affect any shaders using depth, for example, when receiving shadows.", "type": "Bool", "defaultValue": false, "connection": { From a0f4f16b9842ccf4adf58ba586419198351354f2 Mon Sep 17 00:00:00 2001 From: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Date: Mon, 21 Jun 2021 15:47:25 -0700 Subject: [PATCH 56/91] Fix Duplicate function to correctly replace the aliases in patches that get ported over. Also correctly undo/redo link creation. (#1449) --- .../Prefab/PrefabPublicHandler.cpp | 47 +++++++++++++++---- .../Prefab/PrefabPublicHandler.h | 2 +- 2 files changed, 38 insertions(+), 11 deletions(-) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp index 3d02e797cc..a5cd50b36e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.cpp @@ -922,8 +922,8 @@ namespace AzToolsFramework return AZ::Failure(AZStd::string("Failed to duplicate : Couldn't get a valid owning instance for the common root entity of the entities provided.")); } - // If the first entity id is a container entity id, then we need to mark its parent as the common owning instance because you - // cannot duplicate an instance from itself. + // If the first entity id is a container entity id, then we need to mark its parent as the common owning instance + // This is because containers, despite representing the nested instance in the parent, are owned by the child. if (commonOwningInstance->get().GetContainerEntityId() == firstEntityIdToDuplicate) { commonOwningInstance = commonOwningInstance->get().GetParentInstance(); @@ -967,17 +967,18 @@ namespace AzToolsFramework // Duplicate any nested entities and instances as requested AZStd::unordered_map newInstanceAliasToOldInstanceMap; + AZStd::unordered_map duplicateEntityAliasMap; DuplicateNestedEntitiesInInstance(commonOwningInstance->get(), - entities, instanceDomAfter, duplicatedEntityAndInstanceIds); - DuplicateNestedInstancesInInstance(commonOwningInstance->get(), - instances, instanceDomAfter, duplicatedEntityAndInstanceIds, - newInstanceAliasToOldInstanceMap); + entities, instanceDomAfter, duplicatedEntityAndInstanceIds, duplicateEntityAliasMap); PrefabUndoInstance* command = aznew PrefabUndoInstance("Entity/Instance duplication"); command->SetParent(undoBatch.GetUndoBatch()); command->Capture(instanceDomBefore, instanceDomAfter, commonOwningInstance->get().GetTemplateId()); command->Redo(); + DuplicateNestedInstancesInInstance(commonOwningInstance->get(), + instances, instanceDomAfter, duplicatedEntityAndInstanceIds, newInstanceAliasToOldInstanceMap); + // Create links for our duplicated instances (if any were duplicated) for (auto [newInstanceAlias, oldInstance] : newInstanceAliasToOldInstanceMap) { @@ -995,8 +996,35 @@ namespace AzToolsFramework PrefabDom linkPatchesCopy; linkPatchesCopy.CopyFrom(linkPatches->get(), linkPatchesCopy.GetAllocator()); - m_prefabSystemComponentInterface->CreateLink( - commonOwningInstance->get().GetTemplateId(), oldInstance->GetTemplateId(), newInstanceAlias, linkPatchesCopy); + // If the instance was duplicated as part of an ancestor's nested hierarchy, the container's parent patch + // will need to be refreshed to point to the new duplicated parent entity + auto oldInstanceContainerEntityId = oldInstance->GetContainerEntityId(); + AZ_Assert(oldInstanceContainerEntityId.IsValid(), "Instance returned invalid Container Entity Id"); + + AZ::EntityId previousParentEntityId; + AZ::TransformBus::EventResult(previousParentEntityId, oldInstanceContainerEntityId, &AZ::TransformBus::Events::GetParentId); + + if (previousParentEntityId.IsValid() && AZStd::find(duplicatedEntityAndInstanceIds.begin(), duplicatedEntityAndInstanceIds.end(), previousParentEntityId)) + { + auto oldParentAlias = commonOwningInstance->get().GetEntityAlias(previousParentEntityId); + if (oldParentAlias.has_value() && duplicateEntityAliasMap.contains(oldParentAlias->get())) + { + // Get the dom into a QString for search/replace purposes + rapidjson::StringBuffer buffer; + rapidjson::Writer writer(buffer); + linkPatchesCopy.Accept(writer); + + QString linkPatchesString(buffer.GetString()); + + ReplaceOldAliases(linkPatchesString, oldParentAlias->get(), duplicateEntityAliasMap[oldParentAlias->get()]); + + linkPatchesCopy.Parse(linkPatchesString.toUtf8().constData()); + } + } + + PrefabUndoHelpers::CreateLink( + oldInstance->GetTemplateId(), commonOwningInstance->get().GetTemplateId(), + AZStd::move(linkPatchesCopy), newInstanceAlias, undoBatch.GetUndoBatch()); } // Select the duplicated entities/instances @@ -1507,14 +1535,13 @@ namespace AzToolsFramework void PrefabPublicHandler::DuplicateNestedEntitiesInInstance(Instance& commonOwningInstance, const AZStd::vector& entities, PrefabDom& domToAddDuplicatedEntitiesUnder, - EntityIdList& duplicatedEntityIds) + EntityIdList& duplicatedEntityIds, AZStd::unordered_map& oldAliasToNewAliasMap) { if (entities.empty()) { return; } - AZStd::unordered_map oldAliasToNewAliasMap; AZStd::unordered_map aliasToEntityDomMap; for (AZ::Entity* entity : entities) diff --git a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h index 65e1391722..fc5906c80e 100644 --- a/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h +++ b/Code/Framework/AzToolsFramework/AzToolsFramework/Prefab/PrefabPublicHandler.h @@ -87,7 +87,7 @@ namespace AzToolsFramework */ void DuplicateNestedEntitiesInInstance(Instance& commonOwningInstance, const AZStd::vector& entities, PrefabDom& domToAddDuplicatedEntitiesUnder, - EntityIdList& duplicatedEntityIds); + EntityIdList& duplicatedEntityIds, AZStd::unordered_map& oldAliasToNewAliasMap); /** * Duplicate a list of instances owned by a common owning instance by directly * copying/modifying their entries in the instance DOM From d2f247ad4fadd32bf66ac8e276f7df29ac95c122 Mon Sep 17 00:00:00 2001 From: mriegger Date: Mon, 21 Jun 2021 16:28:51 -0700 Subject: [PATCH 57/91] Fix for incomplete arcs being drawn --- .../Code/Source/AtomDebugDisplayViewportInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 620d5d1fb8..0eadb188f0 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -1160,7 +1160,7 @@ namespace AZ::AtomBridge // Draw 3 axis aligned circles const float stepAngle = DegToRad(11.25f); const float startAngle = DegToRad(0.0f); - const float stopAngle = DegToRad(360.0f) + startAngle; + const float stopAngle = DegToRad(360.0f) + stepAngle; SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for azis line + 1 for spare const AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( From 4de1d90994a01886ae6bb9df4a09bf73a8545317 Mon Sep 17 00:00:00 2001 From: mnaumov Date: Mon, 21 Jun 2021 16:52:05 -0700 Subject: [PATCH 58/91] [ATOM-15292] Camera no longer resets when typing something --- .../MaterialEditorViewportInputController.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp index 420e2732d0..9ee8fec83f 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp @@ -10,6 +10,9 @@ * */ +#include "Viewport/MaterialViewportWidget.h" + +#include #include #include #include @@ -223,7 +226,12 @@ namespace MaterialEditor } else if (inputChannelId == InputDeviceKeyboard::Key::AlphanumericZ && (m_keys & Ctrl) == None) { - Reset(); + // only reset camera if no other widget besides viewport is in focus + const auto focus = QApplication::focusWidget(); + if (!focus || focus->objectName() == "Viewport") + { + Reset(); + } } break; case InputChannel::State::Updated: From 5a276b11b0e89df5fce9e667b67776c3a55c4117 Mon Sep 17 00:00:00 2001 From: mnaumov Date: Mon, 21 Jun 2021 16:56:06 -0700 Subject: [PATCH 59/91] Fixing includes --- .../InputController/MaterialEditorViewportInputController.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp index 9ee8fec83f..f2dc1fc3e4 100644 --- a/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp +++ b/Gems/Atom/Tools/MaterialEditor/Code/Source/Viewport/InputController/MaterialEditorViewportInputController.cpp @@ -10,9 +10,9 @@ * */ -#include "Viewport/MaterialViewportWidget.h" - #include +#include + #include #include #include From 8d04154fb9324a23337a4dd52bc1b67ac7b989a1 Mon Sep 17 00:00:00 2001 From: mriegger Date: Mon, 21 Jun 2021 18:05:54 -0700 Subject: [PATCH 60/91] Changing it so that the Draw functions always stop at exactly maxAngle --- .../AtomDebugDisplayViewportInterface.cpp | 12 ++++++------ .../Source/AtomDebugDisplayViewportInterface.h | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 0eadb188f0..4407e02b9f 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -802,7 +802,7 @@ namespace AZ::AtomBridge constexpr float sweepAngleDegrees = 360.0f; const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; + const float stopAngle = DegToRad(sweepAngleDegrees); SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); AZ::Vector3 pos = AZ::Vector3(center.GetX(), center.GetY(), z); @@ -832,7 +832,7 @@ namespace AZ::AtomBridge // Draw axis aligned arc const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; + const float stopAngle = DegToRad(sweepAngleDegrees); SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateAxisAlignedArc( @@ -861,7 +861,7 @@ namespace AZ::AtomBridge // Draw arbitraty axis arc const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; + const float stopAngle = DegToRad(sweepAngleDegrees); SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( @@ -904,7 +904,7 @@ namespace AZ::AtomBridge { // Draw circle with single radius. const float step = DegToRad(10.0f); - const float maxAngle = DegToRad(360.0f) + step; + const float maxAngle = DegToRad(360.0f); SingleColorStaticSizeLineHelper<40> lines; // hard code 40 lines until DegToRad is constexpr. AZ::Vector3 radiusV3 = AZ::Vector3(radius); @@ -1134,7 +1134,7 @@ namespace AZ::AtomBridge // This matches Cry behavior, the DrawWireSphere above may need modifying to use the same approach. // Draw 3 axis aligned circles const float step = DegToRad(10.0f); - const float maxAngle = DegToRad(360.0f) + step; + const float maxAngle = DegToRad(360.0f); SingleColorStaticSizeLineHelper<40*3> lines; // hard code to 40 lines * 3 circles until DegToRad is constexpr. // Z Axis @@ -1160,7 +1160,7 @@ namespace AZ::AtomBridge // Draw 3 axis aligned circles const float stepAngle = DegToRad(11.25f); const float startAngle = DegToRad(0.0f); - const float stopAngle = DegToRad(360.0f) + stepAngle; + const float stopAngle = DegToRad(360.0f); SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for azis line + 1 for spare const AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h index 69d0fc6d96..1f9d514c2f 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.h @@ -332,6 +332,15 @@ namespace AZ::AtomBridge p0 = p1; ++segmentIndex; } + // Complete the arc by drawing the last bit + sinCos.SetElement(circleAxis1, sinf(maxAngle)); + sinCos.SetElement(circleAxis2, cosf(maxAngle)); + p1 = position + radiusV3 * sinCos; + p1 = ToWorldSpacePosition(p1); + if (filterFunc(p0, p1, segmentIndex)) + { + lines.AddLineSegment(p0, p1); + } } template @@ -369,5 +378,13 @@ namespace AZ::AtomBridge p0 = p1; ++segmentIndex; } + // Complete the arc by drawing the last bit + AZ::SinCos(maxAngle, sinVF, cosVF); + p1 = position + radiusV3 * (cosVF * a + sinVF * b); + p1 = ToWorldSpacePosition(p1); + if (filterFunc(p0, p1, segmentIndex)) + { + lines.AddLineSegment(p0, p1); + } } } // namespace AZ::AtomBridge From bfd266db8f4e298a1fddc6525245f63ecc5a8c3b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Mon, 21 Jun 2021 18:24:29 -0700 Subject: [PATCH 61/91] LYN-4659 OSX: Prebuilt Editor and Asset Processor fail to launch (#1446) * LYN-4657 OSX: Building AutomatedTesting project fails * forgot this file * fixing lrelease patching in mac/windows * reverting change and disabling warning, the intention of the test is to compare to unitialized values * Fix for dxc * no need to disable the warning, just remove the const * missing dependency to EditorCommon --- .../Json/JsonSerializerConformityTests.h | 2 +- Code/Sandbox/Editor/CMakeLists.txt | 1 + .../Code/Platform/Mac/lrelease_mac.cmake | 9 --------- .../Platform/Windows/lrelease_windows.cmake | 16 ---------------- .../Mac/runtime_dependencies_mac.cmake.in | 17 ++++++++++++----- 5 files changed, 14 insertions(+), 31 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h index 9d7e58dd36..a46d8ad9d4 100644 --- a/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h +++ b/Code/Framework/AzCore/Tests/Serialization/Json/JsonSerializerConformityTests.h @@ -1206,7 +1206,7 @@ namespace JsonSerializationTests if (this->m_features.m_enableInitializationTest) { auto instance = this->m_description.CreateDefaultInstance(); - typename TypeParam::Type compare = typename TypeParam::Type{}; + AZStd::remove_cvref_t compare; if (!this->m_description.AreEqual(*instance, compare)) { auto serializer = this->m_description.CreateSerializer(); diff --git a/Code/Sandbox/Editor/CMakeLists.txt b/Code/Sandbox/Editor/CMakeLists.txt index 51620c6e37..6a5fb7c6c8 100644 --- a/Code/Sandbox/Editor/CMakeLists.txt +++ b/Code/Sandbox/Editor/CMakeLists.txt @@ -128,6 +128,7 @@ ly_add_target( Legacy::EditorCore RUNTIME_DEPENDENCIES Gem::AtomViewportDisplayInfo + Legacy::EditorCommon ) ly_add_source_properties( SOURCES CryEdit.cpp diff --git a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake index 715762b58c..4d5680a30d 100644 --- a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake +++ b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake @@ -8,12 +8,3 @@ # 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. # - -add_custom_command(TARGET LmbrCentral.Editor POST_BUILD - COMMAND "${CMAKE_COMMAND}" -P "${LY_ROOT_FOLDER}/cmake/Platform/Mac/RPathChange.cmake" - "$/lrelease" - @loader_path/../lib - "${QT_PATH}/lib" - COMMENT "Patching lrelease..." - VERBATIM -) diff --git a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake index 73e1fb82c1..4d5680a30d 100644 --- a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake +++ b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake @@ -8,19 +8,3 @@ # 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. # - -add_custom_command(TARGET LmbrCentral.Editor POST_BUILD - COMMAND "${CMAKE_COMMAND}" - -DLY_TIMESTAMP_REFERENCE=$/lrelease.exe - -DLY_LOCK_FILE=$/qtdeploy.lock - -P ${LY_ROOT_FOLDER}/cmake/CommandExecution.cmake - EXEC_COMMAND "${CMAKE_COMMAND}" -E - env PATH="${QT_PATH}/bin" - ${WINDEPLOYQT_EXECUTABLE} - $<$:--pdb> - --verbose 0 - --no-compiler-runtime - $/lrelease.exe - COMMENT "Patching lrelease..." - VERBATIM -) diff --git a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in index 6ad428c08d..25418bf6cf 100644 --- a/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in +++ b/cmake/Platform/Mac/runtime_dependencies_mac.cmake.in @@ -105,12 +105,10 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") endif() endif() if(anything_new) + unset(fixup_bundle_ignore) # LYN-4505: Patch dxc, is configured in the wrong folder in 3p if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) - # we copy to not invalidate the copy check from above - file(COPY ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/lib/libdxcompiler.3.7.dylib - DESTINATION ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin - ) + list(APPEND fixup_bundle_ignore dxc-3.7) endif() # Python.framework being copied by fixup_bundle #if(EXISTS ${bundle_path}/Contents/Frameworks/Python.framework) @@ -139,8 +137,17 @@ if(@target_file_dir@ MATCHES ".app/Contents/MacOS") #endif() list(REMOVE_DUPLICATES plugin_libs) list(REMOVE_DUPLICATES plugin_dirs) - fixup_bundle("${bundle_path}" "${plugin_libs}" "${plugin_dirs}") + fixup_bundle("${bundle_path}" "${plugin_libs}" "${plugin_dirs}" IGNORE_ITEM ${fixup_bundle_ignore}) file(TOUCH "${bundle_path}") file(TOUCH "${fixup_timestamp_file}") + + # fixup bundle ends up removing the rpath of dxc (despite we exclude it) + if(EXISTS ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) + find_program(LY_INSTALL_NAME_TOOL install_name_tool) + if (NOT LY_INSTALL_NAME_TOOL) + message(FATAL_ERROR "Unable to locate 'install_name_tool'") + endif() + execute_process(COMMAND ${LY_INSTALL_NAME_TOOL} -add_rpath @executable_path/../lib ${bundle_path}/Contents/MacOS/Builders/DirectXShaderCompiler/bin/dxc-3.7) + endif() endif() endif() From 2dce6954a100ca9fbec24b984714f8eeb889f62b Mon Sep 17 00:00:00 2001 From: John Jones-Steele Date: Tue, 22 Jun 2021 09:41:48 +0100 Subject: [PATCH 62/91] Cherry picked from development --- Code/Sandbox/Editor/NewLevelDialog.cpp | 2 +- Code/Sandbox/Editor/NewLevelDialog.ui | 34 +- Code/Sandbox/Editor/Style/Editor.qss | 47 +- .../WelcomeScreen/DefaultActiveProject.png | 3 + .../WelcomeScreen/WelcomeScreenDialog.cpp | 197 ++--- .../WelcomeScreen/WelcomeScreenDialog.h | 16 +- .../WelcomeScreen/WelcomeScreenDialog.qrc | 2 +- .../WelcomeScreen/WelcomeScreenDialog.ui | 719 +++++++++--------- .../WelcomeScreenDialogHeader.png | 3 - 9 files changed, 455 insertions(+), 568 deletions(-) create mode 100644 Code/Sandbox/Editor/WelcomeScreen/DefaultActiveProject.png delete mode 100644 Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialogHeader.png diff --git a/Code/Sandbox/Editor/NewLevelDialog.cpp b/Code/Sandbox/Editor/NewLevelDialog.cpp index 2b727665cd..8a1399e482 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.cpp +++ b/Code/Sandbox/Editor/NewLevelDialog.cpp @@ -43,7 +43,7 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("New Level")); - setMaximumSize(QSize(320, 280)); + setMaximumSize(QSize(430, 280)); adjustSize(); // Default level folder is root (Levels/) diff --git a/Code/Sandbox/Editor/NewLevelDialog.ui b/Code/Sandbox/Editor/NewLevelDialog.ui index 053616c78d..2d04794b27 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.ui +++ b/Code/Sandbox/Editor/NewLevelDialog.ui @@ -6,30 +6,30 @@ 0 0 - 320 + 430 280 - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + - Level + Assign a name and location to the new level. - Name: + Name Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -48,8 +48,14 @@ + + + 100 + 0 + + - Folder: + Location Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop diff --git a/Code/Sandbox/Editor/Style/Editor.qss b/Code/Sandbox/Editor/Style/Editor.qss index 2e96c73f35..726902bbd9 100644 --- a/Code/Sandbox/Editor/Style/Editor.qss +++ b/Code/Sandbox/Editor/Style/Editor.qss @@ -208,22 +208,9 @@ WelcomeScreenDialog QLabel margin: 0; } -WelcomeScreenDialog QLabel#titleLabel +WelcomeScreenDialog QLabel#currentProjectLabel { - font-size: 22px; - line-height: 32px; -} - -WelcomeScreenDialog QLabel#bodyLabel -{ - font-size: 14px; - line-height: 20px; -} - -WelcomeScreenDialog QLabel[fontStyle="sectionTitle"], QLabel#titleLabel[fontStyle="sectionTitle"], QLabel#documentationLink -{ - font-size: 16px; - line-height: 24px; + margin-top: 10px; } WelcomeScreenDialog QPushButton @@ -232,36 +219,20 @@ WelcomeScreenDialog QPushButton line-height: 16px; } -WelcomeScreenDialog QFrame#viewContainer -{ - background-color: transparent; -} - -WelcomeScreenDialog QFrame#viewContainer[articleStyle="pinned"] -{ - background: rgba(180,139,255,5%); - border: 1px solid #B48BFF; - box-shadow: 0 0 4px 0 rgba(0,0,0,50%); -} - WelcomeScreenDialog QWidget#articleViewContainerRoot { - background: #111111; + background: #444444; } -WelcomeScreenDialog QScrollArea#previewArea +WelcomeScreenDialog QWidget#levelViewFTUEContainer { - background-color: transparent; + background: #282828; } -WelcomeScreenDialog QWidget#articleViewContents -{ - background-color: transparent; -} - -WelcomeScreenDialog QFrame#imageFrame -{ - background-color: transparent; +QTableWidget#recentLevelTable::item { + background-color: rgb(64,64,64); + margin-bottom: 4px; + margin-top: 4px; } /* Particle Editor */ diff --git a/Code/Sandbox/Editor/WelcomeScreen/DefaultActiveProject.png b/Code/Sandbox/Editor/WelcomeScreen/DefaultActiveProject.png new file mode 100644 index 0000000000..89c3a7cd47 --- /dev/null +++ b/Code/Sandbox/Editor/WelcomeScreen/DefaultActiveProject.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:263e95489560dac6e5944ef3caba13e598f83ddead324b943ad7735ba015e1a9 +size 70727 diff --git a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.cpp b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.cpp index 6faf29dc8e..fa0b2d8135 100644 --- a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.cpp +++ b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.cpp @@ -15,7 +15,8 @@ #include "WelcomeScreenDialog.h" // Qt -#include +#include +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include #include @@ -74,65 +76,39 @@ static int GetSmallestScreenHeight() WelcomeScreenDialog::WelcomeScreenDialog(QWidget* pParent) : QDialog(new WindowDecorationWrapper(WindowDecorationWrapper::OptionAutoAttach | WindowDecorationWrapper::OptionAutoTitleBarButtons, pParent), Qt::Dialog | Qt::CustomizeWindowHint | Qt::WindowCloseButtonHint | Qt::WindowTitleHint) , ui(new Ui::WelcomeScreenDialog) - , m_pRecentListModel(new QStringListModel(this)) , m_pRecentList(nullptr) { ui->setupUi(this); - // Make our welcome screen checkboxes appear as toggle switches - AzQtComponents::CheckBox::applyToggleSwitchStyle(ui->autoLoadLevel); - AzQtComponents::CheckBox::applyToggleSwitchStyle(ui->showOnStartup); + ui->recentLevelTable->setColumnCount(3); + ui->recentLevelTable->setMouseTracking(true); + ui->recentLevelTable->setContextMenuPolicy(Qt::CustomContextMenu); + ui->recentLevelTable->horizontalHeader()->hide(); + ui->recentLevelTable->verticalHeader()->hide(); + ui->recentLevelTable->setSelectionBehavior(QAbstractItemView::SelectRows); + ui->recentLevelTable->setSelectionMode(QAbstractItemView::SingleSelection); + ui->recentLevelTable->setIconSize(QSize(20, 20)); + installEventFilter(this); - ui->autoLoadLevel->setChecked(gSettings.bAutoloadLastLevelAtStartup); - ui->showOnStartup->setChecked(!gSettings.bShowDashboardAtStartup); - - ui->recentLevelList->setModel(m_pRecentListModel); - ui->recentLevelList->setMouseTracking(true); - ui->recentLevelList->setContextMenuPolicy(Qt::CustomContextMenu); - - auto currentProjectButtonMenu = new QMenu(); - - ui->currentProjectButton->setMenu(currentProjectButtonMenu); auto projectName = AZ::Utils::GetProjectName(); - ui->currentProjectButton->setText(projectName.c_str()); - ui->currentProjectButton->adjustSize(); - ui->currentProjectButton->setMinimumWidth(ui->currentProjectButton->width() + 40); + ui->currentProjectName->setText(projectName.c_str()); - ui->documentationLink->setCursor(Qt::PointingHandCursor); - ui->documentationLink->installEventFilter(this); + ui->newLevelButton->setDefault(true); - connect(ui->recentLevelList, &QWidget::customContextMenuRequested, this, &WelcomeScreenDialog::OnShowContextMenu); + // Hide these buttons until the new functionality is added + ui->gridButton->hide(); + ui->objectListButton->hide(); + ui->switchProjectButton->hide(); - connect(ui->recentLevelList, &QListView::entered, this, &WelcomeScreenDialog::OnShowToolTip); - connect(ui->recentLevelList, &QListView::clicked, this, &WelcomeScreenDialog::OnRecentLevelListItemClicked); + connect(ui->recentLevelTable, &QWidget::customContextMenuRequested, this, &WelcomeScreenDialog::OnShowContextMenu); + + connect(ui->recentLevelTable, &QTableWidget::entered, this, &WelcomeScreenDialog::OnShowToolTip); + connect(ui->recentLevelTable, &QTableWidget::clicked, this, &WelcomeScreenDialog::OnRecentLevelTableItemClicked); connect(ui->newLevelButton, &QPushButton::clicked, this, &WelcomeScreenDialog::OnNewLevelBtnClicked); + connect(ui->levelFileLabel, &QLabel::linkActivated, this, &WelcomeScreenDialog::OnNewLevelLabelClicked); connect(ui->openLevelButton, &QPushButton::clicked, this, &WelcomeScreenDialog::OnOpenLevelBtnClicked); - connect(ui->newSliceButton, &QPushButton::clicked, this, &WelcomeScreenDialog::OnNewSliceBtnClicked); - connect(ui->openSliceButton, &QPushButton::clicked, this, &WelcomeScreenDialog::OnOpenSliceBtnClicked); - - connect(ui->documentationButton, &QPushButton::clicked, this, &WelcomeScreenDialog::OnDocumentationBtnClicked); - connect(ui->showOnStartup, &QCheckBox::clicked, this, &WelcomeScreenDialog::OnShowOnStartupBtnClicked); - connect(ui->autoLoadLevel, &QCheckBox::clicked, this, &WelcomeScreenDialog::OnAutoLoadLevelBtnClicked); - - m_manifest = new News::ResourceManifest( - std::bind(&WelcomeScreenDialog::SyncSuccess, this), - std::bind(&WelcomeScreenDialog::SyncFail, this, std::placeholders::_1), - std::bind(&WelcomeScreenDialog::SyncUpdate, this, std::placeholders::_1, std::placeholders::_2)); - - m_articleViewContainer = new News::ArticleViewContainer(this, *m_manifest); - connect(m_articleViewContainer, &News::ArticleViewContainer::scrolled, - this, &WelcomeScreenDialog::previewAreaScrolled); - ui->articleViewContainerRoot->layout()->addWidget(m_articleViewContainer); - - m_manifest->Sync(); - -#ifndef ENABLE_SLICE_EDITOR - ui->newSliceButton->hide(); - ui->openSliceButton->hide(); -#endif - // Adjust the height, if need be // Do it in the constructor so that the WindowDecoratorWrapper handles it correctly int smallestHeight = GetSmallestScreenHeight(); @@ -153,16 +129,10 @@ WelcomeScreenDialog::WelcomeScreenDialog(QWidget* pParent) WelcomeScreenDialog::~WelcomeScreenDialog() { delete ui; - delete m_manifest; } void WelcomeScreenDialog::done(int result) { - if (m_waitingOnAsync) - { - m_manifest->Abort(); - } - QDialog::done(result); } @@ -173,13 +143,11 @@ const QString& WelcomeScreenDialog::GetLevelPath() bool WelcomeScreenDialog::eventFilter(QObject *watched, QEvent *event) { - if (watched == ui->documentationLink) + if (event->type() == QEvent::Show) { - if (event->type() == QEvent::MouseButtonRelease) - { - OnDocumentationBtnClicked(false); - return true; - } + ui->recentLevelTable->horizontalHeader()->resizeSection(0, ui->nameLabel->width()); + ui->recentLevelTable->horizontalHeader()->resizeSection(1, ui->modifiedLabel->width()); + ui->recentLevelTable->horizontalHeader()->resizeSection(2, ui->typeLabel->width()); } return QDialog::eventFilter(watched, event); @@ -207,7 +175,9 @@ void WelcomeScreenDialog::SetRecentFileList(RecentFileList* pList) int nCurDir = sCurDir.length(); int recentListSize = pList->GetSize(); - for (int i = 0; i < recentListSize; ++i) + int currentRow = 0; + ui->recentLevelTable->setRowCount(recentListSize); + for (int i = 0; i < recentListSize; ++i) { const QString& recentFile = pList->m_arrNames[i]; if (recentFile.endsWith(m_levelExtension)) @@ -218,7 +188,7 @@ void WelcomeScreenDialog::SetRecentFileList(RecentFileList* pList) if (sCurEntryDir.compare(sCurDir, Qt::CaseInsensitive) == 0) { QString fullPath = recentFile; - QString name = Path::GetFileName(fullPath); + const QString name = Path::GetFile(fullPath); Path::ConvertSlashToBackSlash(fullPath); fullPath = Path::ToUnixPath(fullPath.toLower()); @@ -226,18 +196,34 @@ void WelcomeScreenDialog::SetRecentFileList(RecentFileList* pList) if (fullPath.contains(gamePath)) { - m_pRecentListModel->setStringList(m_pRecentListModel->stringList() << QString(name)); + if (gSettings.prefabSystem) + { + QIcon icon; + icon.addFile(QString::fromUtf8(":/Level/level.svg"), QSize(), QIcon::Normal, QIcon::Off); + ui->recentLevelTable->setItem(currentRow, 0, new QTableWidgetItem(icon, name)); + } + else + { + ui->recentLevelTable->setItem(currentRow, 0, new QTableWidgetItem(name)); + } + QFileInfo file(recentFile); + QDateTime dateTime = file.lastModified(); + QString date = QLocale::system().toString(dateTime.date(), QLocale::ShortFormat) + " " + + QLocale::system().toString(dateTime.time(), QLocale::LongFormat); + ui->recentLevelTable->setItem(currentRow, 1, new QTableWidgetItem(date)); + ui->recentLevelTable->setItem(currentRow++, 2, new QTableWidgetItem(tr("Level"))); m_levels.push_back(std::make_pair(name, recentFile)); } } } } } + ui->recentLevelTable->setRowCount(currentRow); + ui->recentLevelTable->setMinimumHeight(currentRow * ui->recentLevelTable->verticalHeader()->defaultSectionSize()); + ui->recentLevelTable->setMaximumHeight(currentRow * ui->recentLevelTable->verticalHeader()->defaultSectionSize()); + ui->levelFileLabel->setVisible(currentRow ? false : true); - ui->recentLevelList->setCurrentIndex(QModelIndex()); - int rowSize = ui->recentLevelList->sizeHintForRow(0) + ui->recentLevelList->spacing() * 2; - ui->recentLevelList->setMinimumHeight(m_pRecentListModel->rowCount() * rowSize); - ui->recentLevelList->setMaximumHeight(m_pRecentListModel->rowCount() * rowSize); + ui->recentLevelTable->setCurrentIndex(QModelIndex()); } @@ -245,7 +231,7 @@ void WelcomeScreenDialog::RemoveLevelEntry(int index) { TNamePathPair levelPath = m_levels[index]; - m_pRecentListModel->removeRow(index); + ui->recentLevelTable->removeRow(index); m_levels.erase(m_levels.begin() + index); @@ -284,21 +270,18 @@ void WelcomeScreenDialog::OnShowToolTip(const QModelIndex& index) { const QString& fullPath = m_levels[index.row()].second; - //TEMPORARY:Begin This can be put back once the main window is in Qt - //QRect itemRect = ui->recentLevelList->visualRect(index); - QToolTip::showText(QCursor::pos(), QString("Open level: %1").arg(fullPath) /*, ui->recentLevelList, itemRect*/); - //TEMPORARY:END + QToolTip::showText(QCursor::pos(), QString("Open level: %1").arg(fullPath)); } void WelcomeScreenDialog::OnShowContextMenu(const QPoint& pos) { - QModelIndex index = ui->recentLevelList->indexAt(pos); + QModelIndex index = ui->recentLevelTable->indexAt(pos); if (index.isValid()) { - QString level = m_pRecentListModel->data(index, 0).toString(); + QString level = ui->recentLevelTable->itemAt(pos)->text(); - QPoint globalPos = ui->recentLevelList->viewport()->mapToGlobal(pos); + QPoint globalPos = ui->recentLevelTable->viewport()->mapToGlobal(pos); QMenu contextMenu; contextMenu.addAction(QString("Remove " + level + " from recent list")); @@ -310,13 +293,16 @@ void WelcomeScreenDialog::OnShowContextMenu(const QPoint& pos) } } - void WelcomeScreenDialog::OnNewLevelBtnClicked([[maybe_unused]] bool checked) { m_levelPath = "new"; accept(); } +void WelcomeScreenDialog::OnNewLevelLabelClicked([[maybe_unused]] const QString& path) +{ + OnNewLevelBtnClicked(true); +} void WelcomeScreenDialog::OnOpenLevelBtnClicked([[maybe_unused]] bool checked) { @@ -329,27 +315,7 @@ void WelcomeScreenDialog::OnOpenLevelBtnClicked([[maybe_unused]] bool checked) } } -void WelcomeScreenDialog::OnNewSliceBtnClicked([[maybe_unused]] bool checked) -{ - m_levelPath = "new slice"; - accept(); -} - -void WelcomeScreenDialog::OnOpenSliceBtnClicked(bool) -{ - QString fileName = QFileDialog::getOpenFileName(MainWindow::instance(), - tr("Open Slice"), - Path::GetEditingGameDataFolder().c_str(), - tr("Slice (*.slice)")); - - if (!fileName.isEmpty()) - { - m_levelPath = fileName; - accept(); - } -} - -void WelcomeScreenDialog::OnRecentLevelListItemClicked(const QModelIndex& modelIndex) +void WelcomeScreenDialog::OnRecentLevelTableItemClicked(const QModelIndex& modelIndex) { int index = modelIndex.row(); @@ -365,45 +331,6 @@ void WelcomeScreenDialog::OnCloseBtnClicked([[maybe_unused]] bool checked) accept(); } -void WelcomeScreenDialog::OnAutoLoadLevelBtnClicked(bool checked) -{ - gSettings.bAutoloadLastLevelAtStartup = checked; - gSettings.Save(); -} - - -void WelcomeScreenDialog::OnShowOnStartupBtnClicked(bool checked) -{ - gSettings.bShowDashboardAtStartup = !checked; - gSettings.Save(); - - if (gSettings.bShowDashboardAtStartup == false) - { - QMessageBox msgBox(AzToolsFramework::GetActiveWindow()); - msgBox.setWindowTitle(QObject::tr("Skip the Welcome dialog on startup")); - msgBox.setText(QObject::tr("You may re-enable the Welcome dialog at any time by going to Edit > Editor Settings > Global Preferences in the menu bar.")); - msgBox.exec(); - } -} - -void WelcomeScreenDialog::OnDocumentationBtnClicked([[maybe_unused]] bool checked) -{ - QString webLink = tr("https://aws.amazon.com/lumberyard/support/"); - QDesktopServices::openUrl(QUrl(webLink)); -} - -void WelcomeScreenDialog::SyncFail([[maybe_unused]] News::ErrorCode error) -{ - m_articleViewContainer->AddErrorMessage(); - m_waitingOnAsync = false; -} - -void WelcomeScreenDialog::SyncSuccess() -{ - m_articleViewContainer->PopulateArticles(); - m_waitingOnAsync = false; -} - void WelcomeScreenDialog::previewAreaScrolled() { //this should only be reported once per session diff --git a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.h b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.h index 73e9d75ea3..a3460630ac 100644 --- a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.h +++ b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.h @@ -52,13 +52,9 @@ private: Ui::WelcomeScreenDialog* ui; QString m_levelPath; - QStringListModel* m_pRecentListModel; TNameFullPathArray m_levels; RecentFileList* m_pRecentList; - News::ResourceManifest* m_manifest = nullptr; - News::ArticleViewContainer* m_articleViewContainer = nullptr; const char* m_levelExtension = nullptr; - bool m_waitingOnAsync = true; bool m_messageScrollReported = false; void RemoveLevelEntry(int index); @@ -66,19 +62,11 @@ private: void OnShowToolTip(const QModelIndex& index); void OnShowContextMenu(const QPoint& point); void OnNewLevelBtnClicked(bool checked); + void OnNewLevelLabelClicked(const QString& checked); void OnOpenLevelBtnClicked(bool checked); - void OnNewSliceBtnClicked(bool checked); - void OnOpenSliceBtnClicked(bool checked); - void OnRecentLevelListItemClicked(const QModelIndex& index); - void OnGettingStartedBtnClicked(bool checked); - void OnTutorialsBtnClicked(bool checked); - void OnDocumentationBtnClicked(bool checked); - void OnForumsBtnClicked(bool checked); - void OnAutoLoadLevelBtnClicked(bool checked); - void OnShowOnStartupBtnClicked(bool checked); + void OnRecentLevelTableItemClicked(const QModelIndex& index); void OnCloseBtnClicked(bool checked); - void SyncUpdate(const QString& /* message */, News::LogType /* logType */) {} void SyncFail(News::ErrorCode error); void SyncSuccess(); diff --git a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.qrc b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.qrc index b6fa8150c5..9e8ff62f48 100644 --- a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.qrc +++ b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.qrc @@ -1,5 +1,5 @@ - WelcomeScreenDialogHeader.png + DefaultActiveProject.png diff --git a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.ui b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.ui index be0d175a09..680b411121 100644 --- a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.ui +++ b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialog.ui @@ -2,12 +2,15 @@ WelcomeScreenDialog + + true + 0 0 - 800 - 600 + 945 + 639 @@ -18,21 +21,21 @@ - 800 - 600 + 945 + 639 - 800 - 16777215 + 945 + 639 Qt::TabFocus - Welcome to Open 3D Engine + Welcome to O3DE @@ -53,100 +56,6 @@ 0 - - - - - 0 - 36 - - - - - 16777215 - 36 - - - - - 10 - - - 16 - - - 0 - - - 12 - - - 0 - - - - - - 0 - 0 - - - - Current project: - - - - - - - Current Project Name - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - - - - - - - - 0 - 0 - - - - - 16777215 - 1 - - - - color: "black" - - - QFrame::Plain - - - 0 - - - Qt::Horizontal - - - @@ -165,20 +74,26 @@ 0 - + + + + 0 + 0 + + - 0 + 183 0 - 320 + 183 16777215 - + 0 @@ -191,6 +106,143 @@ 0 + + 10 + + + + + 15 + + + + + 10 + + + 0 + + + + + + 0 + 0 + + + + Active project + + + + + + + + 0 + 0 + + + + + 126 + 167 + + + + + 126 + 167 + + + + + + + :/WelcomeScreenDialog/DefaultActiveProject.png + + + Qt::AlignCenter + + + + + + + MyGame + + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + 15 + + + 15 + + + + + Switch project... + + + + + + + + + + + + + 0 + 0 + + + + + 762 + 0 + + + + + 762 + 16777215 + + + + + 0 + + + 20 + + + 0 + + + 20 + 0 @@ -227,7 +279,7 @@ - Open or create a level + Recent Files -1 @@ -255,16 +307,6 @@ 0 - - - - Qt::ScrollBarAlwaysOff - - - 4 - - - @@ -310,8 +352,26 @@ + + + 0 + 0 + + + + + 156 + 0 + + + + + 156 + 16777215 + + - New level... + Create new... @@ -333,8 +393,67 @@ + + + 156 + 0 + + + + + 156 + 16777215 + + - Open level... + Open... + + + + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + + + ... + + + + :/stylesheet/img/UI20/toolbar/Object_list.svg:/stylesheet/img/UI20/toolbar/Object_list.svg + + + + 24 + 24 + + + + + + + + ... + + + + :/stylesheet/img/UI20/toolbar/Grid.svg:/stylesheet/img/UI20/toolbar/Grid.svg + + + + 24 + 24 + @@ -358,65 +477,130 @@ - - - - 0 - 0 - + + + 6 - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - New slice... - - - - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 24 - 0 - - - - - - - - Open slice... - - - - - + + + + Name + + + + + + + Last modified + + + + + + + Type + + + + + + + + 16 + + + 16 + + + 16 + + + + + true + + + + 0 + 0 + + + + No level file created yet for this project. <a href="#">Create one</a> now. + + + Qt::RichText + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + + + + + + + true + + + + 0 + 0 + + + + + + + Qt::ScrollBarAlwaysOff + + + 3 + + + false + + + false + + + false + + + 1 + + + 48 + + + false + + + false + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + @@ -439,205 +623,16 @@ - - - - - 0 - 48 - - - - - 16777215 - 48 - - - - - 10 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 24 - 24 - - - - info - - - - :/stylesheet/img/UI20/Info.svg:/stylesheet/img/UI20/Info.svg - - - - - - - Documentation and tutorials - - - link - - - - - - - - - - - - - - 1 - 16777215 - - - - color: "black" - - - QFrame::Plain - - - 0 - - - Qt::Vertical - - - - - - - - 480 - 0 - - - - - 0 - - - 0 - - - 0 - - - 0 - - - 0 - - - - - - 16777215 - 1 - - - - color: "black" - - - QFrame::Plain - - - 0 - - - Qt::Horizontal - - - - - - - - 0 - 36 - - - - - 16777215 - 36 - - - - - 30 - - - 16 - - - 0 - - - 16 - - - 0 - - - - - - 0 - 0 - - - - Auto-load last opened level on startup - - - - - - - - 0 - 0 - - - - Skip this dialog on startup - - - - - - + diff --git a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialogHeader.png b/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialogHeader.png deleted file mode 100644 index e2656e3dfd..0000000000 --- a/Code/Sandbox/Editor/WelcomeScreen/WelcomeScreenDialogHeader.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:53b846352880d940621b14b1ea9514e0a4c95aa6ead4d00234a98684c061c04f -size 29505 From 66c4541e14c7db8b983fca9b322f7a6c47d743cd Mon Sep 17 00:00:00 2001 From: John Jones-Steele Date: Tue, 22 Jun 2021 11:25:53 +0100 Subject: [PATCH 63/91] Fixed merge error in NewLevelDialog --- Code/Sandbox/Editor/NewLevelDialog.cpp | 151 ++++++------------------- Code/Sandbox/Editor/NewLevelDialog.h | 14 +-- Code/Sandbox/Editor/NewLevelDialog.ui | 136 ++++------------------ 3 files changed, 62 insertions(+), 239 deletions(-) diff --git a/Code/Sandbox/Editor/NewLevelDialog.cpp b/Code/Sandbox/Editor/NewLevelDialog.cpp index 7c151d1d67..2b727665cd 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.cpp +++ b/Code/Sandbox/Editor/NewLevelDialog.cpp @@ -17,10 +17,7 @@ // Qt #include -#include -#include #include -#include // Editor #include "NewTerrainDialog.h" @@ -33,33 +30,11 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING // Folder in which levels are stored static const char kNewLevelDialog_LevelsFolder[] = "Levels"; -class LevelFolderValidator : public QValidator -{ -public: - LevelFolderValidator(QObject* parent) - : QValidator(parent) - { - m_parentDialog = qobject_cast(parent); - } - - QValidator::State validate([[maybe_unused]] QString& input, [[maybe_unused]] int& pos) const override - { - if (m_parentDialog->ValidateLevel()) - { - return QValidator::Acceptable; - } - - return QValidator::Intermediate; - } - -private: - CNewLevelDialog* m_parentDialog; -}; - // CNewLevelDialog dialog CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/) : QDialog(pParent) + , m_ilevelFolders(0) , m_bUpdate(false) , ui(new Ui::CNewLevelDialog) , m_initialized(false) @@ -68,70 +43,46 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/) setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint); setWindowTitle(tr("New Level")); - setMaximumSize(QSize(430, 280)); + setMaximumSize(QSize(320, 280)); adjustSize(); - m_bIsResize = false; + // Default level folder is root (Levels/) + m_ilevelFolders = 0; - - ui->TITLE->setText(tr("Assign a name and location to the new level.")); - ui->STATIC1->setText(tr("Location:")); - ui->STATIC2->setText(tr("Name:")); + m_bIsResize = false; // Level name only supports ASCII characters QRegExp rx("[_a-zA-Z0-9-]+"); QValidator* validator = new QRegExpValidator(rx, this); ui->LEVEL->setValidator(validator); - validator = new LevelFolderValidator(this); - ui->LEVEL_FOLDERS->lineEdit()->setValidator(validator); - ui->LEVEL_FOLDERS->setErrorToolTip( - QString("The location must be a folder underneath the current project's %1 folder. (%2)") - .arg(kNewLevelDialog_LevelsFolder) - .arg(GetLevelsFolder())); - - ui->LEVEL_FOLDERS->setClearButtonEnabled(true); - QToolButton* clearButton = AzQtComponents::LineEdit::getClearButton(ui->LEVEL_FOLDERS->lineEdit()); - assert(clearButton); - connect(clearButton, &QToolButton::clicked, this, &CNewLevelDialog::OnClearButtonClicked); - - connect(ui->LEVEL_FOLDERS->lineEdit(), &QLineEdit::textEdited, this, &CNewLevelDialog::OnLevelNameChange); - connect(ui->LEVEL_FOLDERS, &AzQtComponents::BrowseEdit::attachedButtonTriggered, this, &CNewLevelDialog::PopupAssetPicker); - + connect(ui->LEVEL_FOLDERS, SIGNAL(activated(int)), this, SLOT(OnCbnSelendokLevelFolders())); connect(ui->LEVEL, &QLineEdit::textChanged, this, &CNewLevelDialog::OnLevelNameChange); - m_levelFolders = GetLevelsFolder(); - m_level = ""; // First of all, keyboard focus is related to widget tab order, and the default tab order is based on the order in which // widgets are constructed. Therefore, creating more widgets changes the keyboard focus. That is why setFocus() is called last. // Secondly, using singleShot() allows setFocus() slot of the QLineEdit instance to be invoked right after the event system // is ready to do so. Therefore, it is better to use singleShot() than directly call setFocus(). - QTimer::singleShot(0, ui->LEVEL, SLOT(OnStartup())); - - ReloadLevelFolder(); + QTimer::singleShot(0, ui->LEVEL, SLOT(setFocus())); } CNewLevelDialog::~CNewLevelDialog() { } -void CNewLevelDialog::OnStartup() -{ - UpdateData(false); - setFocus(); -} - void CNewLevelDialog::UpdateData(bool fromUi) { if (fromUi) { m_level = ui->LEVEL->text(); - m_levelFolders = ui->LEVEL_FOLDERS->text(); + m_levelFolders = ui->LEVEL_FOLDERS->currentText(); + m_ilevelFolders = ui->LEVEL_FOLDERS->currentIndex(); } else { ui->LEVEL->setText(m_level); - ui->LEVEL_FOLDERS->lineEdit()->setText(m_levelFolders); + ui->LEVEL_FOLDERS->setCurrentText(m_levelFolders); + ui->LEVEL_FOLDERS->setCurrentIndex(m_ilevelFolders); } } @@ -139,7 +90,7 @@ void CNewLevelDialog::UpdateData(bool fromUi) void CNewLevelDialog::OnInitDialog() { - ReloadLevelFolder(); + ReloadLevelFolders(); // Disable OK until some text is entered if (QPushButton* button = ui->buttonBox->button(QDialogButtonBox::Ok)) @@ -153,19 +104,28 @@ void CNewLevelDialog::OnInitDialog() ////////////////////////////////////////////////////////////////////////// -void CNewLevelDialog::ReloadLevelFolder() +void CNewLevelDialog::ReloadLevelFolders() { + QString levelsFolder = QString(Path::GetEditingGameDataFolder().c_str()) + "/" + kNewLevelDialog_LevelsFolder; + m_itemFolders.clear(); - ui->LEVEL_FOLDERS->lineEdit()->clear(); - ui->LEVEL_FOLDERS->setText(QString(kNewLevelDialog_LevelsFolder) + '/'); + ui->LEVEL_FOLDERS->clear(); + ui->LEVEL_FOLDERS->addItem(QString(kNewLevelDialog_LevelsFolder) + '/'); + ReloadLevelFoldersRec(levelsFolder); } -QString CNewLevelDialog::GetLevelsFolder() const +////////////////////////////////////////////////////////////////////////// +void CNewLevelDialog::ReloadLevelFoldersRec(const QString& currentFolder) { - QDir projectDir = QDir(Path::GetEditingGameDataFolder().c_str()); - QDir projectLevelsDir = QDir(QStringLiteral("%1/%2").arg(projectDir.absolutePath()).arg(kNewLevelDialog_LevelsFolder)); + QDir dir(currentFolder); - return projectLevelsDir.absolutePath(); + QFileInfoList infoList = dir.entryInfoList(QDir::Dirs | QDir::NoDotAndDotDot); + + foreach(const QFileInfo &fi, infoList) + { + m_itemFolders.push_back(fi.baseName()); + ui->LEVEL_FOLDERS->addItem(QString(kNewLevelDialog_LevelsFolder) + '/' + fi.baseName()); + } } ////////////////////////////////////////////////////////////////////////// @@ -173,47 +133,26 @@ QString CNewLevelDialog::GetLevel() const { QString output = m_level; - QDir projectLevelsDir = QDir(GetLevelsFolder()); - - if (!m_levelFolders.isEmpty()) + if (m_itemFolders.size() > 0 && m_ilevelFolders > 0) { - output = m_levelFolders + "/" + m_level; + output = m_itemFolders[m_ilevelFolders - 1] + "/" + m_level; } - QString relativePath = projectLevelsDir.relativeFilePath(output); - - return relativePath; + return output; } -bool CNewLevelDialog::ValidateLevel() +////////////////////////////////////////////////////////////////////////// +void CNewLevelDialog::OnCbnSelendokLevelFolders() { - // Check that the selected folder is in or below the project/LEVELS folder. - QDir projectLevelsDir = QDir(GetLevelsFolder()); - - QString selectedFolder = ui->LEVEL_FOLDERS->text(); - QString absolutePath = QDir::cleanPath(projectLevelsDir.absoluteFilePath(selectedFolder)); - QString relativePath = projectLevelsDir.relativeFilePath(absolutePath); - - // Prevent saving to a different drive. - if (projectLevelsDir.absolutePath()[0] != absolutePath[0]) - { - return false; - } - - if (relativePath.startsWith("..")) - { - return false; - } - - return true; + UpdateData(); } void CNewLevelDialog::OnLevelNameChange() { - UpdateData(true); + m_level = ui->LEVEL->text(); // QRegExpValidator means the string will always be valid as long as it's not empty: - const bool valid = !m_level.isEmpty() && ValidateLevel(); + const bool valid = !m_level.isEmpty(); // Use the validity to dynamically change the Ok button's enabled state if (QPushButton* button = ui->buttonBox->button(QDialogButtonBox::Ok)) @@ -222,24 +161,6 @@ void CNewLevelDialog::OnLevelNameChange() } } -void CNewLevelDialog::OnClearButtonClicked() -{ - ui->LEVEL_FOLDERS->lineEdit()->setText(GetLevelsFolder()); - UpdateData(true); - -} - -void CNewLevelDialog::PopupAssetPicker() -{ - QString newPath = QFileDialog::getExistingDirectory(nullptr, QObject::tr("Choose Destination Folder"), GetLevelsFolder()); - - if (!newPath.isEmpty()) - { - ui->LEVEL_FOLDERS->setText(newPath); - OnLevelNameChange(); - } -} - ////////////////////////////////////////////////////////////////////////// void CNewLevelDialog::IsResize(bool bIsResize) { diff --git a/Code/Sandbox/Editor/NewLevelDialog.h b/Code/Sandbox/Editor/NewLevelDialog.h index f995ebd69c..fd32c03700 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.h +++ b/Code/Sandbox/Editor/NewLevelDialog.h @@ -34,7 +34,6 @@ #include -#include #include #endif @@ -51,29 +50,28 @@ public: CNewLevelDialog(QWidget* pParent = nullptr); // standard constructor ~CNewLevelDialog(); + QString GetLevel() const; void IsResize(bool bIsResize); - bool ValidateLevel(); + protected: void UpdateData(bool fromUi = true); void OnInitDialog(); - void ReloadLevelFolder(); + void ReloadLevelFolders(); + void ReloadLevelFoldersRec(const QString& currentFolder); void showEvent(QShowEvent* event); - QString GetLevelsFolder() const; - protected slots: + void OnCbnSelendokLevelFolders(); void OnLevelNameChange(); - void OnClearButtonClicked(); - void PopupAssetPicker(); - void OnStartup(); public: QString m_level; QString m_levelFolders; + int m_ilevelFolders; bool m_bIsResize; bool m_bUpdate; diff --git a/Code/Sandbox/Editor/NewLevelDialog.ui b/Code/Sandbox/Editor/NewLevelDialog.ui index d000e8d77f..053616c78d 100644 --- a/Code/Sandbox/Editor/NewLevelDialog.ui +++ b/Code/Sandbox/Editor/NewLevelDialog.ui @@ -6,30 +6,30 @@ 0 0 - 430 + 320 280 - - - - - QFormLayout::AllNonFixedFieldsGrow - - - - - + + + + + QFormLayout::AllNonFixedFieldsGrow + + + + + - Assign a name and location to the new level. + Level - Name + Name: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -38,106 +38,18 @@ LEVEL - - - - - Qt::Vertical - - - - 20 - 20 - - - - - - - - - - border: 0px; - - - - - - Name - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - LEVEL - - - - - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter - - - - - - - - 100 - 0 - - - - Location - - - Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop - - - LEVEL_FOLDERS - - - - - - - - 0 - 0 - - - - - - - - - - - - - Qt::Vertical - - - - - - - QDialogButtonBox::Cancel|QDialogButtonBox::Ok - + + + + + Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter + - - - 100 - 0 - - - Location + Folder: Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop @@ -162,14 +74,6 @@ - - - AzQtComponents::BrowseEdit - QWidget -
AzQtComponents/Components/Widgets/BrowseEdit.h
- 1 -
-
From 858dee22103fb454af27e7c8366112e151572c3b Mon Sep 17 00:00:00 2001 From: Terry Michaels Date: Tue, 22 Jun 2021 07:05:42 -0500 Subject: [PATCH 64/91] Need to keep full asset paths around in LuaIDE (#1470) --- .../Standalone/Source/LUA/LUAEditorMainWindow.cpp | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp index a08e6f4d7f..aa668921d7 100644 --- a/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp +++ b/Code/Tools/Standalone/Source/LUA/LUAEditorMainWindow.cpp @@ -1765,16 +1765,8 @@ namespace LUAEditor return false; } - //name has the full path in it, we need to convert it to an asset name - AZStd::string projectRoot, databaseRoot, databasePath, databaseFile, fileExtension; - if (!AzFramework::StringFunc::AssetDatabasePath::Split(name.toUtf8().data(), &projectRoot, &databaseRoot, &databasePath, &databaseFile, &fileExtension)) - { - AZ_Warning("LUAEditorMainWindow", false, AZStd::string::format("Path is invalid: '%s'", name.toUtf8().data()).c_str()); - return false; - } - AzFramework::StringFunc::Path::Split(name.toUtf8().data(), nullptr, &m_lastOpenFilePath); - AzFramework::StringFunc::AssetDatabasePath::Join(databasePath.c_str(), databaseFile.c_str(), newAssetName); + newAssetName = name.toUtf8().data(); return true; } From 7d5a7b47acc0d8b6d2c4553626207b666f8c4b80 Mon Sep 17 00:00:00 2001 From: Benjamin Jillich <43751992+amzn-jillich@users.noreply.github.com> Date: Tue, 22 Jun 2021 05:12:42 -0700 Subject: [PATCH 65/91] [LYN-3717] When pulling in an actor FBX, two entities are spawned & [ATOM-15258] Clicking and Dragging fbx file into viewport produces 2 entities (#1392) * [LYN-3717] When pulling in an actor FBX, two entities are spawned & [ATOM-15258] Clicking and Dragging fbx file into viewport produces 2 entities * Added another operation to the CanSpawnEntityForProduct that checks the other products and can veto the creation process. * The model product will not create an entity in case there is already an actor exported, which prevents the issue reported by two different teams/users. --- .../AzCore/AzCore/Asset/AssetTypeInfoBus.h | 8 ++++- .../AzAssetBrowserRequestHandler.cpp | 30 ++++++++++++++----- .../Atom/RPI.Reflect/Model/ModelAsset.h | 6 +++- .../Source/RPI.Reflect/Model/ModelAsset.cpp | 23 +++++++++++++- 4 files changed, 57 insertions(+), 10 deletions(-) diff --git a/Code/Framework/AzCore/AzCore/Asset/AssetTypeInfoBus.h b/Code/Framework/AzCore/AzCore/Asset/AssetTypeInfoBus.h index 48115b53af..f49b3ff6e5 100644 --- a/Code/Framework/AzCore/AzCore/Asset/AssetTypeInfoBus.h +++ b/Code/Framework/AzCore/AzCore/Asset/AssetTypeInfoBus.h @@ -57,7 +57,13 @@ namespace AZ //! Determines if a component can be created from the asset type //! This will be called before attempting to create a component from an asset (drag&drop, etc) //! You can use this to filter by subIds or do your own validation here if needed - virtual bool CanCreateComponent(const AZ::Data::AssetId& /*assetId*/) const { return true; } + virtual bool CanCreateComponent([[maybe_unused]] const AZ::Data::AssetId& assetId) const { return true; } + + //! Determines if other products conflict with the given one when multiple are generated from a source asset. + //! This will be called before attempting to create a component from an asset (drag&drop, etc) + //! You can use this to filter by conflicting product types or in case you want to skip for UX reasons. + //! @param[in] productAssetTypes Asset types of all generated products, including the one for our given type in this bus. + virtual bool HasConflictingProducts([[maybe_unused]] const AZStd::vector& productAssetTypes) const { return false; } }; using AssetTypeInfoBus = AZ::EBus; diff --git a/Code/Sandbox/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp b/Code/Sandbox/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp index e0ba106875..ce29b81a5c 100644 --- a/Code/Sandbox/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp +++ b/Code/Sandbox/Editor/AzAssetBrowser/AzAssetBrowserRequestHandler.cpp @@ -56,7 +56,8 @@ namespace AzAssetBrowserRequestHandlerPrivate using namespace AzToolsFramework; using namespace AzToolsFramework::AssetBrowser; // return true ONLY if we can handle the drop request in the viewport. - bool CanSpawnEntityForProduct(const ProductAssetBrowserEntry* product) + bool CanSpawnEntityForProduct(const ProductAssetBrowserEntry* product, + AZStd::optional> optionalProductAssetTypes = AZStd::nullopt) { if (!product) { @@ -70,7 +71,6 @@ namespace AzAssetBrowserRequestHandlerPrivate bool canCreateComponent = false; AZ::AssetTypeInfoBus::EventResult(canCreateComponent, product->GetAssetType(), &AZ::AssetTypeInfo::CanCreateComponent, product->GetAssetId()); - if (!canCreateComponent) { return false; @@ -78,16 +78,25 @@ namespace AzAssetBrowserRequestHandlerPrivate AZ::Uuid componentTypeId = AZ::Uuid::CreateNull(); AZ::AssetTypeInfoBus::EventResult(componentTypeId, product->GetAssetType(), &AZ::AssetTypeInfo::GetComponentTypeId); - - if (!componentTypeId.IsNull()) + if (componentTypeId.IsNull()) { // we have a component type that handles this asset. - return true; + return false; + } + + if (optionalProductAssetTypes.has_value()) + { + bool hasConflictingProducts = false; + AZ::AssetTypeInfoBus::EventResult(hasConflictingProducts, product->GetAssetType(), &AZ::AssetTypeInfo::HasConflictingProducts, optionalProductAssetTypes.value()); + if (hasConflictingProducts) + { + return false; + } } // additional operations can be added here. - return false; + return true; } void SpawnEntityAtPoint(const ProductAssetBrowserEntry* product, AzQtComponents::ViewportDragContext* viewportDragContext, EntityIdList& spawnList, AzFramework::SliceInstantiationTicket& spawnTicket) @@ -511,9 +520,16 @@ void AzAssetBrowserRequestHandler::Drop(QDropEvent* event, AzQtComponents::DragA } // Handle products + AZStd::vector productAssetTypes; + productAssetTypes.reserve(products.size()); + for (const AzToolsFramework::AssetBrowser::ProductAssetBrowserEntry* entry : products) + { + productAssetTypes.emplace_back(entry->GetAssetType()); + } + for (const ProductAssetBrowserEntry* product : products) { - if (CanSpawnEntityForProduct(product)) + if (CanSpawnEntityForProduct(product, productAssetTypes)) { SpawnEntityAtPoint(product, viewportDragContext, spawnedEntities, spawnTicket); } diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h index f3da349195..31aa28412f 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Reflect/Model/ModelAsset.h @@ -103,10 +103,14 @@ namespace AZ AZStd::size_t CalculateTriangleCount() const; }; - class ModelAssetHandler : public AssetHandler + class ModelAssetHandler + : public AssetHandler { public: AZ_RTTI(ModelAssetHandler, "{993B8CE3-1BBF-4712-84A0-285DB9AE808F}", AssetHandler); + + // AZ::AssetTypeInfoBus::Handler overrides + bool HasConflictingProducts(const AZStd::vector& productAssetTypes) const override; }; } //namespace RPI } // namespace AZ diff --git a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp index 52fda0f56b..9e194078c1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Reflect/Model/ModelAsset.cpp @@ -315,5 +315,26 @@ namespace AZ return modelTriangleCount; } - } //namespace RPI + + bool ModelAssetHandler::HasConflictingProducts(const AZStd::vector& productAssetTypes) const + { + size_t modelAssetCount = 0; + size_t actorAssetCount = 0; + for (const AZ::Data::AssetType& assetType : productAssetTypes) + { + if (assetType == azrtti_typeid()) + { + modelAssetCount++; + } + else if (assetType == AZ::Data::AssetType("{F67CC648-EA51-464C-9F5D-4A9CE41A7F86}")) // ActorAsset + { + actorAssetCount++; + } + } + + // When dropping a well-defined character, consisting of a mesh and a skeleton/actor, + // do not create an entity with a mesh component. + return modelAssetCount == 1 && actorAssetCount == 1; + } + } // namespace RPI } // namespace AZ From 4f84ec90d3815e87b6dfc3bb7ed4056a9dfbf2f1 Mon Sep 17 00:00:00 2001 From: moudgils <47460854+moudgils@users.noreply.github.com> Date: Tue, 22 Jun 2021 08:58:15 -0700 Subject: [PATCH 66/91] Various new metal fixes (#1465) * - Fix the second window related tabbing issue - Merge calls to UseResoources acrooaa all the SRGs - Move SamplerCache to the device to ensure only one cache to reduce duplication - Fixes to compute threading numbers getting reset to 0,0,0 - Cleanup withing BufferPoolResolver - Argument buffers are now queued to be cleaned up upon shutdown --- .../AzFramework/Windowing/NativeWindow_Mac.mm | 2 + .../Passes/ReflectionCopyFrameBuffer.pass | 2 +- .../Metal/Code/Source/RHI/ArgumentBuffer.cpp | 57 +++++++------------ .../Metal/Code/Source/RHI/ArgumentBuffer.h | 19 ++++--- .../Code/Source/RHI/BufferPoolResolver.cpp | 13 +++-- .../RHI/Metal/Code/Source/RHI/CommandList.cpp | 39 ++++++++++++- .../Metal/Code/Source/RHI/CommandListBase.cpp | 2 +- .../Atom/RHI/Metal/Code/Source/RHI/Device.cpp | 7 +++ Gems/Atom/RHI/Metal/Code/Source/RHI/Device.h | 6 ++ .../Code/Source/RHI/ShaderResourceGroup.cpp | 9 ++- .../Code/Source/RHI/ShaderResourceGroup.h | 5 +- .../Pass/Specific/DownsampleMipChainPass.h | 7 +++ .../Pass/Specific/DownsampleMipChainPass.cpp | 20 +++++++ 13 files changed, 127 insertions(+), 61 deletions(-) diff --git a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Windowing/NativeWindow_Mac.mm b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Windowing/NativeWindow_Mac.mm index 3eba9831b4..8b911c90e9 100644 --- a/Code/Framework/AzFramework/Platform/Mac/AzFramework/Windowing/NativeWindow_Mac.mm +++ b/Code/Framework/AzFramework/Platform/Mac/AzFramework/Windowing/NativeWindow_Mac.mm @@ -75,6 +75,8 @@ namespace AzFramework // Add a fullscreen button in the upper right of the title bar. [m_nativeWindow setCollectionBehavior:NSWindowCollectionBehaviorFullScreenPrimary]; + m_nativeWindow.tabbingMode = NSWindowTabbingModeDisallowed; + // Make the window active [m_nativeWindow makeKeyAndOrderFront:nil]; m_nativeWindow.title = m_windowTitle; diff --git a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionCopyFrameBuffer.pass b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionCopyFrameBuffer.pass index ac7ea3754c..ee83e60621 100644 --- a/Gems/Atom/Feature/Common/Assets/Passes/ReflectionCopyFrameBuffer.pass +++ b/Gems/Atom/Feature/Common/Assets/Passes/ReflectionCopyFrameBuffer.pass @@ -21,7 +21,7 @@ "SlotType": "Output", "ScopeAttachmentUsage": "RenderTarget", "LoadStoreAction": { - "LoadAction": "Load" + "LoadAction": "DontCare" } } ], diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp index c433a6f9cf..29dc91e2fa 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.cpp @@ -35,7 +35,6 @@ namespace AZ { m_device = device; m_srgLayout = srgLayout; - m_srgPool = srgPool; m_constantBufferSize = srgLayout->GetConstantDataSize(); if (m_constantBufferSize) @@ -93,9 +92,6 @@ namespace AZ //Attach the constant buffer AttachConstantBuffer(); - - m_samplerCache = [[NSCache alloc]init]; - [m_samplerCache setName:@"SamplerCache"]; } } } @@ -211,8 +207,8 @@ namespace AZ } else { - RHI::Ptr nullMtlBufferMemPtr = m_device->GetNullDescriptorManager().GetNullImage(shaderInputImage.m_type).GetMemory(); - mtlTextures[imageArrayLen] = nullMtlBufferMemPtr->GetGpuAddress>(); + RHI::Ptr nullMtlImagePtr = m_device->GetNullDescriptorManager().GetNullImage(shaderInputImage.m_type).GetMemory(); + mtlTextures[imageArrayLen] = nullMtlImagePtr->GetGpuAddress>(); } imageArrayLen++; } @@ -345,15 +341,20 @@ namespace AZ m_device->GetArgumentBufferAllocator().DeAllocate(m_argumentBuffer); } #endif - m_argumentBuffer = {}; - m_constantBuffer = {}; - [m_samplerCache removeAllObjects]; - [m_samplerCache release]; - m_samplerCache = nil; + if(m_argumentBuffer.IsValid()) + { + m_device->QueueForRelease(m_argumentBuffer); + } + if(m_constantBuffer.IsValid()) + { + m_device->QueueForRelease(m_constantBuffer); + } + [m_argumentEncoder release]; m_argumentEncoder = nil; + Base::Shutdown(); } @@ -374,23 +375,22 @@ namespace AZ id ArgumentBuffer::GetMtlSampler(MTLSamplerDescriptor* samplerDesc) { - id mtlSamplerState = [m_samplerCache objectForKey:samplerDesc]; + const NSCache* samplerCache = m_device->GetSamplerCache(); + id mtlSamplerState = [samplerCache objectForKey:samplerDesc]; if(mtlSamplerState == nil) { mtlSamplerState = [m_device->GetMtlDevice() newSamplerStateWithDescriptor:samplerDesc]; - [m_samplerCache setObject:mtlSamplerState forKey:samplerDesc]; + [samplerCache setObject:mtlSamplerState forKey:samplerDesc]; } return mtlSamplerState; } - void ArgumentBuffer::AddUntrackedResourcesToEncoder(id commandEncoder, const ShaderResourceGroupVisibility& srgResourcesVisInfo) const + void ArgumentBuffer::CollectUntrackedResources(id commandEncoder, + const ShaderResourceGroupVisibility& srgResourcesVisInfo, + ComputeResourcesToMakeResidentMap& resourcesToMakeResidentCompute, + GraphicsResourcesToMakeResidentMap& resourcesToMakeResidentGraphics) const { - //Map to cache all the resources based on the usage as we can batch all the resources for a given usage - ComputeResourcesToMakeResidentMap resourcesToMakeResidentCompute; - //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage - GraphicsResourcesToMakeResidentMap resourcesToMakeResidentGraphics; - //Cache the constant buffer associated with a srg if (m_constantBufferSize) { @@ -434,25 +434,6 @@ namespace AZ } } } - - //Call UseResource on all resources for Compute stage - for (const auto& key : resourcesToMakeResidentCompute) - { - AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); - [static_cast>(commandEncoder) useResources: &resourcesToProcessVec[0] - count: resourcesToProcessVec.size() - usage: key.first]; - } - - //Call UseResource on all resources for Vertex and Fragment stages - for (const auto& key : resourcesToMakeResidentGraphics) - { - AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); - [static_cast>(commandEncoder) useResources: &resourcesToProcessVec[0] - count: resourcesToProcessVec.size() - usage: key.first.first - stages: key.first.second]; - } } void ArgumentBuffer::CollectResourcesForCompute(id encoder, diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h index 29d7d5e239..d4d9222249 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ArgumentBuffer.h @@ -97,7 +97,15 @@ namespace AZ id GetArgEncoderBuffer() const; size_t GetOffset() const; - void AddUntrackedResourcesToEncoder(id commandEncoder, const ShaderResourceGroupVisibility& srgResourcesVisInfo) const; + //Map to cache all the resources based on the usage as we can batch all the resources for a given usage. + using ComputeResourcesToMakeResidentMap = AZStd::unordered_map>>; + //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage. + using GraphicsResourcesToMakeResidentMap = AZStd::unordered_map, AZStd::unordered_set>>; + + void CollectUntrackedResources(id commandEncoder, + const ShaderResourceGroupVisibility& srgResourcesVisInfo, + ComputeResourcesToMakeResidentMap& resourcesToMakeResidentCompute, + GraphicsResourcesToMakeResidentMap& resourcesToMakeResidentGraphics) const; void ClearResourceTracking(); @@ -120,11 +128,7 @@ namespace AZ ResourceBindingsMap m_resourceBindings; static const int MaxEntriesInArgTable = 31; - //Map to cache all the resources based on the usage as we can batch all the resources for a given usage. - using ComputeResourcesToMakeResidentMap = AZStd::unordered_map>>; - //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage. - using GraphicsResourcesToMakeResidentMap = AZStd::unordered_map, AZStd::unordered_set>>; - + void CollectResourcesForCompute(id encoder, const ResourceBindingsSet& resourceBindingData, ComputeResourcesToMakeResidentMap& resourcesToMakeResidentMap) const; @@ -153,9 +157,6 @@ namespace AZ MemoryView m_argumentBuffer; MemoryView m_constantBuffer; #endif - - ShaderResourceGroupPool* m_srgPool = nullptr; - NSCache* m_samplerCache; }; } } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp index b986b8ea75..da6665d9c3 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/BufferPoolResolver.cpp @@ -40,7 +40,7 @@ namespace AZ buffer->m_pendingResolves++; uploadRequest.m_attachmentBuffer = buffer; - uploadRequest.m_byteOffset = buffer->GetMemoryView().GetOffset() + request.m_byteOffset; + uploadRequest.m_byteOffset = request.m_byteOffset; uploadRequest.m_stagingBuffer = stagingBuffer; return stagingBuffer->GetMemoryView().GetCpuAddress(); @@ -51,6 +51,12 @@ namespace AZ void BufferPoolResolver::Compile() { + for (BufferUploadPacket& packet : m_uploadPackets) + { + Buffer* stagingBuffer = packet.m_stagingBuffer.get(); + //Inform the GPU that the CPU has modified the staging buffer. + Platform::SynchronizeBufferOnCPU(stagingBuffer->GetMemoryView().GetGpuAddress>(), stagingBuffer->GetMemoryView().GetOffset(), stagingBuffer->GetMemoryView().GetSize()); + } } void BufferPoolResolver::Resolve(CommandList& commandList) const @@ -62,15 +68,12 @@ namespace AZ Buffer* destBuffer = packet.m_attachmentBuffer; AZ_Assert(stagingBuffer, "Staging Buffer is null."); AZ_Assert(destBuffer, "Attachment Buffer is null."); - - //Inform the GPU that the CPU has modified the staging buffer. - Platform::SynchronizeBufferOnCPU(stagingBuffer->GetMemoryView().GetGpuAddress>(), stagingBuffer->GetMemoryView().GetOffset(), stagingBuffer->GetMemoryView().GetSize()); RHI::CopyBufferDescriptor copyDescriptor; copyDescriptor.m_sourceBuffer = stagingBuffer; copyDescriptor.m_sourceOffset = stagingBuffer->GetMemoryView().GetOffset(); copyDescriptor.m_destinationBuffer = destBuffer; - copyDescriptor.m_destinationOffset = static_cast(packet.m_byteOffset); + copyDescriptor.m_destinationOffset = destBuffer->GetMemoryView().GetOffset() + static_cast(packet.m_byteOffset); copyDescriptor.m_size = stagingBuffer->GetMemoryView().GetSize(); commandList.Submit(RHI::CopyItem(copyDescriptor)); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp index 7f65c9ea47..3c554c6128 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandList.cpp @@ -85,6 +85,7 @@ namespace AZ destinationOffset:descriptor.m_destinationOffset size:descriptor.m_size]; + Platform::SynchronizeBufferOnGPU(blitEncoder, destinationBuffer->GetMemoryView().GetGpuAddress>()); break; } case RHI::CopyItemType::Image: @@ -114,6 +115,8 @@ namespace AZ destinationSlice: descriptor.m_destinationSubresource.m_arraySlice destinationLevel: descriptor.m_destinationSubresource.m_mipSlice destinationOrigin: destinationOrigin]; + + Platform::SynchronizeTextureOnGPU(blitEncoder, destinationImage->GetMemoryView().GetGpuAddress>()); break; } case RHI::CopyItemType::BufferToImage: @@ -266,6 +269,11 @@ namespace AZ mtlVertexArgBufferOffsets.fill(0); mtlFragmentOrComputeArgBufferOffsets.fill(0); + //Map to cache all the resources based on the usage as we can batch all the resources for a given usage + ArgumentBuffer::ComputeResourcesToMakeResidentMap resourcesToMakeResidentCompute; + //Map to cache all the resources based on the usage and shader stage as we can batch all the resources for a given usage/shader usage + ArgumentBuffer::GraphicsResourcesToMakeResidentMap resourcesToMakeResidentGraphics; + for (uint32_t slot = 0; slot < RHI::Limits::Pipeline::ShaderResourceGroupCountMax; ++slot) { const ShaderResourceGroup* shaderResourceGroup = bindings.m_srgsBySlot[slot]; @@ -291,7 +299,6 @@ namespace AZ //For graphics and compute shader stages, cache all the argument buffers, offsets and track the min/max indices if(m_commandEncoderType == CommandEncoderType::Render) { - id renderEncoder = GetEncoder>(); uint8_t numBitsSet = RHI::CountBitsSet(static_cast(srgVisInfo)); if( numBitsSet > 1 || srgVisInfo == RHI::ShaderStageMask::Vertex) { @@ -334,11 +341,11 @@ namespace AZ //format compatible with the appropriate metal function. if(m_commandEncoderType == CommandEncoderType::Render) { - shaderResourceGroup->AddUntrackedResourcesToEncoder(m_encoder, srgResourcesVisInfo); + shaderResourceGroup->CollectUntrackedResources(m_encoder, srgResourcesVisInfo, resourcesToMakeResidentCompute, resourcesToMakeResidentGraphics); } else if(m_commandEncoderType == CommandEncoderType::Compute) { - shaderResourceGroup->AddUntrackedResourcesToEncoder(m_encoder, srgResourcesVisInfo); + shaderResourceGroup->CollectUntrackedResources(m_encoder, srgResourcesVisInfo, resourcesToMakeResidentCompute, resourcesToMakeResidentGraphics); } } } @@ -368,6 +375,32 @@ namespace AZ mtlFragmentOrComputeArgBufferOffsets); } + id renderEncoder = GetEncoder>(); + id computeEncoder = GetEncoder>(); + + //Call UseResource on all resources for Compute stage + for (const auto& key : resourcesToMakeResidentCompute) + { + AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); + + [computeEncoder useResources: &resourcesToProcessVec[0] + count: resourcesToProcessVec.size() + usage: key.first]; + + } + + //Call UseResource on all resources for Vertex and Fragment stages + for (const auto& key : resourcesToMakeResidentGraphics) + { + + AZStd::vector> resourcesToProcessVec(key.second.begin(), key.second.end()); + + [renderEncoder useResources: &resourcesToProcessVec[0] + count: resourcesToProcessVec.size() + usage: key.first.first + stages: key.first.second]; + } + return true; } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp index c27be3344f..bdf9dcfd27 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/CommandListBase.cpp @@ -83,7 +83,7 @@ namespace AZ for (id residentHeap : *m_residentHeaps) { [renderEncoder useHeap : residentHeap - stages : MTLRenderStageFragment]; + stages : MTLRenderStageVertex | MTLRenderStageFragment]; } break; } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp index 6b40c8acd1..8eb9463afa 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.cpp @@ -80,6 +80,9 @@ namespace AZ m_nullDescriptorManager.Init(*this); + m_samplerCache = [[NSCache alloc]init]; + [m_samplerCache setName:@"SamplerCache"]; + return RHI::ResultCode::Success; } @@ -101,6 +104,10 @@ namespace AZ m_releaseQueue.Shutdown(); m_pipelineLayoutCache.Shutdown(); + [m_samplerCache removeAllObjects]; + [m_samplerCache release]; + m_samplerCache = nil; + for (AZ::u32 i = 0; i < CommandEncoderTypeCount; ++i) { m_commandListPools[i].Shutdown(); diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.h index c7df33b12f..6d108a0c3c 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/Device.h @@ -144,6 +144,11 @@ namespace AZ return m_asyncUploadQueue; } + const NSCache* GetSamplerCache() const + { + return m_samplerCache; + } + BufferMemoryAllocator& GetArgBufferConstantBufferAllocator() { return m_argumentBufferConstantsAllocator;} BufferMemoryAllocator& GetArgumentBufferAllocator() { return m_argumentBufferAllocator;} @@ -194,6 +199,7 @@ namespace AZ RHI::HeapMemoryUsage m_argumentBufferAllocatorMemoryUsage; NullDescriptorManager m_nullDescriptorManager; + NSCache* m_samplerCache; }; } } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.cpp b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.cpp index 68c676d3c2..f36757054e 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.cpp +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.cpp @@ -11,6 +11,7 @@ */ #include "Atom_RHI_Metal_precompiled.h" +#include #include #include @@ -33,10 +34,12 @@ namespace AZ return *m_compiledArgBuffers[m_compiledDataIndex]; } - void ShaderResourceGroup::AddUntrackedResourcesToEncoder(id commandEncoder, - const ShaderResourceGroupVisibility& srgResourcesVisInfo) const + void ShaderResourceGroup::CollectUntrackedResources(id commandEncoder, + const ShaderResourceGroupVisibility& srgResourcesVisInfo, + ArgumentBuffer::ComputeResourcesToMakeResidentMap& resourcesToMakeResidentCompute, + ArgumentBuffer::GraphicsResourcesToMakeResidentMap& resourcesToMakeResidentGraphics) const { - GetCompiledArgumentBuffer().AddUntrackedResourcesToEncoder(commandEncoder, srgResourcesVisInfo); + GetCompiledArgumentBuffer().CollectUntrackedResources(commandEncoder, srgResourcesVisInfo, resourcesToMakeResidentCompute, resourcesToMakeResidentGraphics); } } } diff --git a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.h b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.h index c20dc35a20..bb8f2d58d4 100644 --- a/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.h +++ b/Gems/Atom/RHI/Metal/Code/Source/RHI/ShaderResourceGroup.h @@ -47,7 +47,10 @@ namespace AZ const ImageView* GetImageView(const int index) const; void UpdateCompiledDataIndex(); const ArgumentBuffer& GetCompiledArgumentBuffer() const; - void AddUntrackedResourcesToEncoder(id commandEncoder, const ShaderResourceGroupVisibility& srgResourcesVisInfo) const; + void CollectUntrackedResources(id commandEncoder, + const ShaderResourceGroupVisibility& srgResourcesVisInfo, + ArgumentBuffer::ComputeResourcesToMakeResidentMap& resourcesToMakeResidentCompute, + ArgumentBuffer::GraphicsResourcesToMakeResidentMap& resourcesToMakeResidentGraphics) const; private: ShaderResourceGroup() = default; diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/DownsampleMipChainPass.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/DownsampleMipChainPass.h index eb4c4ed0aa..f22b5cf87f 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/DownsampleMipChainPass.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Pass/Specific/DownsampleMipChainPass.h @@ -30,6 +30,7 @@ namespace AZ //! It does this by recursively creating Compute Passes to write to each mip using the Compute Shader. class DownsampleMipChainPass : public ParentPass + , private ShaderReloadNotificationBus::Handler { AZ_RPI_PASS(DownsampleMipChainPass); @@ -39,6 +40,7 @@ namespace AZ //! Creates a new pass without a PassTemplate static Ptr Create(const PassDescriptor& descriptor); + virtual ~DownsampleMipChainPass(); protected: explicit DownsampleMipChainPass(const PassDescriptor& descriptor); @@ -49,6 +51,11 @@ namespace AZ void BuildInternal() override; void FrameBeginInternal(FramePrepareParams params) override; + // ShaderReloadNotificationBus::Handler overrides... + void OnShaderReinitialized(const Shader& shader) override; + void OnShaderAssetReinitialized(const Data::Asset& shaderAsset) override; + void OnShaderVariantReinitialized(const ShaderVariant& shaderVariant) override; + private: // Gets target height, width and mip levels from the input/output image attachment diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/DownsampleMipChainPass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/DownsampleMipChainPass.cpp index 329247d4eb..d206a0db08 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/DownsampleMipChainPass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/Specific/DownsampleMipChainPass.cpp @@ -54,8 +54,14 @@ namespace AZ } m_passData = *passData; + ShaderReloadNotificationBus::Handler::BusConnect(passData->m_shaderReference.m_assetId); } + DownsampleMipChainPass::~DownsampleMipChainPass() + { + ShaderReloadNotificationBus::Handler::BusDisconnect(); + } + void DownsampleMipChainPass::ResetInternal() { RemoveChildren(); @@ -206,5 +212,19 @@ namespace AZ ParentPass::FrameBeginInternal(params); } + void DownsampleMipChainPass::OnShaderReinitialized([[maybe_unused]] const Shader& shader) + { + m_needToUpdateChildren = true; + } + + void DownsampleMipChainPass::OnShaderAssetReinitialized([[maybe_unused]] const Data::Asset& shaderAsset) + { + m_needToUpdateChildren = true; + } + + void DownsampleMipChainPass::OnShaderVariantReinitialized([[maybe_unused]] const ShaderVariant& shaderVariant) + { + m_needToUpdateChildren = true; + } } // namespace RPI } // namespace AZ From bde60feb0eb2dad31d54502b87735e64901f2bc5 Mon Sep 17 00:00:00 2001 From: AMZN-puvvadar <32854265+AMZN-puvvadar@users.noreply.github.com> Date: Tue, 22 Jun 2021 09:39:48 -0700 Subject: [PATCH 67/91] Cleanup MultiplayerCompression gem.json Removes outdated references in tags/copy of MultiplayerCompression's gem.json --- Gems/MultiplayerCompression/gem.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/MultiplayerCompression/gem.json b/Gems/MultiplayerCompression/gem.json index 2dc0a2d89a..d61c6ecd10 100644 --- a/Gems/MultiplayerCompression/gem.json +++ b/Gems/MultiplayerCompression/gem.json @@ -5,8 +5,8 @@ "Name": "MultiplayerCompression", "DisplayName": "Multiplayer Compression", "Version": "0.1.0", - "Summary": "The Multiplayer Compression gem provides an open source Compressor for use with the Multiplayer Gem.", - "Tags": ["GridMate","Multiplayer","Networking"], + "Summary": "The Multiplayer Compression gem provides an open source Compressor for use with AzNetworking's transport layer.", + "Tags": ["Multiplayer","Networking"], "IconPath": "preview.png", "Modules": [ { From 3fb3836b54f9d4634cd3860587e5f494a38a77ac Mon Sep 17 00:00:00 2001 From: jckand-amzn Date: Tue, 22 Jun 2021 11:44:29 -0500 Subject: [PATCH 68/91] Simplifying test filtering in CMakeLists --- AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt index 00c00f9608..4441b4ac23 100644 --- a/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt +++ b/AutomatedTesting/Gem/PythonTests/editor/CMakeLists.txt @@ -15,7 +15,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SUITE main TEST_SERIAL PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and not REQUIRES_gpu" + PYTEST_MARKS "SUITE_main and not REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor @@ -46,7 +46,7 @@ if(PAL_TRAIT_BUILD_TESTS_SUPPORTED AND PAL_TRAIT_BUILD_HOST_TOOLS AND PAL_TRAIT_ TEST_SERIAL TEST_REQUIRES gpu PATH ${CMAKE_CURRENT_LIST_DIR} - PYTEST_MARKS "not SUITE_sandbox and not SUITE_periodic and not SUITE_benchmark and REQUIRES_gpu" + PYTEST_MARKS "SUITE_main and REQUIRES_gpu" TIMEOUT 1500 RUNTIME_DEPENDENCIES Legacy::Editor From 7a6fa664270072e43d5b5e954bc3d411ca966ac3 Mon Sep 17 00:00:00 2001 From: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Date: Tue, 22 Jun 2021 11:53:12 -0500 Subject: [PATCH 69/91] Updated the MultiplayerCompression gem.json Added the newer fields for describing the gem, which is used by the ProjectManager. --- Gems/MultiplayerCompression/gem.json | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/Gems/MultiplayerCompression/gem.json b/Gems/MultiplayerCompression/gem.json index d61c6ecd10..77a86b04a2 100644 --- a/Gems/MultiplayerCompression/gem.json +++ b/Gems/MultiplayerCompression/gem.json @@ -1,16 +1,10 @@ { "gem_name": "MultiplayerCompression", - "GemFormatVersion": 4, - "Uuid": "1d353c8ca3c74ed193fd6c6783ae41cc", - "Name": "MultiplayerCompression", - "DisplayName": "Multiplayer Compression", - "Version": "0.1.0", - "Summary": "The Multiplayer Compression gem provides an open source Compressor for use with AzNetworking's transport layer.", - "Tags": ["Multiplayer","Networking"], - "IconPath": "preview.png", - "Modules": [ - { - "Type": "GameModule" - } - ] + "display_name": "Multiplayer Compression", + "summary": "The Multiplayer Compression gem provides an open source Compressor for use with AzNetworking's transport layer.", + "canonical_tags": ["Multiplayer", "Networking", "Utility"], + "user_tags": ["MultiplayerCompression"], + "icon_path": "preview.png", + "type": "Code", + "provider": "Open 3D Foundation" } From 6dfa9d269cb102ea6d37c374acedee8886b79d4d Mon Sep 17 00:00:00 2001 From: mriegger Date: Tue, 22 Jun 2021 10:19:21 -0700 Subject: [PATCH 70/91] Fixing mistakes --- .../Code/Source/AtomDebugDisplayViewportInterface.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 4407e02b9f..3610e671f1 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -802,7 +802,7 @@ namespace AZ::AtomBridge constexpr float sweepAngleDegrees = 360.0f; const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees); + const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); AZ::Vector3 pos = AZ::Vector3(center.GetX(), center.GetY(), z); @@ -832,7 +832,7 @@ namespace AZ::AtomBridge // Draw axis aligned arc const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees); + const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateAxisAlignedArc( @@ -861,7 +861,7 @@ namespace AZ::AtomBridge // Draw arbitraty axis arc const float stepAngle = DegToRad(angularStepDegrees); const float startAngle = DegToRad(startAngleDegrees); - const float stopAngle = DegToRad(sweepAngleDegrees); + const float stopAngle = DegToRad(sweepAngleDegrees) + startAngle; SingleColorDynamicSizeLineHelper lines(1+static_cast(sweepAngleDegrees/angularStepDegrees)); AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( From 026b1df29a57c68bca61b5bb1b7a987354b5de52 Mon Sep 17 00:00:00 2001 From: mriegger Date: Tue, 22 Jun 2021 10:34:13 -0700 Subject: [PATCH 71/91] removing small issue --- .../Code/Source/AtomDebugDisplayViewportInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index 3610e671f1..e8c559fc51 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -1160,7 +1160,7 @@ namespace AZ::AtomBridge // Draw 3 axis aligned circles const float stepAngle = DegToRad(11.25f); const float startAngle = DegToRad(0.0f); - const float stopAngle = DegToRad(360.0f); + const float stopAngle = DegToRad(360.0f) + startAngle; SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for azis line + 1 for spare const AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( From 44d8e7b80411cb33a24648ba3c661710c333965b Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 22 Jun 2021 10:35:02 -0700 Subject: [PATCH 72/91] LYN-4666 Make AR builds use the stabilization/2106 snapshot (#1440) * use snapshots out of stabilization * temporal print to figure out why the mount is not used * removing print used for debugging --- scripts/build/bootstrap/incremental_build_util.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/build/bootstrap/incremental_build_util.py b/scripts/build/bootstrap/incremental_build_util.py index a331cf3bb8..a91f1691a2 100755 --- a/scripts/build/bootstrap/incremental_build_util.py +++ b/scripts/build/bootstrap/incremental_build_util.py @@ -178,7 +178,7 @@ def delete_volume(ec2_client, volume_id): print 'Volume {} deleted'.format(volume_id) def find_snapshot_id(ec2_client, repository_name, project, pipeline, platform, build_type, disk_size): - mount_name = get_mount_name(repository_name, project, pipeline, 'main', platform, build_type) # we take snapshots out of main + mount_name = get_mount_name(repository_name, project, pipeline, 'stabilization_2106', platform, build_type) # we take snapshots out of stabilization_2106 response = ec2_client.describe_snapshots(Filters= [{ 'Name': 'tag:Name', 'Values': [mount_name] }]) From 6a19196d33ed76943bb5cba65cbcdbc588a3e5e5 Mon Sep 17 00:00:00 2001 From: mriegger Date: Tue, 22 Jun 2021 12:40:40 -0700 Subject: [PATCH 73/91] fix typo in comment --- .../Code/Source/AtomDebugDisplayViewportInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index e8c559fc51..ccafbf2820 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -1161,7 +1161,7 @@ namespace AZ::AtomBridge const float stepAngle = DegToRad(11.25f); const float startAngle = DegToRad(0.0f); const float stopAngle = DegToRad(360.0f) + startAngle; - SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for azis line + 1 for spare + SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for axis line + 1 for spare const AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( lines, From f6768ea8801e1e246a37080b3684686860c2268c Mon Sep 17 00:00:00 2001 From: hershey5045 <43485729+hershey5045@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:56:38 -0700 Subject: [PATCH 74/91] Fix camera issue causing it to block component property changes in editor (#1466) --- Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp index 24dfcb7097..4f62225f81 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/View.cpp @@ -160,13 +160,19 @@ namespace AZ 0,0,1,0, 0,0,0,1 }; yUpWorld.StoreToRowMajorFloat12(viewToWorldMatrixRaw); + const AZ::Matrix4x4 prevViewToWorldMatrix = m_viewToWorldMatrix; m_viewToWorldMatrix = AZ::Matrix4x4::CreateFromRowMajorFloat16(viewToWorldMatrixRaw); m_worldToViewMatrix = m_viewToWorldMatrix.GetInverseFast(); m_worldToClipMatrix = m_viewToClipMatrix * m_worldToViewMatrix; - m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix); + // Only signal an update when there is a change, otherwise this might block + // user input from changing the value. + if (!prevViewToWorldMatrix.IsClose(m_viewToWorldMatrix)) + { + m_onWorldToViewMatrixChange.Signal(m_worldToViewMatrix); + } m_onWorldToClipMatrixChange.Signal(m_worldToClipMatrix); InvalidateSrg(); From 6fe448d99176ff4aa2ad43861054eaaed010e15c Mon Sep 17 00:00:00 2001 From: Danilo Aimini <82231674+AMZN-daimini@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:59:01 -0700 Subject: [PATCH 75/91] Adding [[maybe_unused]] to variables that would not get hit in release mode in JsonSlotSerializer (#1486) --- Gems/GraphModel/Code/Source/Model/Slot.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Gems/GraphModel/Code/Source/Model/Slot.cpp b/Gems/GraphModel/Code/Source/Model/Slot.cpp index 6433129af8..dca2175df3 100644 --- a/Gems/GraphModel/Code/Source/Model/Slot.cpp +++ b/Gems/GraphModel/Code/Source/Model/Slot.cpp @@ -300,7 +300,7 @@ namespace GraphModel // Slot AZ::JsonSerializationResult::Result JsonSlotSerializer::Load( - void* outputValue, const AZ::Uuid& outputValueTypeId, const rapidjson::Value& inputValue, + void* outputValue, [[maybe_unused]] const AZ::Uuid& outputValueTypeId, const rapidjson::Value& inputValue, AZ::JsonDeserializerContext& context) { namespace JSR = AZ::JsonSerializationResult; @@ -343,12 +343,12 @@ namespace GraphModel return context.Report( result, - result.GetProcessing() != JSR::Processing::Halted ? "Succesfully loaded Slot information." + result.GetProcessing() != JSR::Processing::Halted ? "Successfully loaded Slot information." : "Failed to load Slot information."); } AZ::JsonSerializationResult::Result JsonSlotSerializer::Store( - rapidjson::Value& outputValue, const void* inputValue, [[maybe_unused]] const void* defaultValue, const AZ::Uuid& valueTypeId, + rapidjson::Value& outputValue, const void* inputValue, [[maybe_unused]] const void* defaultValue, [[maybe_unused]] const AZ::Uuid& valueTypeId, AZ::JsonSerializerContext& context) { namespace JSR = AZ::JsonSerializationResult; From be0fbaaddc1cd5e9bb74c633f0b900ad35370107 Mon Sep 17 00:00:00 2001 From: Tommy Walton <82672795+amzn-tommy@users.noreply.github.com> Date: Tue, 22 Jun 2021 12:59:27 -0700 Subject: [PATCH 76/91] LYN-2227 : Improve mesh initialization performance by not creating draw packet more than once (#1476) * Move SetUseForwardPassIblSpecular to happen when acquiring a mesh, instead of immediately after so that we don't build the drawpacket twice for every mesh * Update the MeshFeatureProcessor to use the booleans from the descriptor directly instead of having loose booleans in the MeshDataInstance * m_excludeFromReflectionCubeMaps is not (and does not need to be) part of the descriptor, since setting is cheap and doesn't duplicate work that is done when acquiring the mesh --- .../Atom/Feature/Mesh/MeshFeatureProcessor.h | 19 ++---- .../Mesh/MeshFeatureProcessorInterface.h | 27 ++++---- .../Code/Mocks/MockMeshFeatureProcessor.h | 4 +- .../Code/Source/Mesh/MeshFeatureProcessor.cpp | 64 +++++++++---------- .../OcclusionCullingPlane.cpp | 2 +- .../ReflectionProbe/ReflectionProbe.cpp | 2 +- .../Source/Mesh/MeshComponentController.cpp | 8 ++- .../Code/Source/AtomActorInstance.cpp | 6 +- .../Editor/EditorBlastMeshDataComponent.cpp | 2 +- .../Code/Source/Family/ActorRenderManager.cpp | 2 +- .../Code/Tests/ActorRenderManagerTest.cpp | 2 +- .../Rendering/Atom/WhiteBoxAtomRenderMesh.cpp | 2 +- 12 files changed, 70 insertions(+), 70 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h index 0d61ef82d1..f1156cfe37 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h @@ -82,11 +82,11 @@ namespace AZ RPI::Cullable m_cullable; MaterialAssignmentMap m_materialAssignments; + MeshHandleDescriptor m_descriptor; Data::Instance m_model; //! A reference to the original model asset in case it got cloned before creating the model instance. Data::Asset m_originalModelAsset; - MeshFeatureProcessorInterface::RequiresCloneCallback m_requiresCloningCallback; Data::Instance m_shaderResourceGroup; AZStd::unique_ptr m_meshLoader; @@ -99,10 +99,7 @@ namespace AZ bool m_cullableNeedsRebuild = false; bool m_objectSrgNeedsUpdate = true; bool m_excludeFromReflectionCubeMaps = false; - bool m_skinnedMeshWithMotion = false; - bool m_rayTracingEnabled = true; bool m_visible = true; - bool m_useForwardPassIblSpecular = false; bool m_hasForwardPassIblSpecularMaterial = false; }; @@ -132,17 +129,11 @@ namespace AZ void OnEndPrepareRender() override; MeshHandle AcquireMesh( - const Data::Asset& modelAsset, - const MaterialAssignmentMap& materials = {}, - bool skinnedMeshWithMotion = false, - bool rayTracingEnabled = true, - RequiresCloneCallback requiresCloneCallback = {}) override; + const MeshHandleDescriptor& descriptor, + const MaterialAssignmentMap& materials = {}) override; MeshHandle AcquireMesh( - const Data::Asset &modelAsset, - const Data::Instance& material, - bool skinnedMeshWithMotion = false, - bool rayTracingEnabled = true, - RequiresCloneCallback requiresCloneCallback = {}) override; + const MeshHandleDescriptor& descriptor, + const Data::Instance& material) override; bool ReleaseMesh(MeshHandle& meshHandle) override; MeshHandle CloneMesh(const MeshHandle& meshHandle) override; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h index fb5bff5584..d5a6ac1c3e 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h @@ -26,6 +26,18 @@ namespace AZ { class MeshDataInstance; + //! Settings to apply to a mesh handle when acquiring it for the first time + struct MeshHandleDescriptor + { + using RequiresCloneCallback = AZStd::function& modelAsset)>; + + Data::Asset m_modelAsset; + bool m_isSkinnedMeshWithMotion = false; + bool m_isRayTracingEnabled = true; + bool m_useForwardPassIblSpecular = false; + RequiresCloneCallback m_requiresCloneCallback = {}; + }; + //! MeshFeatureProcessorInterface provides an interface to acquire and release a MeshHandle from the underlying MeshFeatureProcessor class MeshFeatureProcessorInterface : public RPI::FeatureProcessor @@ -35,23 +47,16 @@ namespace AZ using MeshHandle = StableDynamicArrayHandle; using ModelChangedEvent = Event>; - using RequiresCloneCallback = AZStd::function& modelAsset)>; //! Acquires a model with an optional collection of material assignments. //! @param requiresCloneCallback The callback indicates whether cloning is required for a given model asset. virtual MeshHandle AcquireMesh( - const Data::Asset& modelAsset, - const MaterialAssignmentMap& materials = {}, - bool skinnedMeshWithMotion = false, - bool rayTracingEnabled = true, - RequiresCloneCallback requiresCloneCallback = {}) = 0; + const MeshHandleDescriptor& descriptor, + const MaterialAssignmentMap& materials = {}) = 0; //! Acquires a model with a single material applied to all its meshes. virtual MeshHandle AcquireMesh( - const Data::Asset& modelAsset, - const Data::Instance& material, - bool skinnedMeshWithMotion = false, - bool rayTracingEnabled = true, - RequiresCloneCallback requiresCloneCallback = {}) = 0; + const MeshHandleDescriptor& descriptor, + const Data::Instance& material) = 0; //! Releases the mesh handle virtual bool ReleaseMesh(MeshHandle& meshHandle) = 0; //! Creates a new instance and handle of a mesh using an existing MeshId. Currently, this will reset the new mesh to default materials. diff --git a/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h index 418ee0cfb8..2ffd26a380 100644 --- a/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Mocks/MockMeshFeatureProcessor.h @@ -37,8 +37,8 @@ namespace UnitTest MOCK_METHOD1(GetSortKey, AZ::RHI::DrawItemSortKey(const MeshHandle&)); MOCK_METHOD2(SetLodOverride, void(const MeshHandle&, AZ::RPI::Cullable::LodOverride)); MOCK_METHOD1(GetLodOverride, AZ::RPI::Cullable::LodOverride(const MeshHandle&)); - MOCK_METHOD5(AcquireMesh, MeshHandle (const AZ::Data::Asset&, const AZ::Render::MaterialAssignmentMap&, bool, bool, AZ::Render::MeshFeatureProcessorInterface::RequiresCloneCallback)); - MOCK_METHOD5(AcquireMesh, MeshHandle (const AZ::Data::Asset&, const AZ::Data::Instance&, bool, bool, AZ::Render::MeshFeatureProcessorInterface::RequiresCloneCallback)); + MOCK_METHOD2(AcquireMesh, MeshHandle (const AZ::Render::MeshHandleDescriptor&, const AZ::Render::MaterialAssignmentMap&)); + MOCK_METHOD2(AcquireMesh, MeshHandle (const AZ::Render::MeshHandleDescriptor&, const AZ::Data::Instance&)); MOCK_METHOD2(SetRayTracingEnabled, void (const MeshHandle&, bool)); MOCK_METHOD2(SetVisible, void (const MeshHandle&, bool)); MOCK_METHOD2(SetUseForwardPassIblSpecular, void (const MeshHandle&, bool)); diff --git a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp index 3001831817..f51defc0f3 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp @@ -149,46 +149,38 @@ namespace AZ } MeshFeatureProcessor::MeshHandle MeshFeatureProcessor::AcquireMesh( - const Data::Asset& modelAsset, - const MaterialAssignmentMap& materials, - bool skinnedMeshWithMotion, - bool rayTracingEnabled, - RequiresCloneCallback requiresCloneCallback) + const MeshHandleDescriptor& descriptor, + const MaterialAssignmentMap& materials) { AZ_PROFILE_FUNCTION(Debug::ProfileCategory::AzRender); // don't need to check the concurrency during emplace() because the StableDynamicArray won't move the other elements during insertion MeshHandle meshDataHandle = m_meshData.emplace(); - // Mark skinned meshes to enable special processes to generate motion vector - meshDataHandle->m_skinnedMeshWithMotion = skinnedMeshWithMotion; + meshDataHandle->m_descriptor = descriptor; - // set ray tracing flag, but always disable on skinned meshes + // Always disable ray tracing flag on skinned meshes // [GFX TODO][ATOM-13067] Enable raytracing on skinned meshes - meshDataHandle->m_rayTracingEnabled = rayTracingEnabled && (skinnedMeshWithMotion == false); + meshDataHandle->m_descriptor.m_isRayTracingEnabled &= !descriptor.m_isSkinnedMeshWithMotion; meshDataHandle->m_scene = GetParentScene(); meshDataHandle->m_materialAssignments = materials; meshDataHandle->m_objectId = m_transformService->ReserveObjectId(); - meshDataHandle->m_originalModelAsset = modelAsset; - meshDataHandle->m_requiresCloningCallback = requiresCloneCallback; - meshDataHandle->m_meshLoader = AZStd::make_unique(modelAsset, &*meshDataHandle); + meshDataHandle->m_originalModelAsset = descriptor.m_modelAsset; + meshDataHandle->m_meshLoader = AZStd::make_unique(descriptor.m_modelAsset, &*meshDataHandle); return meshDataHandle; } MeshFeatureProcessor::MeshHandle MeshFeatureProcessor::AcquireMesh( - const Data::Asset& modelAsset, - const Data::Instance& material, - bool skinnedMeshWithMotion, - bool rayTracingEnabled, - RequiresCloneCallback requiresCloneCallback) + const MeshHandleDescriptor& descriptor, + const Data::Instance& material) { Render::MaterialAssignmentMap materials; Render::MaterialAssignment& defaultMaterial = materials[AZ::Render::DefaultMaterialAssignmentId]; defaultMaterial.m_materialInstance = material; - return AcquireMesh(modelAsset, materials, skinnedMeshWithMotion, rayTracingEnabled, requiresCloneCallback); + return AcquireMesh(descriptor, materials); } bool MeshFeatureProcessor::ReleaseMesh(MeshHandle& meshHandle) @@ -210,7 +202,7 @@ namespace AZ { if (meshHandle.IsValid()) { - MeshHandle clone = AcquireMesh(meshHandle->m_originalModelAsset, meshHandle->m_materialAssignments); + MeshHandle clone = AcquireMesh(meshHandle->m_descriptor, meshHandle->m_materialAssignments); return clone; } return MeshFeatureProcessor::MeshHandle(); @@ -377,6 +369,14 @@ namespace AZ if (meshHandle.IsValid()) { meshHandle->m_excludeFromReflectionCubeMaps = excludeFromReflectionCubeMaps; + if (excludeFromReflectionCubeMaps) + { + meshHandle->m_cullable.m_cullData.m_hideFlags |= RPI::View::UsageReflectiveCubeMap; + } + else + { + meshHandle->m_cullable.m_cullData.m_hideFlags &= ~RPI::View::UsageReflectiveCubeMap; + } } } @@ -385,12 +385,12 @@ namespace AZ if (meshHandle.IsValid()) { // update the ray tracing data based on the current state and the new state - if (rayTracingEnabled && !meshHandle->m_rayTracingEnabled) + if (rayTracingEnabled && !meshHandle->m_descriptor.m_isRayTracingEnabled) { // add to ray tracing meshHandle->SetRayTracingData(); } - else if (!rayTracingEnabled && meshHandle->m_rayTracingEnabled) + else if (!rayTracingEnabled && meshHandle->m_descriptor.m_isRayTracingEnabled) { // remove from ray tracing if (m_rayTracingFeatureProcessor) @@ -400,7 +400,7 @@ namespace AZ } // set new state - meshHandle->m_rayTracingEnabled = rayTracingEnabled; + meshHandle->m_descriptor.m_isRayTracingEnabled = rayTracingEnabled; } } @@ -416,7 +416,7 @@ namespace AZ { if (meshHandle.IsValid()) { - meshHandle->m_useForwardPassIblSpecular = useForwardPassIblSpecular; + meshHandle->m_descriptor.m_useForwardPassIblSpecular = useForwardPassIblSpecular; meshHandle->m_objectSrgNeedsUpdate = true; if (meshHandle->m_model) @@ -450,7 +450,7 @@ namespace AZ // we need to rebuild the Srg for any meshes that are using the forward pass IBL specular option for (auto& meshInstance : m_meshData) { - if (meshInstance.m_useForwardPassIblSpecular) + if (meshInstance.m_descriptor.m_useForwardPassIblSpecular) { meshInstance.m_objectSrgNeedsUpdate = true; } @@ -507,8 +507,8 @@ namespace AZ Data::Instance model; // Check if a requires cloning callback got set and if so check if cloning the model asset is requested. - if (m_parent->m_requiresCloningCallback && - m_parent->m_requiresCloningCallback(modelAsset)) + if (m_parent->m_descriptor.m_requiresCloneCallback && + m_parent->m_descriptor.m_requiresCloneCallback(modelAsset)) { // Clone the model asset to force create another model instance. AZ::Data::AssetId newId(AZ::Uuid::CreateRandom(), /*subId=*/0); @@ -598,7 +598,7 @@ namespace AZ objectIdIndex.AssertValid(); } - if (m_rayTracingEnabled) + if (m_descriptor.m_isRayTracingEnabled) { SetRayTracingData(); } @@ -671,7 +671,7 @@ namespace AZ RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, m_shaderResourceGroup, materialAssignment.m_matModUvOverrides); // set the shader option to select forward pass IBL specular if necessary - if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ m_useForwardPassIblSpecular })) + if (!drawPacket.SetShaderOption(AZ::Name("o_meshUseForwardPassIBLSpecular"), AZ::RPI::ShaderOptionValue{ m_descriptor.m_useForwardPassIblSpecular })) { AZ_Warning("MeshDrawPacket", false, "Failed to set o_meshUseForwardPassIBLSpecular on mesh draw packet"); } @@ -682,7 +682,7 @@ namespace AZ m_hasForwardPassIblSpecularMaterial |= materialRequiresForwardPassIblSpecular; // stencil bits - uint8_t stencilRef = m_useForwardPassIblSpecular || materialRequiresForwardPassIblSpecular ? Render::StencilRefs::None : Render::StencilRefs::UseIBLSpecularPass; + uint8_t stencilRef = m_descriptor.m_useForwardPassIblSpecular || materialRequiresForwardPassIblSpecular ? Render::StencilRefs::None : Render::StencilRefs::UseIBLSpecularPass; stencilRef |= Render::StencilRefs::UseDiffuseGIPass; drawPacket.SetStencilRef(stencilRef); @@ -1102,12 +1102,12 @@ namespace AZ //[GFX TODO][ATOM-4726] Replace this with a "isSkinnedMesh" external material property and a functor that enables/disables the appropriate shader for (auto& shaderItem : material->GetShaderCollection()) { - if (shaderItem.GetShaderAsset()->GetName() == Name{ "StaticMeshMotionVector" } && m_skinnedMeshWithMotion) + if (shaderItem.GetShaderAsset()->GetName() == Name{ "StaticMeshMotionVector" } && m_descriptor.m_isSkinnedMeshWithMotion) { shaderItem.SetEnabled(false); } - if (shaderItem.GetShaderAsset()->GetName() == Name{ "SkinnedMeshMotionVector" } && (!m_skinnedMeshWithMotion)) + if (shaderItem.GetShaderAsset()->GetName() == Name{ "SkinnedMeshMotionVector" } && (!m_descriptor.m_isSkinnedMeshWithMotion)) { shaderItem.SetEnabled(false); } @@ -1123,7 +1123,7 @@ namespace AZ ReflectionProbeFeatureProcessor* reflectionProbeFeatureProcessor = m_scene->GetFeatureProcessor(); - if (reflectionProbeFeatureProcessor && (m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial)) + if (reflectionProbeFeatureProcessor && (m_descriptor.m_useForwardPassIblSpecular || m_hasForwardPassIblSpecularMaterial)) { // retrieve probe constant indices AZ::RHI::ShaderInputConstantIndex posConstantIndex = m_shaderResourceGroup->FindShaderInputConstantIndex(Name("m_reflectionProbeData.m_aabbPos")); diff --git a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp index 10004a72e4..159df0d3bc 100644 --- a/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/OcclusionCullingPlane/OcclusionCullingPlane.cpp @@ -39,7 +39,7 @@ namespace AZ "Models/OcclusionCullingPlane.azmodel", AZ::RPI::AssetUtils::TraceLevel::Assert); - m_visualizationMeshHandle = m_meshFeatureProcessor->AcquireMesh(m_visualizationModelAsset); + m_visualizationMeshHandle = m_meshFeatureProcessor->AcquireMesh(MeshHandleDescriptor{ m_visualizationModelAsset }); m_meshFeatureProcessor->SetExcludeFromReflectionCubeMaps(m_visualizationMeshHandle, true); m_meshFeatureProcessor->SetRayTracingEnabled(m_visualizationMeshHandle, false); m_meshFeatureProcessor->SetTransform(m_visualizationMeshHandle, AZ::Transform::CreateIdentity()); diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp index 3e9e316a5a..a84db69911 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionProbe/ReflectionProbe.cpp @@ -67,7 +67,7 @@ namespace AZ "Models/ReflectionProbeSphere.azmodel", AZ::RPI::AssetUtils::TraceLevel::Assert); - m_visualizationMeshHandle = m_meshFeatureProcessor->AcquireMesh(m_visualizationModelAsset); + m_visualizationMeshHandle = m_meshFeatureProcessor->AcquireMesh(MeshHandleDescriptor{ m_visualizationModelAsset }); m_meshFeatureProcessor->SetExcludeFromReflectionCubeMaps(m_visualizationMeshHandle, true); m_meshFeatureProcessor->SetRayTracingEnabled(m_visualizationMeshHandle, false); m_meshFeatureProcessor->SetTransform(m_visualizationMeshHandle, AZ::Transform::CreateIdentity()); diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp index e7eecd3c7f..df65f47ff3 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Mesh/MeshComponentController.cpp @@ -317,8 +317,11 @@ namespace AZ MaterialComponentRequestBus::EventResult(materials, entityId, &MaterialComponentRequests::GetMaterialOverrides); m_meshFeatureProcessor->ReleaseMesh(m_meshHandle); - m_meshHandle = m_meshFeatureProcessor->AcquireMesh(m_configuration.m_modelAsset, materials, - /*skinnedMeshWithMotion=*/false, /*rayTracingEnabled=*/true, RequiresCloning); + MeshHandleDescriptor meshDescriptor; + meshDescriptor.m_modelAsset = m_configuration.m_modelAsset; + meshDescriptor.m_useForwardPassIblSpecular = m_configuration.m_useForwardPassIblSpecular; + meshDescriptor.m_requiresCloneCallback = RequiresCloning; + m_meshHandle = m_meshFeatureProcessor->AcquireMesh(meshDescriptor, materials); m_meshFeatureProcessor->ConnectModelChangeEventHandler(m_meshHandle, m_changeEventHandler); const AZ::Transform& transform = m_transformInterface ? m_transformInterface->GetWorldTM() : AZ::Transform::CreateIdentity(); @@ -327,7 +330,6 @@ namespace AZ m_meshFeatureProcessor->SetSortKey(m_meshHandle, m_configuration.m_sortKey); m_meshFeatureProcessor->SetLodOverride(m_meshHandle, m_configuration.m_lodOverride); m_meshFeatureProcessor->SetExcludeFromReflectionCubeMaps(m_meshHandle, m_configuration.m_excludeFromReflectionCubeMaps); - m_meshFeatureProcessor->SetUseForwardPassIblSpecular(m_meshHandle, m_configuration.m_useForwardPassIblSpecular); // [GFX TODO] This should happen automatically. m_changeEventHandler should be passed to AcquireMesh // If the model instance or asset already exists, announce a model change to let others know it's loaded. diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp index 6eadabe44d..f4d4144796 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp @@ -626,9 +626,11 @@ namespace AZ AZ_Error("ActorComponentController", meshFeatureProcessor, "Unable to find a MeshFeatureProcessorInterface on the entityId."); if (meshFeatureProcessor) { - // Last boolean parameter indicates if motion vector is enabled + MeshHandleDescriptor meshDescriptor; + meshDescriptor.m_modelAsset = m_skinnedMeshInstance->m_model->GetModelAsset(); + meshDescriptor.m_isSkinnedMeshWithMotion = true; m_meshHandle = AZStd::make_shared( - m_meshFeatureProcessor->AcquireMesh(m_skinnedMeshInstance->m_model->GetModelAsset(), materials, /*skinnedMeshWithMotion=*/true)); + m_meshFeatureProcessor->AcquireMesh(meshDescriptor, materials)); } // If render proxies already exist, they will be auto-freed diff --git a/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp b/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp index 4a6f41331b..dfd5e2e4ed 100644 --- a/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp +++ b/Gems/Blast/Code/Source/Editor/EditorBlastMeshDataComponent.cpp @@ -187,7 +187,7 @@ namespace Blast materials, GetEntityId(), &AZ::Render::MaterialComponentRequests::GetMaterialOverrides); m_meshFeatureProcessor->ReleaseMesh(m_meshHandle); - m_meshHandle = m_meshFeatureProcessor->AcquireMesh(m_meshAssets[0], materials); + m_meshHandle = m_meshFeatureProcessor->AcquireMesh(AZ::Render::MeshHandleDescriptor{ m_meshAssets[0] }, materials); m_meshFeatureProcessor->ConnectModelChangeEventHandler(m_meshHandle, m_changeEventHandler); HandleModelChange(m_meshFeatureProcessor->GetModel(m_meshHandle)); diff --git a/Gems/Blast/Code/Source/Family/ActorRenderManager.cpp b/Gems/Blast/Code/Source/Family/ActorRenderManager.cpp index 3695a9f07e..e461e6b7b5 100644 --- a/Gems/Blast/Code/Source/Family/ActorRenderManager.cpp +++ b/Gems/Blast/Code/Source/Family/ActorRenderManager.cpp @@ -47,7 +47,7 @@ namespace Blast { m_chunkActors[chunkId] = &actor; m_chunkMeshHandles[chunkId] = - m_meshFeatureProcessor->AcquireMesh(m_meshData->GetMeshAsset(chunkId), m_materialMap); + m_meshFeatureProcessor->AcquireMesh(AZ::Render::MeshHandleDescriptor{ m_meshData->GetMeshAsset(chunkId) }, m_materialMap); } } diff --git a/Gems/Blast/Code/Tests/ActorRenderManagerTest.cpp b/Gems/Blast/Code/Tests/ActorRenderManagerTest.cpp index 6db4adbab3..e7d8019117 100644 --- a/Gems/Blast/Code/Tests/ActorRenderManagerTest.cpp +++ b/Gems/Blast/Code/Tests/ActorRenderManagerTest.cpp @@ -98,7 +98,7 @@ namespace Blast // ActorRenderManager::OnActorCreated { EXPECT_CALL( - *m_mockMeshFeatureProcessor, AcquireMesh(_, testing::A(), _, _, _)) + *m_mockMeshFeatureProcessor, AcquireMesh(_, testing::A())) .Times(aznumeric_cast(m_actorFactory->m_mockActors[0]->GetChunkIndices().size())) .WillOnce(Return(testing::ByMove(AZ::Render::MeshFeatureProcessorInterface::MeshHandle()))) .WillOnce(Return(testing::ByMove(AZ::Render::MeshFeatureProcessorInterface::MeshHandle()))); diff --git a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp index c0dc2c63b6..52557cb2e0 100644 --- a/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp +++ b/Gems/WhiteBox/Code/Source/Rendering/Atom/WhiteBoxAtomRenderMesh.cpp @@ -178,7 +178,7 @@ namespace WhiteBox } m_meshFeatureProcessor->ReleaseMesh(m_meshHandle); - m_meshHandle = m_meshFeatureProcessor->AcquireMesh(m_modelAsset); + m_meshHandle = m_meshFeatureProcessor->AcquireMesh(AZ::Render::MeshHandleDescriptor{ m_modelAsset }); return true; } From b1d21b793940848da257f6bb73024dfb3b70439e Mon Sep 17 00:00:00 2001 From: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com> Date: Tue, 22 Jun 2021 13:19:57 -0700 Subject: [PATCH 77/91] Remove vegetation assets gem (#1348) * Remove vegetation assets gem * Removing Vegetation_Gem_Assets from engine.json --- .../ArtSource/SplatMaps/SplatMaps.psd | 3 -- .../ArtSource/SplatMaps/splatmap_00.bmp | 3 -- .../ArtSource/SplatMaps/splatmap_01.bmp | 3 -- .../ArtSource/SplatMaps/splatmap_02.bmp | 3 -- .../ArtSource/SplatMaps/splatmap_03.bmp | 3 -- .../Props/Barrel/AM_Barrel_01_Diff.tif | 3 -- .../AM_Barrel_01_Diff.tif.exportsettings | 1 - .../Props/Barrel/AM_Barrel_01_M_matGroup.mtl | 16 ---------- .../Props/Barrel/AM_Barrel_01_ddna.tif | 3 -- .../AM_Barrel_01_ddna.tif.exportsettings | 1 - .../Props/Barrel/AM_Barrel_01_spec.tif | 3 -- .../AM_Barrel_01_spec.tif.exportsettings | 1 - .../Props/Barrel/AM_Barrel_02_Diff.tif | 3 -- .../AM_Barrel_02_Diff.tif.exportsettings | 1 - .../ManMade/Props/Barrel/am_barrel_01.cgf | 3 -- .../Barrel/am_barrel_01_m_matgroup_red.mtl | 16 ---------- .../Rocks/AM_Rock_Boulder_01_Mat_matGroup.mtl | 18 ----------- .../Natural/Rocks/AM_Rock_Boulder_01_ddna.tif | 3 -- ...AM_Rock_Boulder_01_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rock_Boulder_01_diff.tif | 3 -- ...AM_Rock_Boulder_01_diff.tif.exportsettings | 1 - .../Rocks/AM_Rock_Boulder_01_rocky_ddna.tif | 3 -- ...k_Boulder_01_rocky_ddna.tif.exportsettings | 1 - .../Rocks/AM_Rock_Cliff_01_mat_matGroup.mtl | 18 ----------- .../Rocks/AM_Rock_Cliff_02_Mat_matGroup.mtl | 18 ----------- .../Natural/Rocks/AM_Rock_Cliff_02_ddna.tif | 3 -- .../AM_Rock_Cliff_02_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rock_Cliff_02_diff.tif | 3 -- .../AM_Rock_Cliff_02_diff.tif.exportsettings | 1 - .../Rocks/AM_Rock_Cliff_02_rocky_ddna.tif | 3 -- ...ock_Cliff_02_rocky_ddna.tif.exportsettings | 1 - .../Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif | 3 -- ...Flat_Multi_01_Moss_ddna.tif.exportsettings | 1 - .../AM_Rock_Flat_Multi_01_Rocky_ddna.tif | 3 -- ...lat_Multi_01_Rocky_ddna.tif.exportsettings | 1 - .../AM_Rock_Flat_Multi_01_Underneath_ddna.tif | 3 -- ...ulti_01_Underneath_ddna.tif.exportsettings | 1 - .../AM_Rock_Flat_Multi_01_Underneath_diff.tif | 3 -- ...ulti_01_Underneath_diff.tif.exportsettings | 1 - .../Rocks/AM_Rock_Flat_Multi_01_ddna.tif | 3 -- ...Rock_Flat_Multi_01_ddna.tif.exportsettings | 1 - .../Rocks/AM_Rock_Flat_Multi_01_diff.tif | 3 -- ...Rock_Flat_Multi_01_diff.tif.exportsettings | 1 - .../AM_Rock_Flat_Multi_01_mat_matGroup.mtl | 18 ----------- .../AM_Rock_Flat_Multi_02_M_matGroup.mtl | 18 ----------- .../Rocks/AM_Rock_Flat_Multi_02_ddna.tif | 3 -- ...Rock_Flat_Multi_02_ddna.tif.exportsettings | 1 - .../Rocks/AM_Rock_Flat_Multi_02_diff.tif | 3 -- ...Rock_Flat_Multi_02_diff.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rock_Square_01_ddna.tif | 3 -- .../AM_Rock_Square_01_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rock_Square_01_diff.tif | 3 -- .../AM_Rock_Square_01_diff.tif.exportsettings | 1 - .../Rocks/AM_Rock_Square_01_mat_matGroup.mtl | 18 ----------- .../Natural/Rocks/AM_Rock_Square_02_ddna.tif | 3 -- .../AM_Rock_Square_02_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rock_Square_02_diff.tif | 3 -- .../AM_Rock_Square_02_diff.tif.exportsettings | 1 - .../Rocks/AM_Rock_Square_02_mat_matGroup.mtl | 18 ----------- .../Natural/Rocks/AM_Rocks_Slide_01.skin | 3 -- .../Natural/Rocks/AM_Rocks_Slide_matGroup.mtl | 24 --------------- .../Natural/Rocks/AM_Rocks_Slide_skel_01.chr | 3 -- .../Natural/Rocks/AM_Rocks_Small_01_ddna.tif | 3 -- .../AM_Rocks_Small_01_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rocks_Small_01_diff.tif | 3 -- .../AM_Rocks_Small_01_diff.tif.exportsettings | 1 - .../Rocks/AM_Rocks_Small_02_Mat_matGroup.mtl | 12 -------- .../Natural/Rocks/AM_Rocks_Small_02_ddna.tif | 3 -- .../AM_Rocks_Small_02_ddna.tif.exportsettings | 1 - .../Natural/Rocks/AM_Rocks_Small_02_diff.tif | 3 -- .../AM_Rocks_Small_02_diff.tif.exportsettings | 1 - .../Rocks/AM_Rocks_Small_02_matGroup.mtl | 12 -------- .../Rocks/AM_Rocks_Small_ShinyM_matGroup.mtl | 17 ----------- .../Rocks/AM_Rocks_Small_Shiny_ddna.tif | 3 -- ..._Rocks_Small_Shiny_ddna.tif.exportsettings | 1 - .../Rocks/AM_Rocks_Small_Shiny_diff.tif | 3 -- ..._Rocks_Small_Shiny_diff.tif.exportsettings | 1 - .../Objects/Natural/Rocks/Rock03_detail.tif | 3 -- .../Rocks/Rock03_detail.tif.exportsettings | 1 - .../Natural/Rocks/Rock_Cliff_01_ddna.tif | 3 -- .../Rock_Cliff_01_ddna.tif.exportsettings | 1 - .../Natural/Rocks/Rock_Cliff_01_diff.tif | 3 -- .../Rock_Cliff_01_diff.tif.exportsettings | 1 - .../Rocks/Rock_Cliff_01_rocky_ddna.tif | 3 -- ...ock_Cliff_01_rocky_ddna.tif.exportsettings | 1 - .../Natural/Rocks/am_rock_boulder_01.cgf | 3 -- .../Rocks/am_rock_boulder_01_mat_vista.mtl | 14 --------- .../am_rock_boulder_01_rocky_matgroup.mtl | 15 ---------- .../Natural/Rocks/am_rock_boulder_02.cgf | 3 -- .../Natural/Rocks/am_rock_cliff_01.cgf | 3 -- .../Rocks/am_rock_cliff_01_rocky_matgroup.mtl | 15 ---------- .../Natural/Rocks/am_rock_cliff_02.cgf | 3 -- .../Rocks/am_rock_cliff_02_mat_vista.mtl | 14 --------- .../Rocks/am_rock_cliff_02_rocky_matgroup.mtl | 15 ---------- .../Natural/Rocks/am_rock_cliff_02a.cgf | 3 -- .../Natural/Rocks/am_rock_cliff_02b.cgf | 3 -- .../Natural/Rocks/am_rock_flat_01_ddna.tif | 3 -- .../am_rock_flat_01_ddna.tif.exportsettings | 1 - .../Natural/Rocks/am_rock_flat_01_diff.tif | 3 -- .../am_rock_flat_01_diff.tif.exportsettings | 1 - .../Natural/Rocks/am_rock_flat_01_group.cgf | 3 -- .../Rocks/am_rock_flat_01_matGroup.mtl | 14 --------- .../Natural/Rocks/am_rock_flat_multi_01.cgf | 3 -- .../am_rock_flat_multi_01_rocky_matgroup.mtl | 15 ---------- ...rock_flat_multi_01_underneath_matgroup.mtl | 18 ----------- .../Rocks/am_rock_flat_multi_02_group.cgf | 3 -- .../Natural/Rocks/am_rock_square_01.cgf | 3 -- .../Natural/Rocks/am_rock_square_02.cgf | 3 -- .../Rocks/am_rock_square_02_dark_mat.mtl | 18 ----------- .../Natural/Rocks/am_rocks_slide_01.cdf | 3 -- .../Rocks/am_rocks_slide_debris_01_group.cgf | 3 -- .../Rocks/am_rocks_slide_skel_01.chrparams | 3 -- .../Natural/Rocks/am_rocks_small_01.cgf | 3 -- .../Natural/Rocks/am_rocks_small_02.cgf | 3 -- .../am_rocks_small_02_mat_matgroup_dark.mtl | 12 -------- .../Rocks/am_rocks_small_02_matgroup_dark.mtl | 12 -------- .../Rocks/am_rocks_small_shiny_group.cgf | 3 -- .../Vegetation/AM_Aspen_Bark_01_diff.tif | 3 -- .../Vegetation/AM_Aspen_Bark_02_diff.tif | 3 -- .../Natural/Vegetation/AM_Aspen_Leaf_diff.tif | 3 -- .../AM_Aspen_Leaf_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Aspen_Mat.mtl | 27 ----------------- .../Natural/Vegetation/AM_Aspen_leaf_sss.tif | 3 -- .../AM_Aspen_leaf_sss.tif.exportsettings | 1 - .../AM_Background_Trees_Leaf_mat.mtl | 17 ----------- .../Natural/Vegetation/AM_Bush_01_mat.mtl | 22 -------------- .../AM_Bush_Privet_01_Frond_M_matGroup.mtl | 18 ----------- .../AM_Bush_Privet_02_Frond_M_matGroup.mtl | 17 ----------- .../Natural/Vegetation/AM_Cedar_Bark_diff.tif | 3 -- .../Natural/Vegetation/AM_Cedar_bark_mat.mtl | 21 ------------- .../Natural/Vegetation/AM_Cedar_diff.tif | 3 -- .../AM_Cedar_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Cedar_sss.tif | 3 -- .../AM_Cedar_sss.tif.exportsettings | 1 - .../Vegetation/AM_Dead_Tree_bark_matGroup.mtl | 14 --------- .../Natural/Vegetation/AM_Dead_Tree_diff.tif | 3 -- .../Natural/Vegetation/AM_Doc_Plant_ddna.tif | 3 -- .../AM_Doc_Plant_ddna.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Doc_Plant_diff.tif | 3 -- .../AM_Doc_Plant_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Doc_Plant_mat.mtl | 15 ---------- .../Natural/Vegetation/AM_Doc_Plant_sss.tif | 3 -- .../AM_Doc_Plant_sss.tif.exportsettings | 1 - .../Vegetation/AM_Fallen_Tree_bark_mat.mtl | 14 --------- .../Vegetation/AM_Fallen_Tree_diff.tif | 3 -- .../AM_Fernbush_Large_01_Mat_matGroup.mtl | 15 ---------- .../Vegetation/AM_Fernbush_large_01_ddna.tif | 3 -- .../Vegetation/AM_Fernbush_large_01_diff.tif | 3 -- ..._Fernbush_large_01_diff.tif.exportsettings | 1 - .../Vegetation/AM_Fernbush_large_01_sss.tif | 3 -- ...M_Fernbush_large_01_sss.tif.exportsettings | 1 - .../Vegetation/AM_Grass_Tuft_01_diff.tif | 3 -- .../AM_Grass_Tuft_01_diff.tif.exportsettings | 1 - .../Vegetation/AM_Grass_Tuft_01_sss.tif | 3 -- .../AM_Grass_Tuft_01_sss.tif.exportsettings | 1 - .../AM_Grass_tuft_01_Mat_matGroup.mtl | 15 ---------- .../AM_Grass_tuft_01_matgroup_Tinted | 16 ---------- .../AM_Grass_tuft_03_Mat_matGroup.mtl | 16 ---------- .../Natural/Vegetation/AM_Ivy_02_ddna.tif | 3 -- .../AM_Ivy_02_ddna.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Ivy_02_diff.tif | 3 -- .../AM_Ivy_02_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Ivy_02_sss.tif | 3 -- .../AM_Ivy_02_sss.tif.exportsettings | 1 - .../Vegetation/AM_Ivy_Leaf_02_matGroup.mtl | 15 ---------- .../Natural/Vegetation/AM_Ivy_Leaf_mat.mtl | 14 --------- .../Natural/Vegetation/AM_Ivy_diff.tif | 3 -- .../Vegetation/AM_Ivy_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Lily_diff.tif | 3 -- .../Natural/Vegetation/AM_Oak_Bark_01.tif | 3 -- .../Vegetation/AM_Oak_Bark_01_diff.tif | 3 -- .../Vegetation/AM_Oak_Leaf_02_diff.tif | 3 -- .../Vegetation/AM_Oak_Leaf_03_diff.tif | 3 -- .../AM_Oak_Leaf_03_diff.tif.exportsettings | 1 - .../Natural/Vegetation/AM_Oak_Leaf_ddn.tif | 3 -- .../Natural/Vegetation/AM_Oak_Leaf_diff.tif | 3 -- .../AM_Oak_Leaf_diff.tif.exportsettings | 1 - .../Vegetation/AM_Oak_leaf_red_diff.tif | 3 -- .../Vegetation/AM_Oak_leaf_red_sss.tif | 3 -- .../Natural/Vegetation/AM_Oak_red_mat.mtl | 21 ------------- .../Natural/Vegetation/AM_Pine_01_mat.mtl | 25 ---------------- .../Natural/Vegetation/AM_Pine_Bark_01.tif | 3 -- .../Vegetation/AM_Pine_Bark_01_diff.tif | 3 -- .../Natural/Vegetation/AM_Pine_Leaf_diff.tif | 3 -- .../Natural/Vegetation/AM_Pine_leaf_02.tif | 3 -- .../Vegetation/AM_Pine_leaf_02_diff.tif | 3 -- .../Vegetation/AM_Pine_leaf_02_sss.tif | 3 -- .../Natural/Vegetation/AM_Pine_leaf_sss.tif | 3 -- .../Vegetation/AM_Plains_Cotton_Tree_mat.mtl | 20 ------------- .../Vegetation/AM_Plant_Glow_mat_matGroup.mtl | 15 ---------- .../Vegetation/AM_background_ground_diff.tif | 3 -- .../Vegetation/AM_background_tree_diff.tif | 3 -- .../Vegetation/AM_bush_leaf_02_diff.tif | 3 -- .../Natural/Vegetation/AM_bush_leaf_diff.tif | 3 -- .../Natural/Vegetation/AM_bush_leaf_sss.tif | 3 -- .../AM_bush_privet_01_frond_diff.tif | 3 -- ...sh_privet_01_frond_diff.tif.exportsettings | 1 - .../AM_bush_privet_01_frond_sss.tif | 3 -- ...ush_privet_01_frond_sss.tif.exportsettings | 1 - .../AM_bush_privet_01_tile_diff.tif | 3 -- ...ush_privet_01_tile_diff.tif.exportsettings | 1 - .../Vegetation/AM_lily_pad_matGroup.mtl | 14 --------- .../Vegetation/AM_river_weed_mat_matGroup.mtl | 15 ---------- .../Vegetation/Grass_UpNormals_01_ddn.tif | 3 -- .../Grass_UpNormals_01_ddn.tif.exportsettings | 1 - .../Natural/Vegetation/am_aspen_01_group.cgf | 3 -- .../Vegetation/am_aspen_mat_yellow.mtl | 27 ----------------- .../Natural/Vegetation/am_background_tree.cgf | 3 -- .../Natural/Vegetation/am_bullrush_mat.mtl | 15 ---------- .../Natural/Vegetation/am_bulrush_group.cgf | 3 -- .../Vegetation/am_bush_01_dark_mat.mtl | 22 -------------- .../Natural/Vegetation/am_bush_01_group.cgf | 3 -- .../am_bush_privet_01_frond_m_matgroup_0.mtl | 17 ----------- .../Vegetation/am_bush_privet_01_group.cgf | 3 -- .../Vegetation/am_bush_privet_02_group.cgf | 3 -- .../Natural/Vegetation/am_cedar_group.cgf | 3 -- .../Natural/Vegetation/am_dead_tree.cgf | 3 -- .../Natural/Vegetation/am_doc_plant_group.cgf | 3 -- .../Vegetation/am_fernbush_large_01_group.cgf | 3 -- .../Vegetation/am_grass_01_plain_group.cgf | 3 -- .../Vegetation/am_grass_02_plants_group.cgf | 3 -- .../Vegetation/am_grass_03_seeds_group.cgf | 3 -- .../Vegetation/am_grass_flower_pink_group.cgf | 3 -- .../am_grass_flower_purple_group.cgf | 3 -- .../Vegetation/am_grass_flower_red_group.cgf | 3 -- .../am_grass_flower_white_group.cgf | 3 -- .../am_grass_flower_yellow_group.cgf | 3 -- .../Vegetation/am_grass_long_matgroup.mtl | 16 ---------- .../Vegetation/am_grass_tall_01_group.cgf | 3 -- .../Vegetation/am_grass_tall_02_group.cgf | 3 -- .../am_grass_tuft_03_mat_matgroup_0.mtl | 16 ---------- .../Vegetation/am_grass_tuft_04_group.cgf | 3 -- .../Vegetation/am_grass_tuft_group.cgf | 3 -- .../Vegetation/am_groundcover_01_group.cgf | 3 -- .../Natural/Vegetation/am_ivy_01_group.cgf | 3 -- .../Natural/Vegetation/am_ivy_02_group.cgf | 3 -- .../Natural/Vegetation/am_ivy_03_group.cgf | 3 -- .../Natural/Vegetation/am_ivy_04_group.cgf | 3 -- .../Vegetation/am_ivy_bush_01_group.cgf | 3 -- .../Natural/Vegetation/am_ivy_long.cgf | 3 -- .../Objects/Natural/Vegetation/am_lily_01.cgf | 3 -- .../Objects/Natural/Vegetation/am_lily_02.cgf | 3 -- .../Objects/Natural/Vegetation/am_lily_03.cgf | 3 -- .../Natural/Vegetation/am_lily_flower.cgf | 3 -- .../Natural/Vegetation/am_nettle_01_group.cgf | 3 -- .../Natural/Vegetation/am_oak_group.cgf | 3 -- .../Objects/Natural/Vegetation/am_oak_mat.mtl | 30 ------------------- .../Objects/Natural/Vegetation/am_oak_red.cgf | 3 -- .../Natural/Vegetation/am_pine_01_group.cgf | 3 -- .../Natural/Vegetation/am_pine_02_mat.mtl | 18 ----------- .../Natural/Vegetation/am_pine_tall_group.cgf | 3 -- .../am_plains_cotton_tree_group.cgf | 3 -- .../Natural/Vegetation/am_plant_glow_01.cgf | 3 -- .../Natural/Vegetation/am_plant_glow_diff.tif | 3 -- .../am_plant_glow_diff.tif.exportsettings | 1 - .../Natural/Vegetation/am_plant_glow_e.tif | 3 -- .../am_plant_glow_e.tif.exportsettings | 1 - .../Vegetation/am_plant_glow_large.cgf | 3 -- .../Vegetation/am_plant_glow_large_diff.tif | 3 -- .../Natural/Vegetation/am_plant_glow_sss.tif | 3 -- .../am_plant_glow_sss.tif.exportsettings | 1 - .../Natural/Vegetation/am_river_weed.cgf | 3 -- .../Natural/Vegetation/am_root_01_group.cgf | 3 -- .../Vegetation/am_tree_fallen_group.cgf | 3 -- .../Assets/Objects/Test/LOD_Test.fbx | 3 -- .../Assets/Objects/Test/LOD_Test.mtl | 9 ------ Gems/Vegetation_Gem_Assets/CMakeLists.txt | 15 ---------- Gems/Vegetation_Gem_Assets/gem.json | 12 -------- Gems/Vegetation_Gem_Assets/preview.png | 3 -- engine.json | 1 - 270 files changed, 1472 deletions(-) delete mode 100644 Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/SplatMaps.psd delete mode 100644 Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_00.bmp delete mode 100644 Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_01.bmp delete mode 100644 Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_02.bmp delete mode 100644 Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_03.bmp delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_M_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01_m_matgroup_red.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_01_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_M_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_01.skin delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_skel_01.chr delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_ShinyM_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_mat_vista.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_rocky_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_02.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01_rocky_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_mat_vista.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_rocky_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02a.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02b.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_rocky_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_underneath_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_02_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02_dark_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_01.cdf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_debris_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_skel_01.chrparams delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_mat_matgroup_dark.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_matgroup_dark.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_shiny_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Background_Trees_Leaf_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_01_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_01_Frond_M_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_02_Frond_M_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_Bark_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_bark_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_bark_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_bark_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_Large_01_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_matgroup_Tinted delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_03_Mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_02_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Lily_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_ddn.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_red_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_01_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Leaf_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plains_Cotton_Tree_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plant_Glow_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_ground_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_tree_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_02_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_lily_pad_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_river_weed_mat_matGroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_mat_yellow.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_background_tree.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bullrush_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bulrush_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_dark_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_frond_m_matgroup_0.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_02_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_cedar_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_dead_tree.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_doc_plant_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_fernbush_large_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_01_plain_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_02_plants_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_03_seeds_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_pink_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_purple_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_red_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_white_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_yellow_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_long_matgroup.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_02_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_03_mat_matgroup_0.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_04_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_groundcover_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_02_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_03_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_04_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_bush_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_long.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_02.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_03.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_flower.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_nettle_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_red.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_02_mat.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_tall_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plains_cotton_tree_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_01.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large_diff.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif.exportsettings delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_river_weed.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_root_01_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_tree_fallen_group.cgf delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.fbx delete mode 100644 Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.mtl delete mode 100644 Gems/Vegetation_Gem_Assets/CMakeLists.txt delete mode 100644 Gems/Vegetation_Gem_Assets/gem.json delete mode 100644 Gems/Vegetation_Gem_Assets/preview.png diff --git a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/SplatMaps.psd b/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/SplatMaps.psd deleted file mode 100644 index 3f358860e1..0000000000 --- a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/SplatMaps.psd +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2a70cf9523c07263261bb2a912f656609419318e680611ccc8e2652c2f5ec0a -size 410840 diff --git a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_00.bmp b/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_00.bmp deleted file mode 100644 index f761afd7e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_00.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:69c699ebfb1f4ffe241b047499d0f52292112b38783d08eb50ccfeb97f76c91a -size 3145784 diff --git a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_01.bmp b/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_01.bmp deleted file mode 100644 index 4aec47ff90..0000000000 --- a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_01.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e2519313a259f6df040e17ce27cffc3c96a2c8616aeeffd3899481ab52efd41f -size 3145784 diff --git a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_02.bmp b/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_02.bmp deleted file mode 100644 index ac26ed299f..0000000000 --- a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_02.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9d76c75c2b18850a091f9787ee4ac684a648d8dea0bcc8141f4e895942428fd4 -size 3145784 diff --git a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_03.bmp b/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_03.bmp deleted file mode 100644 index 3984012834..0000000000 --- a/Gems/Vegetation_Gem_Assets/ArtSource/SplatMaps/splatmap_03.bmp +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3c22f26d5921218882dbe7d55deb9f4e33744a34eb02804efb44998f7299afb6 -size 3145784 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif deleted file mode 100644 index 66e37ba7b8..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3841e927bb9a411af5287e1f69c68ad6fbcfefc4ed4696ee58ab80f6554e4b3e -size 12602708 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif.exportsettings deleted file mode 100644 index d3713274e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_Diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_M_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_M_matGroup.mtl deleted file mode 100644 index 3bf9461012..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_M_matGroup.mtl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif deleted file mode 100644 index 21c4dd4929..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c318de8b5e831429c0852043df2b496ea360f7e7a16a09728057e936b5f9d82f -size 16797014 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif.exportsettings deleted file mode 100644 index 0159b6ca02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif deleted file mode 100644 index 8fa154bdba..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7a64b6827e7f837f35d802433419ad88b196ea99ed97215cdee4d77009584152 -size 3157332 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif.exportsettings deleted file mode 100644 index 25a6d5d697..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_01_spec.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Reflectance /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif deleted file mode 100644 index 40842d8ca3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45ab25afac85d92c63c939cea3086545975412a81d2c1d03210a9c4c0a57b8ab -size 12602708 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif.exportsettings deleted file mode 100644 index 44cd6187b1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/AM_Barrel_02_Diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01.cgf deleted file mode 100644 index 1d6987b993..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f582c61b53f2bde096345e6a1dbbfb70fabbe05aaa96f5f560885acbc2ecb76c -size 111276 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01_m_matgroup_red.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01_m_matgroup_red.mtl deleted file mode 100644 index 8cb77c2c65..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/ManMade/Props/Barrel/am_barrel_01_m_matgroup_red.mtl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_Mat_matGroup.mtl deleted file mode 100644 index 57822cd8c7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_Mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif deleted file mode 100644 index 107cfbd6cf..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70148ec39ccbbb05bc3c5df8857fbbdc1ee455574b4a141e4d6ceb78aacd6c76 -size 16797012 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif deleted file mode 100644 index 9503f0c4d9..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7da1eab71d64b032264f1cb3b1b8b768496c56c90d057e42183b6dcfe9d1ada9 -size 12602706 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif deleted file mode 100644 index 99c22bf61e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26c78881443d317e708efaa2266fe6c0e2a52d04109887c408cf539e31a3aed2 -size 16797018 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Boulder_01_rocky_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_01_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_01_mat_matGroup.mtl deleted file mode 100644 index 68519557fd..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_01_mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_Mat_matGroup.mtl deleted file mode 100644 index be5fe5a3db..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_Mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif deleted file mode 100644 index c2b4e11895..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:960fcf7aa076eae6578e40bd566b0bc978f77899f87de2b3a4306568e9eb5f10 -size 67145042 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif.exportsettings deleted file mode 100644 index 0159b6ca02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif deleted file mode 100644 index b33aff3190..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:bb9f5e3093ee1e19dc4bae286d4e34ae2095a3e70dbd02b64343fdb7e75ff897 -size 67145042 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif deleted file mode 100644 index aa685d4652..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c484e208ee7bdda60ef6ffeba1e6c523596ad9fd36cf24ac424baaf06c57cca9 -size 67145048 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Cliff_02_rocky_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif deleted file mode 100644 index d2f1fdf89e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:046b2105e45016bad314e8ad4ed3800018f60ea218bf33b2637554c0efd1c0b5 -size 16797016 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Moss_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif deleted file mode 100644 index 409679c789..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a4285c8231bde77d1dbc9cbce60ee4a35a566f75cb96cb4279f1c1098a6fd5c3 -size 67145054 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Rocky_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif deleted file mode 100644 index d3b49a1d00..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fd21e1c93650c69e841a5a87812a6937f77d9ae44c7f28bf37567a314e27d7d6 -size 67145058 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif deleted file mode 100644 index d1b15a4d9a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:45630fa430865bea236013ea2c6c91966ced24d51bdf791d04a5ba71d76dae69 -size 67145058 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif.exportsettings deleted file mode 100644 index c47c60591e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_Underneath_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif deleted file mode 100644 index 06ad9f3b00..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:cecb571c673a412031a64e704122ac6eef77bd66005e26b767edd8c28037e11e -size 67145048 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif.exportsettings deleted file mode 100644 index 612e3d6260..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,0,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif deleted file mode 100644 index 45e1facd3c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e0da4f69d5496bb3329b4bd4e5e32bceacf98d6e2eb6af1771812a225b241a7 -size 67145048 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_mat_matGroup.mtl deleted file mode 100644 index ba11d83efe..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_01_mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_M_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_M_matGroup.mtl deleted file mode 100644 index 960256dcd7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_M_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif deleted file mode 100644 index e4acf21e50..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dfce23f8a59c8ef97dc9d8bdeb81072fc5300bff3c11735f65b7f78652f93cd4 -size 16797016 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif.exportsettings deleted file mode 100644 index 0159b6ca02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif deleted file mode 100644 index 3af6a1f5dc..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b157eab497ef89c8f575f039b6da5b3c43a9fea06b2e6c2335ee1347357b49e3 -size 12602710 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif.exportsettings deleted file mode 100644 index d3713274e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Flat_Multi_02_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif deleted file mode 100644 index 5d931fcc02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f9378510d3f75fa80a5ca5884f1ad9e20852c5eb88d6e10d74238c89dbda208 -size 16797012 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif.exportsettings deleted file mode 100644 index f646798932..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,50,0,0,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif deleted file mode 100644 index 044b91dd12..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:117d37d86b808768d74f70a522e66a76a6ffc71ceb5858e901a3f5191994d92b -size 12602706 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif.exportsettings deleted file mode 100644 index 1fa63072ac..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_mat_matGroup.mtl deleted file mode 100644 index 5edd2d3b75..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_01_mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif deleted file mode 100644 index cc42e3d4c6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:10b24991a5042c283f7af1a75360d0d9ad78384c6c4eadf99340506e253c8762 -size 16797012 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif.exportsettings deleted file mode 100644 index c1e54599df..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,0,0,0,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif deleted file mode 100644 index d22de588d9..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6909db9fd61da354c863b1f8d6abb6f504f47b79515410b4c1337d5d5c06a69b -size 12602706 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif.exportsettings deleted file mode 100644 index 96f3ff5a02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_mat_matGroup.mtl deleted file mode 100644 index b5732a2758..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rock_Square_02_mat_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_01.skin b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_01.skin deleted file mode 100644 index 33529b2903..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_01.skin +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:94e30359c97338d4edeaeab700596993f20fa434606af4fcaa29d8ae1be7c781 -size 852132 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_matGroup.mtl deleted file mode 100644 index 72115cfcc6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_matGroup.mtl +++ /dev/null @@ -1,24 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_skel_01.chr b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_skel_01.chr deleted file mode 100644 index 59f8b3eceb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Slide_skel_01.chr +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:20545079f3e0a61cc144a161999753996797a090f285d63f1c6b1ac1a050729b -size 24956 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif deleted file mode 100644 index 5236811ed3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2cb13a66c6d06e7cd5f06eb05f45c817db0dc76c64afde5225213f742bc0cf40 -size 1056084 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif deleted file mode 100644 index 5afd79a967..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:de80f21e0f6d48e3894fcf309f2564e1b74be0a65e415506034ff144b051bc74 -size 3157330 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif.exportsettings deleted file mode 100644 index d3713274e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_Mat_matGroup.mtl deleted file mode 100644 index aabcfba40e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_Mat_matGroup.mtl +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif deleted file mode 100644 index 1416b0eed5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c2c2f43f48f2b661f69b955e7009006a6aa616a25131b4b5e9a5017ac6b18193 -size 1056084 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif deleted file mode 100644 index 439288cda3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51ba30ea6a9749edf269e3d22a0eb73ebc4589f87f1d207166cb0f5ad1201a45 -size 793938 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif.exportsettings deleted file mode 100644 index 44cd6187b1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_matGroup.mtl deleted file mode 100644 index 1d62a9a2cd..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_02_matGroup.mtl +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_ShinyM_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_ShinyM_matGroup.mtl deleted file mode 100644 index 3df0eceb57..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_ShinyM_matGroup.mtl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif deleted file mode 100644 index 3551cc7a27..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:dda8085556f470dc023e20f6d26c7ea4a5a47ed486db90050e31dfe7838d18dd -size 1056058 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif deleted file mode 100644 index ef38d786a4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:37866b8a07a89274c76b53a545076fa0be9071b2fea21787b3c7890f8fa6d303 -size 793912 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif.exportsettings deleted file mode 100644 index 44cd6187b1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/AM_Rocks_Small_Shiny_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif deleted file mode 100644 index 634a6c9119..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:21cde0da4644e3153946411ea409e4632ba523b69b0fc681a3b09f523089181e -size 12602664 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif.exportsettings deleted file mode 100644 index 2e8334a855..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock03_detail.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /mipgentype=sigma-six /preset=Detail_MergedAlbedoNormalsSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif deleted file mode 100644 index aadc159c63..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5d4d82f4b0f24f608d5e4dbdab6fa71709cbaa0413cc3523eaae0ec3cefcf529 -size 67145040 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif.exportsettings deleted file mode 100644 index 9f2f74b20f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif deleted file mode 100644 index d7acd7109a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:26a43da7577aba6425fcd1bebe3d85401dd2283dff41d4e824b49f263c088cea -size 67145040 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif deleted file mode 100644 index c7a349738c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b25f5576f02b4f17a6806468e724b302fa1195a3552ab4605628b6429baa1a08 -size 67145046 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/Rock_Cliff_01_rocky_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01.cgf deleted file mode 100644 index a2c688ac88..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e8113d59915a411f248fe9e560c9043817a609bb3a9fdf0521caf42cece019f -size 138724 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_mat_vista.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_mat_vista.mtl deleted file mode 100644 index 9bd3403245..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_mat_vista.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_rocky_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_rocky_matgroup.mtl deleted file mode 100644 index e69529ca7f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_01_rocky_matgroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_02.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_02.cgf deleted file mode 100644 index 0b5e3298ed..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_boulder_02.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4177903b65bcfd2f04dba4ce3f6316c273b94f064c06002bda5b8e2ad6d06a5b -size 126812 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01.cgf deleted file mode 100644 index 9e454e84db..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:39c9a0bee9eb5d3475352c66844471b5ccf4520c110d6e595d8125e17c6e3413 -size 727616 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01_rocky_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01_rocky_matgroup.mtl deleted file mode 100644 index 39199c75a5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_01_rocky_matgroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02.cgf deleted file mode 100644 index 3f032b49ca..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f9370dfce16a91f9862f3cb3fa0f9c14f504104951857e6479ab695b162174c -size 323064 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_mat_vista.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_mat_vista.mtl deleted file mode 100644 index a7bf11c362..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_mat_vista.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_rocky_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_rocky_matgroup.mtl deleted file mode 100644 index 7063ab5317..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02_rocky_matgroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02a.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02a.cgf deleted file mode 100644 index 522a4397e5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02a.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae5580e8463dc6f4e3e1c7fdee69b7e5178a9502ee13741ed1c412952a66c9c8 -size 175928 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02b.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02b.cgf deleted file mode 100644 index c0cd90311b..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_cliff_02b.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9c491da1c77793c6fc132f012fab9024e8db0cd6d9abd7721f2b2c962ef597f0 -size 156592 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif deleted file mode 100644 index de50a8b19f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:09c780af19a75f8d385a36987455a8db20d960212a8db4adca0afc7114706d47 -size 16797010 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif deleted file mode 100644 index 31e1750dc6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:caaebeea973821f7e0ed3661cefc7d91eabdceddb9c96b746ab5771b593d8a4a -size 12602704 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif.exportsettings deleted file mode 100644 index 44cd6187b1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_group.cgf deleted file mode 100644 index 4945be459d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0e44a8e7642beb4468382a9e56b65e2db2ef77f0a5d4171c6670d3d2178f6ee7 -size 204920 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_matGroup.mtl deleted file mode 100644 index 61e788f300..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_01_matGroup.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01.cgf deleted file mode 100644 index dd9b3ae8e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa54db0536e8e85532d0f88987bab3f1d0bf3cba8898e4e38f0dcf027bfc5fe6 -size 199708 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_rocky_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_rocky_matgroup.mtl deleted file mode 100644 index e66a2f410c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_rocky_matgroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_underneath_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_underneath_matgroup.mtl deleted file mode 100644 index dba423d275..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_01_underneath_matgroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_02_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_02_group.cgf deleted file mode 100644 index e3326f26af..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_flat_multi_02_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:51102056a51edfc7153bb6ac4bfe71dbfd6041408f9e9e28d7e294e3d18f9a60 -size 500712 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_01.cgf deleted file mode 100644 index 15ba1206bb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c314b95e421fb6aa5a5e9f80679854f180f6cfb260ab5b84b896b24f8236ab04 -size 60384 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02.cgf deleted file mode 100644 index 7174d48922..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f31ced8670bf0f9f0f3df3f81f7cd56c08cbb9776b51da979dd08d66b3f6772b -size 46608 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02_dark_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02_dark_mat.mtl deleted file mode 100644 index ae3d5783fe..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rock_square_02_dark_mat.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_01.cdf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_01.cdf deleted file mode 100644 index a8ba58301e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_01.cdf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:81fffde0b0ee660b1846d33e2ccef38f692d6e9baa89b639103ba9934a739318 -size 319 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_debris_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_debris_01_group.cgf deleted file mode 100644 index 44b6d6c879..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_debris_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:28d49d412896d3be92787b7e344b19c8ddd2511d619f94ba44ee8a3edacfc719 -size 6000 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_skel_01.chrparams b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_skel_01.chrparams deleted file mode 100644 index 6ed76ea4fb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_slide_skel_01.chrparams +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:08adc30db6828177bb3b83e770aba4cdbb0c6b92b3e2aabd028abda473950e50 -size 1669 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_01.cgf deleted file mode 100644 index 159eea15b3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:56b86f161d37b0091e1491aaa4a18bf24669b2884b2a357d50c1db5050715930 -size 48141 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02.cgf deleted file mode 100644 index fe888ae84f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:aa07be483efe791fd6091170f6b6d1e521de79ed666dfc18e9530de9e01a760b -size 22072 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_mat_matgroup_dark.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_mat_matgroup_dark.mtl deleted file mode 100644 index 29ac1aa851..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_mat_matgroup_dark.mtl +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_matgroup_dark.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_matgroup_dark.mtl deleted file mode 100644 index 69fa83b79c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_02_matgroup_dark.mtl +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_shiny_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_shiny_group.cgf deleted file mode 100644 index 4695a7d270..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Rocks/am_rocks_small_shiny_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99dabc61c73c2ae8d94cb030cca6f80738e42b680a482bda4cb0b83d701d648a -size 43900 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_01_diff.tif deleted file mode 100644 index b70b707ea6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ff835abb5c50c8d7b6d4fc4a9da09d00dd314a484bd40cf04f6e3f20f25c08cc -size 3157298 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_02_diff.tif deleted file mode 100644 index fe079ec85f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Bark_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d1fbc07b07671f0143dbe48df3767d7e45501ee44a7537707a55d7d98d8c7f5 -size 3157298 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif deleted file mode 100644 index 2e9e364d75..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:374c8361b314bff08b2442c3d31a797d65aca7445b5359e05e44ed4de703aec7 -size 4205908 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Leaf_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Mat.mtl deleted file mode 100644 index dcb18e1487..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_Mat.mtl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif deleted file mode 100644 index 0570389b99..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0403336f4be0e6be37f6bf869582cf0195a4ea347b22f697ca4f848c74d628e9 -size 3157330 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif.exportsettings deleted file mode 100644 index 79d1c5dd92..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Aspen_leaf_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Background_Trees_Leaf_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Background_Trees_Leaf_mat.mtl deleted file mode 100644 index 1fc85c34d5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Background_Trees_Leaf_mat.mtl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_01_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_01_mat.mtl deleted file mode 100644 index aec274eb85..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_01_mat.mtl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_01_Frond_M_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_01_Frond_M_matGroup.mtl deleted file mode 100644 index 95a300095a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_01_Frond_M_matGroup.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_02_Frond_M_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_02_Frond_M_matGroup.mtl deleted file mode 100644 index 64e174f053..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Bush_Privet_02_Frond_M_matGroup.mtl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_Bark_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_Bark_diff.tif deleted file mode 100644 index 0918e3353d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_Bark_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:67fe2201f7405e2f58fb8348d79823a1b46089a906417891cb4c91c8eedfb9c4 -size 3157328 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_bark_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_bark_mat.mtl deleted file mode 100644 index 89291470ba..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_bark_mat.mtl +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif deleted file mode 100644 index a8a5f6dbc4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e290729d6662b18c2db9d3c7097516d0ef4b46a751a90314031f7f6bdc0579f7 -size 4205904 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif.exportsettings deleted file mode 100644 index c47c60591e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif deleted file mode 100644 index b0d0b9b5df..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:faa0d9b0f74fbdec8a3d37d4972b0b5e6b93df830c120a193c1a0d1020d5cd4b -size 3157324 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif.exportsettings deleted file mode 100644 index fa55f75e2d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Cedar_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_bark_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_bark_matGroup.mtl deleted file mode 100644 index 7e7790fc4c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_bark_matGroup.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_diff.tif deleted file mode 100644 index e786c5690d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Dead_Tree_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:da9c3eeab3586aaba473fa4dbf6d7be89ef3bb096b35017375064f1188eec287 -size 12599514 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif deleted file mode 100644 index f6b9aa0a05..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4d5eb2485bd53eb52c2531273cd2cce32d96fcbf6c43eb494a2d748917fdfa2e -size 4205908 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif.exportsettings deleted file mode 100644 index 0159b6ca02..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif deleted file mode 100644 index fa83875776..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b1461ae755b243dda7c4d46c2e08f767040b32ad4b51fa8a4863aad70e3c0102 -size 4205908 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_mat.mtl deleted file mode 100644 index bcb81dd998..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_mat.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif deleted file mode 100644 index 258c4f623e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:70f97970ebff3d5198f2a9ec132a26bfec0a43a4fa8b600f05c1b7be7dc1f7cc -size 3157328 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif.exportsettings deleted file mode 100644 index 79d1c5dd92..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Doc_Plant_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_bark_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_bark_mat.mtl deleted file mode 100644 index c2def166ff..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_bark_mat.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_diff.tif deleted file mode 100644 index 8a9560f067..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fallen_Tree_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:957907dd575fe636f3ac35ef3edce24ac7d6ae2c84fd3d9d36ec237be77ee5da -size 12599516 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_Large_01_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_Large_01_Mat_matGroup.mtl deleted file mode 100644 index ae8edf2155..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_Large_01_Mat_matGroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_ddna.tif deleted file mode 100644 index 3f1704533b..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d71b48456857917c3bf268ab3db9ad96408f4107faf951132545547680912e29 -size 16796984 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif deleted file mode 100644 index fec0d96709..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7be3006de15f01c387daa1b8057fe4636a589d0389fed71df117ab7105060830 -size 16797020 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif deleted file mode 100644 index 5781010ab5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:49fd0ceef3c21651869c871b1cb7f242dce134e7efe15b0a5c51cfb07004dbdb -size 793944 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif.exportsettings deleted file mode 100644 index 79d1c5dd92..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Fernbush_large_01_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif deleted file mode 100644 index bacb61ee55..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:fec174b4fe571b57c5f31a557510fb800fbd3ae9c5371f0af636494a8bf3ec2d -size 16797016 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif deleted file mode 100644 index f84636f859..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0f36e52bd7bc7bd54d4df38fa1a0917acc857df0cbc1ed339f3d573b4e983667 -size 12602708 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif.exportsettings deleted file mode 100644 index 79d1c5dd92..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_Tuft_01_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_Mat_matGroup.mtl deleted file mode 100644 index e89724b252..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_Mat_matGroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_matgroup_Tinted b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_matgroup_Tinted deleted file mode 100644 index 4b61f979e7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_01_matgroup_Tinted +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_03_Mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_03_Mat_matGroup.mtl deleted file mode 100644 index 4076fc0b9d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Grass_tuft_03_Mat_matGroup.mtl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif deleted file mode 100644 index 5a99e6e0ce..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b735887af2f400418d90685e2d91cd7ce04aeb47abf359b305ae2d8d3a8f17cb -size 16797008 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif.exportsettings deleted file mode 100644 index 4709125fa0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_ddna.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=NormalsWithSmoothness /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif deleted file mode 100644 index 715618c7a5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:72f25caca746d282dc4bf46a048cff1fa4a73276acabd74a673564d6241235fe -size 16797008 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif.exportsettings deleted file mode 100644 index 1fa63072ac..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,0,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif deleted file mode 100644 index 95606cbcda..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0af84addc0abad70eb17ce15c2c887b95ab171603afb9724b29877b1971a3aba -size 3157252 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif.exportsettings deleted file mode 100644 index 44cd6187b1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_02_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_02_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_02_matGroup.mtl deleted file mode 100644 index 3de49fea14..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_02_matGroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_mat.mtl deleted file mode 100644 index 9f05f8c9d8..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_Leaf_mat.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif deleted file mode 100644 index e7e32fab86..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:75cb045c8638bb5d4ecaba7dedc17f3581919e4bbf4c7b57086856d553f59115 -size 16796970 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif.exportsettings deleted file mode 100644 index c47c60591e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Ivy_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Lily_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Lily_diff.tif deleted file mode 100644 index bf5dd1f59d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Lily_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5360ada7af3aeca3f700f1508744097e786a4ded59e7367858188c562bbcc0b4 -size 4205866 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01.tif deleted file mode 100644 index f879f3266d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68a9bab41db84dedec840b0e08405b10d9d3d3a608a94c80e44cfc5af3fa4a84 -size 3157292 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01_diff.tif deleted file mode 100644 index f879f3266d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Bark_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:68a9bab41db84dedec840b0e08405b10d9d3d3a608a94c80e44cfc5af3fa4a84 -size 3157292 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_02_diff.tif deleted file mode 100644 index 28700f95fc..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:d8aa6453fa7a2d6fd55cc620375ded6b4c0dffbebe50de9528985debb281bc94 -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif deleted file mode 100644 index 83fc287c0b..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2a17d326bd522a19701650a96daa357526c09e7711eb6d8df479c14064576e62 -size 4205910 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_03_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_ddn.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_ddn.tif deleted file mode 100644 index 727c03dc4c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_ddn.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3578ff582703fb6bd0416afe05822ae895e9d7ac65e5d5be311adda10cc8f12a -size 4205858 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif deleted file mode 100644 index d24828e8c2..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2d90be28d9b01201cc1af7e8ede8679de6ba7faedbacbae3fd98e4cd045d90c3 -size 4205906 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_Leaf_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_diff.tif deleted file mode 100644 index 5179711452..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:58b7788aa98c36178659aab80471ae5a0aaf4fedc66ad20438c4d4109bf3a32c -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_sss.tif deleted file mode 100644 index 8ceec9e757..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_leaf_red_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:314c8c9d76b6b5ea5fc2592510ce9e00a1e8122cf93cf2be3ce18a9a647e364a -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_red_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_red_mat.mtl deleted file mode 100644 index 558810426e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Oak_red_mat.mtl +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_01_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_01_mat.mtl deleted file mode 100644 index 195972aa99..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_01_mat.mtl +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01.tif deleted file mode 100644 index b2cb2fb5f8..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef1a003af20ee8cbe96dab91a1fde2c94039365f980ed8ae3939cdb5cbec174b -size 3157294 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01_diff.tif deleted file mode 100644 index b2cb2fb5f8..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Bark_01_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ef1a003af20ee8cbe96dab91a1fde2c94039365f980ed8ae3939cdb5cbec174b -size 3157294 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Leaf_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Leaf_diff.tif deleted file mode 100644 index b7ba7407b3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_Leaf_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0c43b48118da423395ed124ac7b6976aa0def9686a0c5325faced6e429031d4 -size 4205872 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02.tif deleted file mode 100644 index 17200ae2b4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3cfe4f4b5074c0c1a745d5e0d6dc7f4dc9ae4d51977dd1b27a1da2529c005e2b -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_diff.tif deleted file mode 100644 index 17200ae2b4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3cfe4f4b5074c0c1a745d5e0d6dc7f4dc9ae4d51977dd1b27a1da2529c005e2b -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_sss.tif deleted file mode 100644 index 09100b5e1a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_02_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:1416a972a159848cfb1bd7cf022afe297bb28e6b4dc053876b4ffc3a4e9912fc -size 4205874 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_sss.tif deleted file mode 100644 index 217c6dfbc2..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Pine_leaf_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:562e1b5fa8f7fb3ebbf0b5ae7dfd16d960a04df40d250403a4c45bb0f9346e5c -size 4205872 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plains_Cotton_Tree_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plains_Cotton_Tree_mat.mtl deleted file mode 100644 index c3cf0c06f4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plains_Cotton_Tree_mat.mtl +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plant_Glow_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plant_Glow_mat_matGroup.mtl deleted file mode 100644 index 288aa96b68..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_Plant_Glow_mat_matGroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_ground_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_ground_diff.tif deleted file mode 100644 index 4f506b3ac1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_ground_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:98f6e99396da3f5d08bb2294b35c646285d080703c75504da8e21d2508361cb5 -size 3157252 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_tree_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_tree_diff.tif deleted file mode 100644 index fdf5905779..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_background_tree_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:adbc1e9d5973f91de04b9168bbb339eb49a914cfa2138e2c2154255b334fc4f9 -size 4205878 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_02_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_02_diff.tif deleted file mode 100644 index 1b341395a7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_02_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7abec56acba29dc08b9e66b8e5d407c3fd49afc5944bfb6b6beea79dcf2c74ec -size 4202716 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_diff.tif deleted file mode 100644 index b995dcc6ca..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5b8374a26dba8bcd0eeb372543fb58664c3f1da1215bb04cc62f9594a90cde59 -size 4202716 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_sss.tif deleted file mode 100644 index 2c26f3235c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_leaf_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:52a5d75eda6184e4a0b74d6c2e46062aae11efa4d37cefade06aba3d54978b5e -size 4202716 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif deleted file mode 100644 index 10b299a6c7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d6a7892f3f1addf37cdc2a97a324a83ae7e746b2acc08d89f0718eeb529f9e2 -size 2104670 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif.exportsettings deleted file mode 100644 index c47c60591e..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif deleted file mode 100644 index 2e0efbfd52..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4f5de59ea377f32e7055f77d62618776f836acad9240d8a160259402ec2b6d3b -size 398684 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif.exportsettings deleted file mode 100644 index fa55f75e2d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_frond_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif deleted file mode 100644 index 42aba270d4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d20491c079fc02006c49e41635e1e429707748f34986a268b82ebae332661be -size 3157340 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif.exportsettings deleted file mode 100644 index d3713274e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_bush_privet_01_tile_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_lily_pad_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_lily_pad_matGroup.mtl deleted file mode 100644 index 77abfe59af..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_lily_pad_matGroup.mtl +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_river_weed_mat_matGroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_river_weed_mat_matGroup.mtl deleted file mode 100644 index af375fa1aa..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/AM_river_weed_mat_matGroup.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif deleted file mode 100644 index 26c2212748..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:165fdbf33b584093826e19f9089cfc46ead5e07d3f3dbcbbe35be670eec40079 -size 3418 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif.exportsettings deleted file mode 100644 index d1103c9959..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/Grass_UpNormals_01_ddn.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /preset=Normals /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_01_group.cgf deleted file mode 100644 index 7fe1919b3a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:76be26ad66e2b47e98e5b8fa56435b9eabce839e96a438be621c877c1ce66b00 -size 715168 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_mat_yellow.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_mat_yellow.mtl deleted file mode 100644 index 1dd48f3950..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_aspen_mat_yellow.mtl +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_background_tree.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_background_tree.cgf deleted file mode 100644 index ae53fa5280..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_background_tree.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:177e1569b23c5c98da83bd97351c62d161e5477d525e7928407b0ba2f2ca9df8 -size 15720 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bullrush_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bullrush_mat.mtl deleted file mode 100644 index 267854841b..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bullrush_mat.mtl +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bulrush_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bulrush_group.cgf deleted file mode 100644 index 296a5961fb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bulrush_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4c15da281732cf3e7111d35e4de827afb844bf0343647718a27a350b9e994925 -size 39028 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_dark_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_dark_mat.mtl deleted file mode 100644 index b9e0ab6ca7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_dark_mat.mtl +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_group.cgf deleted file mode 100644 index da30792922..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:15d90afc836a09d97c814154ebd2bd88a613174b2a9729b3edd50b397fe148fc -size 109112 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_frond_m_matgroup_0.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_frond_m_matgroup_0.mtl deleted file mode 100644 index 19e7b7977a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_frond_m_matgroup_0.mtl +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_group.cgf deleted file mode 100644 index 060ccc428f..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5486107fb48c6cf3581be0927572f1f1a564b1923cf2bf0be88203ffafe5bfde -size 275084 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_02_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_02_group.cgf deleted file mode 100644 index 26408f4a35..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_bush_privet_02_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f663b5816c22cc255a7ede0f98ee28068298d3595ea7473b192e12a22503433 -size 227956 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_cedar_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_cedar_group.cgf deleted file mode 100644 index 9a95c2a68c..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_cedar_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:36a1c7454a1a871265fb92e3e46ed17c622a79b0482e3966edd4cb0500ebd4b2 -size 507768 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_dead_tree.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_dead_tree.cgf deleted file mode 100644 index ff6d607cdf..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_dead_tree.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7d14208210b910345427dab0cfae72c79c82c130704fe7cca4707304483bdf1a -size 156912 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_doc_plant_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_doc_plant_group.cgf deleted file mode 100644 index bb4c35084a..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_doc_plant_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ae75cf18cadc276edc1f0bf5027d2c110f876f8d17c57affeee03106bf304132 -size 50334 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_fernbush_large_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_fernbush_large_01_group.cgf deleted file mode 100644 index 7bde8692e3..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_fernbush_large_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:4cbf83c15715d9eeea8e876fde2064be864cfdfedc641e12991c23ff5ad4457c -size 64034 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_01_plain_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_01_plain_group.cgf deleted file mode 100644 index 6e72c205a9..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_01_plain_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0b24a5f3063d0493122c63dc22e50c83b57c17da957a65a8c21755d2370edb07 -size 28422 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_02_plants_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_02_plants_group.cgf deleted file mode 100644 index cf8be94fbe..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_02_plants_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2bd7ca192218eb78cb776380e1a0eac68a0645c41d4f1106547d538ce031c69d -size 21684 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_03_seeds_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_03_seeds_group.cgf deleted file mode 100644 index eef3d5bf00..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_03_seeds_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:64e3ec87a7560a48a95d97773b83ab7bc6b9fb5722bb0c267b934681e06685e6 -size 27600 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_pink_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_pink_group.cgf deleted file mode 100644 index a2ee54e335..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_pink_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b40be4432945aeb1b65bfa1a653793fc4b4f1e0650e8ebdba299a0b064ddfdda -size 6296 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_purple_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_purple_group.cgf deleted file mode 100644 index 69911eb454..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_purple_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:75ae3ada964d36d5b7f5af221764c66b051579e5fd07c4e77852fe29e9450767 -size 6864 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_red_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_red_group.cgf deleted file mode 100644 index ea3e523697..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_red_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e17bbad3a426336c666d355dad5fed4c432a3f3737bc531db22cd3a8115b3ba0 -size 6696 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_white_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_white_group.cgf deleted file mode 100644 index d74ce78327..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_white_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3e31927aedbea03862af50a02317df057f88af1c1d9ed93cdb68eeaba29c3054 -size 12636 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_yellow_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_yellow_group.cgf deleted file mode 100644 index 55f765c996..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_flower_yellow_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b8a9bc8902cc3d7d146a67c5e38e9c60121337dd3f91c7ebf52c8ec605651c66 -size 12636 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_long_matgroup.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_long_matgroup.mtl deleted file mode 100644 index 0634a3835d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_long_matgroup.mtl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_01_group.cgf deleted file mode 100644 index 5568cf33dc..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:63648c616bbe1353711c670e636b92c8e5c98f002091e1748b5e87ab62b238da -size 14332 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_02_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_02_group.cgf deleted file mode 100644 index f1fcb383ab..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tall_02_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0d158c6c6bc531ee658befdc0971835089eb071e59b90e7227dfa18f255f1192 -size 33480 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_03_mat_matgroup_0.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_03_mat_matgroup_0.mtl deleted file mode 100644 index 88e3a700ee..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_03_mat_matgroup_0.mtl +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_04_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_04_group.cgf deleted file mode 100644 index d220b82dcb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_04_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:a0520114675473f43c13690c76f0e37228a8d05549dd151b79b0b87e18b1d503 -size 26394 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_group.cgf deleted file mode 100644 index bb1e5077ba..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_grass_tuft_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f2ccd3405bc0bf35db977637188367c70228719f5edcb9de0bce2726d2580b40 -size 29454 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_groundcover_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_groundcover_01_group.cgf deleted file mode 100644 index 65c5189a59..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_groundcover_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:922e8ebe048774c5fb8d4d66a3666588f8d671daeeb2933bf36b45615652f78f -size 52156 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_01_group.cgf deleted file mode 100644 index 1863e633ca..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:19e9ad18c00c71897c371f9723380db9401e763b16cadf5d38e7a8bc5bdd624b -size 10668 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_02_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_02_group.cgf deleted file mode 100644 index 7027ac07fb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_02_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b3dd1d6d01e4c8e30d1c6b5226867d68e2dde418166317f193195eaa937f26dc -size 14052 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_03_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_03_group.cgf deleted file mode 100644 index 6cd110ff7d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_03_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:99eabd8e5060b0023b3be1e1ca5dddb86fd65c4acace6c090ac461cba3d95762 -size 7124 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_04_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_04_group.cgf deleted file mode 100644 index e8086784d4..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_04_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:85458f1f2fe5d2f977fc6ab7e3199aa635e74183dcc420498cb4ad710bf24cec -size 59254 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_bush_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_bush_01_group.cgf deleted file mode 100644 index 68f2d73738..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_bush_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:44ad70bd59c3dc4ec5a3a8a8369d83d5ca3241afa7650b22852b931c874a9a1d -size 42322 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_long.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_long.cgf deleted file mode 100644 index 0243dc1f0b..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_ivy_long.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b88087f80a6a3deec0594bf09c201106676478f9bb4f478ab4895e29fb092497 -size 63368 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_01.cgf deleted file mode 100644 index 9cae8ac670..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:38155d7473531e264eefb3ba8891922c81bd339532eeb5902d1e221f7042624c -size 2552 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_02.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_02.cgf deleted file mode 100644 index 1e010f1dcb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_02.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:e6053bcb55c27dfc8bd891f56aa23d547554d72f6596bc4c93597f2e897b7c68 -size 2552 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_03.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_03.cgf deleted file mode 100644 index 235e4db7cb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_03.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2524413667bc35ba60f3027318913d9d9c679513def8e4b6992e444e51749a10 -size 2040 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_flower.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_flower.cgf deleted file mode 100644 index 6d51eea7db..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_lily_flower.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:407963fd76e158b83ef9293b91888ee1f0b4d814fe7f8736237390a98e6d3415 -size 2860 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_nettle_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_nettle_01_group.cgf deleted file mode 100644 index 9c2da6a7bb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_nettle_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:df849ae3b6ae8d6ee3a1d4fdacbae436153576189afe36cafe8653ffc21ec897 -size 126432 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_group.cgf deleted file mode 100644 index ca3f14dbaa..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:27606342bb753fa98656f1da1fb891d30d62a2760355e8815b97ec5e2c5c88f0 -size 490012 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_mat.mtl deleted file mode 100644 index e738a17f12..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_mat.mtl +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_red.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_red.cgf deleted file mode 100644 index 100b8c3bc0..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_oak_red.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ad428b3b85ec11a4f83af84f4966bcb31befc004c98632cfd3691af029cc36c9 -size 285852 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_01_group.cgf deleted file mode 100644 index b682aa80c5..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7b8b7d5feb4a168137f91e03e483003409b2c2745ec7df1c4d0b1ea98df1d630 -size 407972 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_02_mat.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_02_mat.mtl deleted file mode 100644 index a97ae48112..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_02_mat.mtl +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_tall_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_tall_group.cgf deleted file mode 100644 index ec8b9a1a47..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_pine_tall_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:13bf62d79dad530ab99f3a12731b6cab4bbd76241b1be1c8c6df62cb75f87c22 -size 239428 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plains_cotton_tree_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plains_cotton_tree_group.cgf deleted file mode 100644 index 95fa1c5db7..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plains_cotton_tree_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:ec3fabb6fff04e811019da6b36295dfd6d5f32c3bee564b0f4ffc5c5a3e48e4d -size 643488 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_01.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_01.cgf deleted file mode 100644 index 4e225b2b50..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_01.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7288baa62e0bbdaa709c16d0b7e59d493f1c23a081b375311020dc5be2cb2253 -size 107736 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif deleted file mode 100644 index b05d213f38..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:b2caec724b491f07e4e193ef314b078c8cbe0fb797781ccc153b3e4d33702415 -size 4205876 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif.exportsettings deleted file mode 100644 index 749595194d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_diff.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=AlbedoWithGenericAlpha /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif deleted file mode 100644 index 7c1cb35afb..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3176cda0bbb954a9996ac0bdd9f29b220de4c050df82b24a9085a46440b4b0e9 -size 793936 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif.exportsettings deleted file mode 100644 index d3713274e6..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_e.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Albedo /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large.cgf deleted file mode 100644 index 90316c0b13..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:c76b941ac0fb36fa2dda7401de545158b70b6537120e1d11691d6f3ca77c3238 -size 74972 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large_diff.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large_diff.tif deleted file mode 100644 index 6169e21d6d..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_large_diff.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:2105ea09aebb8499eb0544e1b37e1c78879e7d379d4e77cd1b284527f1aff79e -size 12602676 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif deleted file mode 100644 index a328e7d6d1..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:9f0249428ad3b34485c5502406683a5a6ec26a7b828172bcfe333c0ccce79911 -size 4205908 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif.exportsettings b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif.exportsettings deleted file mode 100644 index 79d1c5dd92..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_plant_glow_sss.tif.exportsettings +++ /dev/null @@ -1 +0,0 @@ -/autooptimizefile=0 /M=50,50,0,50,50,50 /preset=Opacity /reduce=0 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_river_weed.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_river_weed.cgf deleted file mode 100644 index 3df2d6d813..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_river_weed.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:7146617f34b35f22d47fa8809148032c9e46818fdb314eeaafa22ed9f5281a1f -size 23538 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_root_01_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_root_01_group.cgf deleted file mode 100644 index a462ee98cf..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_root_01_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:0fc38445339f5509148a689635b430336fba6403995b95aea515d871bf1f2c55 -size 100012 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_tree_fallen_group.cgf b/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_tree_fallen_group.cgf deleted file mode 100644 index e1538ef3ea..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Natural/Vegetation/am_tree_fallen_group.cgf +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:8e9657338ae434a201bea21b272345bef6bd6c4704231adde9decfba6942292f -size 134100 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.fbx b/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.fbx deleted file mode 100644 index 80af698dca..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.fbx +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:3bb9e74140f9de19ae9fd6bd37e29719099d331dfb4c3ea64c8947fcc756eec5 -size 180435 diff --git a/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.mtl b/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.mtl deleted file mode 100644 index 69dc897362..0000000000 --- a/Gems/Vegetation_Gem_Assets/Assets/Objects/Test/LOD_Test.mtl +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/Gems/Vegetation_Gem_Assets/CMakeLists.txt b/Gems/Vegetation_Gem_Assets/CMakeLists.txt deleted file mode 100644 index a410a242c7..0000000000 --- a/Gems/Vegetation_Gem_Assets/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -# -# 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. -# - -# This will export its "SourcePaths" to the generated "cmake_dependencies..assetbuilder.setreg" -if(PAL_TRAIT_BUILD_HOST_TOOLS) - ly_create_alias(NAME Vegetation_Gem_Assets.Builders NAMESPACE Gem) -endif() diff --git a/Gems/Vegetation_Gem_Assets/gem.json b/Gems/Vegetation_Gem_Assets/gem.json deleted file mode 100644 index 696dc04557..0000000000 --- a/Gems/Vegetation_Gem_Assets/gem.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "gem_name": "Vegetation_Gem_Assets", - "GemFormatVersion": 3, - "Uuid": "14c5dc793cd0449882dfde50ec2ffadf", - "Name": "Vegetation_Gem_Assets", - "DisplayName": "Vegetation_Gem_Assets", - "Version": "0.1.0", - "LinkType": "NoCode", - "Summary": "An Asset Gem full of Vegetation Models and other assets and samples useful to testing and development of the Vegetation Gem (mostly full of assets scabbed from StarterGame)", - "Tags": ["Asset"], - "IconPath": "preview.png" -} diff --git a/Gems/Vegetation_Gem_Assets/preview.png b/Gems/Vegetation_Gem_Assets/preview.png deleted file mode 100644 index 2f1ed47754..0000000000 --- a/Gems/Vegetation_Gem_Assets/preview.png +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:6d6204c6730e5675791765ca194e9b1cbec282208e280507de830afc2805e5fa -size 41127 diff --git a/engine.json b/engine.json index 8449e763a9..54dd8a841e 100644 --- a/engine.json +++ b/engine.json @@ -82,7 +82,6 @@ "Gems/Twitch", "Gems/UiBasics", "Gems/Vegetation", - "Gems/Vegetation_Gem_Assets", "Gems/VideoPlaybackFramework", "Gems/VirtualGamepad", "Gems/WhiteBox" From db92dffb14447e0da60cfbc7388c25f30074d10c Mon Sep 17 00:00:00 2001 From: Mike Balfour <82224783+mbalfour-amzn@users.noreply.github.com> Date: Tue, 22 Jun 2021 15:20:28 -0500 Subject: [PATCH 78/91] Fix Vegetation Modifier behavior when in-game (#1441) * Removed a bit of dead legacy code * Fixed entity references during spawning Entities that had references to other entities that hadn't been spawned yet weren't getting their IDs remapped correctly, since the new ID wasn't available yet. By pre-generating the full set of IDs, the references now remap correctly. * Fixed up Entity References to work across multiple SpawnEntities calls With SpawnEntities, entity references need to forward-reference to the *first* entity spawned, then from that point on backwards-reference to the *last* entity spawned. Added that logic, along with some initial unit tests for SpawnAllEntities. * Added more unit tests for SpawnEntities / SpawnAllEntities --- .../Spawnable/SpawnableEntitiesInterface.h | 12 +- .../Spawnable/SpawnableEntitiesManager.cpp | 109 ++++-- .../Spawnable/SpawnableEntitiesManager.h | 25 ++ .../SpawnableEntitiesManagerTests.cpp | 359 ++++++++++++++++++ .../Editor/EditorVegetationComponentBase.h | 7 - .../Editor/EditorVegetationComponentBase.inl | 20 - 6 files changed, 471 insertions(+), 61 deletions(-) diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h index 8236683163..d50e239f9a 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesInterface.h @@ -198,11 +198,13 @@ namespace AzFramework AZ::SerializeContext* m_serializeContext{ nullptr }; //! The priority at which this call will be executed. SpawnablePriority m_priority{ SpawnablePriority_Default }; - //! Entity references are resolved by referring to the last entity spawned from a template entity in the spawnable. If this - //! is set to false entities from previous spawn calls are not taken into account. If set to true entity references may be - //! resolved to a previously spawned entity. A lookup table has to be constructed when true, which may negatively impact - //! performance, especially if a large number of entities are present on a ticket. - bool m_referencePreviouslySpawnedEntities{ false }; + //! Entity references are resolved by referring to the most recent entity spawned from a template entity in the spawnable. + //! If the entity referred to hasn't been spawned yet, the reference will be resolved to the first one that *will* be spawned. + //! If this flag is set to "true", the id mappings will persist across SpawnEntites calls, and the entity references will resolve + //! correctly across them. + //! When "false", the entity id mappings will be reset on this call, so entity references will only work within this call, or + //! potentially with any subsequent SpawnEntities call where the flag is true once again. + bool m_referencePreviouslySpawnedEntities{ true }; }; struct DespawnAllEntitiesOptionalArgs final diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp index d6d005a944..8cbc60d94e 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.cpp @@ -250,10 +250,47 @@ namespace AzFramework AZ::Entity* SpawnableEntitiesManager::CloneSingleEntity(const AZ::Entity& entityTemplate, EntityIdMap& templateToCloneMap, AZ::SerializeContext& serializeContext) { - return AZ::IdUtils::Remapper::CloneObjectAndGenerateNewIdsAndFixRefs( + // If the same ID gets remapped more than once, preserve the original remapping instead of overwriting it. + constexpr bool allowDuplicateIds = false; + + return AZ::IdUtils::Remapper::CloneObjectAndGenerateNewIdsAndFixRefs( &entityTemplate, templateToCloneMap, &serializeContext); } + void SpawnableEntitiesManager::InitializeEntityIdMappings( + const Spawnable::EntityList& entities, EntityIdMap& idMap, AZStd::unordered_set& previouslySpawned) + { + // Make sure we don't have any previous data lingering around. + idMap.clear(); + previouslySpawned.clear(); + + idMap.reserve(entities.size()); + previouslySpawned.reserve(entities.size()); + + for (auto& entity : entities) + { + idMap.emplace(entity->GetId(), AZ::Entity::MakeId()); + } + } + + void SpawnableEntitiesManager::RefreshEntityIdMapping( + const AZ::EntityId& entityId, EntityIdMap& idMap, AZStd::unordered_set& previouslySpawned) + { + if (previouslySpawned.contains(entityId)) + { + // This entity has already been spawned at least once before, so we need to generate a new id for it and + // preserve the new id to fix up any future entity references to this entity. + idMap[entityId] = AZ::Entity::MakeId(); + } + else + { + // This entity hasn't been spawned yet, so use the first id we've already generated for this entity and mark + // it as spawned so we know not to reuse this id next time. + previouslySpawned.emplace(entityId); + } + } + + bool SpawnableEntitiesManager::ProcessRequest(SpawnAllEntitiesCommand& request) { Ticket& ticket = *request.m_ticket; @@ -269,18 +306,24 @@ namespace AzFramework const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); size_t entitiesToSpawnSize = entitiesToSpawn.size(); - // Map keeps track of ids from template (spawnable) to clone (instance) - // Allowing patch ups of fields referring to entityIds outside of a given entity - EntityIdMap templateToCloneEntityIdMap; - // Reserve buffers spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); spawnedEntityIndices.reserve(spawnedEntityIndices.size() + entitiesToSpawnSize); - templateToCloneEntityIdMap.reserve(entitiesToSpawnSize); + + // Pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, + // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. + // We clear out and regenerate the set of IDs on every SpawnAllEntities call, because presumably every entity reference + // in every entity we're about to instantiate is intended to point to an entity in our newly-instantiated batch, regardless + // of spawn order. If we didn't clear out the map, it would be possible for some entities here to have references to + // previously-spawned entities from a previous SpawnEntities or SpawnAllEntities call. + InitializeEntityIdMappings(entitiesToSpawn, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); for (size_t i = 0; i < entitiesToSpawnSize; ++i) { - AZ::Entity* clone = CloneSingleEntity(*entitiesToSpawn[i], templateToCloneEntityIdMap, *request.m_serializeContext); + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping(entitiesToSpawn[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + AZ::Entity* clone = CloneSingleEntity(*entitiesToSpawn[i], ticket.m_entityIdReferenceMap, *request.m_serializeContext); AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); spawnedEntities.emplace_back(clone); @@ -337,21 +380,17 @@ namespace AzFramework const Spawnable::EntityList& entitiesToSpawn = ticket.m_spawnable->GetEntities(); size_t entitiesToSpawnSize = request.m_entityIndices.size(); - // Reconstruct the template to entity mapping. - EntityIdMap templateToCloneEntityIdMap; - if (!request.m_referencePreviouslySpawnedEntities) + if (ticket.m_entityIdReferenceMap.empty() || !request.m_referencePreviouslySpawnedEntities) { - templateToCloneEntityIdMap.reserve(entitiesToSpawnSize); - } - else - { - templateToCloneEntityIdMap.reserve(spawnedEntitiesInitialCount + entitiesToSpawnSize); - SpawnableConstIndexEntityContainerView indexEntityView( - spawnedEntities.begin(), spawnedEntityIndices.begin(), spawnedEntities.size()); - for (auto& entry : indexEntityView) - { - templateToCloneEntityIdMap.insert_or_assign(entitiesToSpawn[entry.GetIndex()]->GetId(), entry.GetEntity()->GetId()); - } + // This map keeps track of ids from template (spawnable) to clone (instance) allowing patch ups of fields referring + // to entityIds outside of a given entity. + // We pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, + // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. + // By default, we only initialize this map once because it needs to persist across multiple SpawnEntities calls, so + // that reference fixups work even when the entity being referenced is spawned in a different SpawnEntities + // (or SpawnAllEntities) call. + // However, the caller can also choose to reset the map by passing in "m_referencePreviouslySpawnedEntities = false". + InitializeEntityIdMappings(entitiesToSpawn, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); } spawnedEntities.reserve(spawnedEntities.size() + entitiesToSpawnSize); @@ -361,7 +400,12 @@ namespace AzFramework { if (index < entitiesToSpawn.size()) { - AZ::Entity* clone = CloneSingleEntity(*entitiesToSpawn[index], templateToCloneEntityIdMap, *request.m_serializeContext); + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping( + entitiesToSpawn[index].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + AZ::Entity* clone = + CloneSingleEntity(*entitiesToSpawn[index], ticket.m_entityIdReferenceMap, *request.m_serializeContext); AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); spawnedEntities.push_back(clone); @@ -451,9 +495,11 @@ namespace AzFramework ticket.m_spawnedEntities.clear(); const Spawnable::EntityList& entities = request.m_spawnable->GetEntities(); - // Map keeps track of ids from template (spawnable) to clone (instance) - // Allowing patch ups of fields referring to entityIds outside of a given entity - EntityIdMap templateToCloneEntityIdMap; + // Pre-generate the full set of entity id to new entity id mappings, so that during the clone operation below, + // any entity references that point to a not-yet-cloned entity will still get their ids remapped correctly. + // This map is intentionally cleared out and regenerated here to ensure that we're starting fresh with mappings that + // match the new set of template entities getting spawned. + InitializeEntityIdMappings(entities, ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); if (ticket.m_loadAll) { @@ -461,11 +507,13 @@ namespace AzFramework // to spawn every entity, simply start over. ticket.m_spawnedEntityIndices.clear(); size_t entitiesToSpawnSize = entities.size(); - templateToCloneEntityIdMap.reserve(entitiesToSpawnSize); for (size_t i = 0; i < entitiesToSpawnSize; ++i) { - AZ::Entity* clone = CloneSingleEntity(*entities[i], templateToCloneEntityIdMap, *request.m_serializeContext); + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping(entities[i].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + AZ::Entity* clone = CloneSingleEntity(*entities[i], ticket.m_entityIdReferenceMap, *request.m_serializeContext); AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); ticket.m_spawnedEntities.push_back(clone); @@ -475,7 +523,7 @@ namespace AzFramework else { size_t entitiesSize = entities.size(); - templateToCloneEntityIdMap.reserve(entitiesSize); + for (size_t index : ticket.m_spawnedEntityIndices) { // It's possible for the new spawnable to have a different number of entities, so guard against this. @@ -483,7 +531,10 @@ namespace AzFramework // detected and will result in the incorrect entities being spawned. if (index < entitiesSize) { - AZ::Entity* clone = CloneSingleEntity(*entities[index], templateToCloneEntityIdMap, *request.m_serializeContext); + // If this entity has previously been spawned, give it a new id in the reference map + RefreshEntityIdMapping(entities[index].get()->GetId(), ticket.m_entityIdReferenceMap, ticket.m_previouslySpawned); + + AZ::Entity* clone = CloneSingleEntity(*entities[index], ticket.m_entityIdReferenceMap, *request.m_serializeContext); AZ_Assert(clone != nullptr, "Failed to clone spawnable entity."); ticket.m_spawnedEntities.push_back(clone); } diff --git a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h index 5f659182d3..0c3f1c9ef5 100644 --- a/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h +++ b/Code/Framework/AzFramework/AzFramework/Spawnable/SpawnableEntitiesManager.h @@ -85,6 +85,22 @@ namespace AzFramework AZ_CLASS_ALLOCATOR(Ticket, AZ::ThreadPoolAllocator, 0); static constexpr uint32_t Processing = AZStd::numeric_limits::max(); + //! Map of template entity ids to their associated instance ids. + //! Tickets can be used to spawn the same template entities multiple times, in any order, across multiple calls. + //! Since template entities can reference other entities, this map is used to fix up those references across calls + //! using the following policy: + //! - Entities referencing an entity that hasn't been spawned yet will get a reference to the id that *will* be used + //! the first time that entity will be spawned. The reference will be invalid until that entity is spawned, but + //! will be valid if/when it gets spawned. + //! - Entities referencing an entity that *has* been spawned will get a reference to the id that was *last* used to + //! spawn the entity. + //! Note that this implies a certain level of non-determinism when spawning across calls, because the entity references + //! will be based on the order in which the SpawnEntity calls occur, which can be affected by things like priority. + EntityIdMap m_entityIdReferenceMap; + //! For this to work, we also need to keep track of whether or not each entity has been spawned at least once, so we know + //! whether or not to replace the id in the map when spawning a new instance of that entity. + AZStd::unordered_set m_previouslySpawned; + AZStd::vector m_spawnedEntities; AZStd::vector m_spawnedEntityIndices; AZ::Data::Asset m_spawnable; @@ -194,6 +210,15 @@ namespace AzFramework bool ProcessRequest(BarrierCommand& request); bool ProcessRequest(DestroyTicketCommand& request); + //! Generate a base set of original-to-new entity ID mappings to use during spawning. + //! Since Entity references get fixed up on an entity-by-entity basis while spawning, it's important to have the complete + //! set of new IDs available right at the start. This way, entities that refer to other entities that haven't spawned yet + //! will still get their references remapped correctly. + void InitializeEntityIdMappings( + const Spawnable::EntityList& entities, EntityIdMap& idMap, AZStd::unordered_set& previouslySpawned); + void RefreshEntityIdMapping( + const AZ::EntityId& entityId, EntityIdMap& idMap, AZStd::unordered_set& previouslySpawned); + Queue m_highPriorityQueue; Queue m_regularPriorityQueue; diff --git a/Code/Framework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp b/Code/Framework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp index f0614aa13b..462cf949b0 100644 --- a/Code/Framework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp +++ b/Code/Framework/Tests/Spawnable/SpawnableEntitiesManagerTests.cpp @@ -32,6 +32,33 @@ namespace UnitTest } }; + // Test component that has a reference to a different entity for use in validating per-instance entity id fixups. + class ComponentWithEntityReference : public AZ::Component + { + public: + AZ_COMPONENT(ComponentWithEntityReference, "{CF5FDE59-86E5-40B6-9272-BBC1C4AFD061}"); + + void Activate() override + { + } + + void Deactivate() override + { + } + + static void Reflect(AZ::ReflectContext* reflection) + { + if (auto* serializeContext = azrtti_cast(reflection)) + { + serializeContext->Class() + ->Field("EntityReference", &ComponentWithEntityReference::m_entityReference) + ; + } + } + + AZ::EntityId m_entityReference; + }; + class SpawnableEntitiesManagerTest : public AllocatorsFixture { public: @@ -42,6 +69,8 @@ namespace UnitTest m_application = new TestApplication(); AZ::ComponentApplication::Descriptor descriptor; m_application->Start(descriptor); + m_application->RegisterComponentDescriptor(ComponentWithEntityReference::CreateDescriptor()); + // Without this, the user settings component would attempt to save on finalize/shutdown. Since the file is // shared across the whole engine, if multiple tests are run in parallel, the saving could cause a crash // in the unit tests. @@ -80,6 +109,7 @@ namespace UnitTest void FillSpawnable(size_t numElements) { AzFramework::Spawnable::EntityList& entities = m_spawnable->GetEntities(); + entities.clear(); entities.reserve(numElements); for (size_t i=0; iGetEntities(); + size_t numElements = entities.size(); + for (size_t i = 0; i < numElements; ++i) + { + AZStd::unique_ptr& entity = entities[i]; + auto component = entity->CreateComponent(); + switch (refScheme) + { + case EntityReferenceScheme::AllReferenceFirst : + component->m_entityReference = entities[0]->GetId(); + break; + case EntityReferenceScheme::AllReferenceLast: + component->m_entityReference = entities[numElements - 1]->GetId(); + break; + case EntityReferenceScheme::AllReferenceThemselves: + component->m_entityReference = entities[i]->GetId(); + break; + case EntityReferenceScheme::AllReferenceNextCircular: + component->m_entityReference = entities[(i + 1) % numElements]->GetId(); + break; + case EntityReferenceScheme::AllReferencePreviousCircular: + component->m_entityReference = entities[(i + numElements - 1) % numElements]->GetId(); + break; + } + } + } + + // Verify that the entity references are pointing to the correct other entities within the same spawn batch. + // A "spawn batch" is the set of entities produced for each SpawnAllEntities command. + void ValidateEntityReferences( + EntityReferenceScheme refScheme, size_t entitiesPerBatch, AzFramework::SpawnableConstEntityContainerView entities) + { + size_t numElements = entities.size(); + + for (size_t i = 0; i < numElements; ++i) + { + // Calculate the element offset that's the start of each batch of entities spawned. + size_t curSpawnBatch = i / entitiesPerBatch; + size_t curBatchOffset = curSpawnBatch * entitiesPerBatch; + size_t curBatchIndex = i - curBatchOffset; + + const AZ::Entity* const entity = *(entities.begin() + i); + + auto component = entity->FindComponent(); + ASSERT_NE(nullptr, component); + AZ::EntityId comparisonId; + // Ids should be local to a batch, so each of these will be compared within a batch of entities, not globally across + // the entire set. + switch (refScheme) + { + case EntityReferenceScheme::AllReferenceFirst: + // Compare against the first entity in each batch + comparisonId = (*(entities.begin() + curBatchOffset))->GetId(); + break; + case EntityReferenceScheme::AllReferenceLast: + // Compare against the last entity in each batch + comparisonId = (*(entities.begin() + curBatchOffset + (entitiesPerBatch - 1)))->GetId(); + break; + case EntityReferenceScheme::AllReferenceThemselves: + // Compare against itself + comparisonId = entity->GetId(); + break; + case EntityReferenceScheme::AllReferenceNextCircular: + // Compare against the next entity in each batch, looping around so that the last entity in the batch should refer + // to the first entity in the batch. + comparisonId = (*(entities.begin() + curBatchOffset + ((curBatchIndex + 1) % entitiesPerBatch)))->GetId(); + break; + case EntityReferenceScheme::AllReferencePreviousCircular: + // Compare against the previous entity in each batch, looping around so that the first entity in the batch should refer + // to the last entity in the batch. + comparisonId = (*(entities.begin() + curBatchOffset + ((curBatchIndex + numElements - 1) % entitiesPerBatch)))->GetId(); + break; + } + EXPECT_EQ(comparisonId, component->m_entityReference); + } + }; + protected: AZ::Data::Asset* m_spawnableAsset { nullptr }; AzFramework::SpawnableEntitiesManager* m_manager { nullptr }; @@ -185,6 +303,73 @@ namespace UnitTest m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); } + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllEntitiesReferenceOtherEntities_EntityIdsAreMappedCorrectly) + { + // This tests that entity id references get mapped correctly in a SpawnAllEntities call whether they're forward referencing + // in the list, backwards referencing, or self-referencing. The circular tests are to ensure the implementation works regardless + // of entity ordering. + for (EntityReferenceScheme refScheme : { + EntityReferenceScheme::AllReferenceFirst, EntityReferenceScheme::AllReferenceLast, + EntityReferenceScheme::AllReferenceThemselves, EntityReferenceScheme::AllReferenceNextCircular, + EntityReferenceScheme::AllReferencePreviousCircular }) + { + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = [this, refScheme, NumEntities] + (AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + ValidateEntityReferences(refScheme, NumEntities, entities); + }; + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_AllEntitiesReferenceOtherEntities_EntityIdsOnlyReferWithinASingleCall) + { + // This tests that entity id references get mapped correctly with multiple SpawnAllEntities calls. Each call should only map + // the entities to other entities within the same call, regardless of forward or backward mapping. + // For example, suppose entities 1, 2, and 3 refer to 4. In the first SpawnAllEntities call, entities 1-3 will refer to 4. + // In the second SpawnAllEntities call, entities 1-3 will refer to the second 4, not the previously-spawned 4. + for (EntityReferenceScheme refScheme : + { EntityReferenceScheme::AllReferenceFirst, EntityReferenceScheme::AllReferenceLast, + EntityReferenceScheme::AllReferenceThemselves, EntityReferenceScheme::AllReferenceNextCircular, + EntityReferenceScheme::AllReferencePreviousCircular + }) + { + // Make sure we start with a fresh ticket each time, or else each iteration through this loop would continue to build up + // more and more entities. + delete m_ticket; + m_ticket = new AzFramework::EntitySpawnTicket(*m_spawnableAsset); + + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = [this, refScheme, NumEntities] + (AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + ValidateEntityReferences(refScheme, NumEntities, entities); + }; + + // Spawn twice. + constexpr size_t NumSpawnAllCalls = 2; + for (int spawns = 0; spawns < NumSpawnAllCalls; spawns++) + { + AzFramework::SpawnAllEntitiesOptionalArgs optionalArgs; + optionalArgs.m_completionCallback = AZStd::move(callback); + m_manager->SpawnAllEntities(*m_ticket, AZStd::move(optionalArgs)); + } + + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + } + TEST_F(SpawnableEntitiesManagerTest, SpawnAllEntities_DeleteTicketBeforeCall_NoCrash) { { @@ -363,6 +548,180 @@ namespace UnitTest m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); } + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllEntitiesReferenceOtherEntities_ForwardReferencesWorkInSingleCall) + { + constexpr EntityReferenceScheme refScheme = EntityReferenceScheme::AllReferenceNextCircular; + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = + [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + ValidateEntityReferences(refScheme, NumEntities, entities); + }; + + // Verify that by default, entities that refer to other entities that haven't been spawned yet have the correct references + // when the spawning all occurs in the same call + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3 }); + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllEntitiesReferenceOtherEntities_ForwardReferencesWorkAcrossCalls) + { + constexpr EntityReferenceScheme refScheme = EntityReferenceScheme::AllReferenceNextCircular; + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = + [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + ValidateEntityReferences(refScheme, NumEntities, entities); + }; + + // Verify that by default, entities that refer to other entities that haven't been spawned yet have the correct references + // even when the spawning is across multiple calls + m_manager->SpawnEntities(*m_ticket, { 0 }); + m_manager->SpawnEntities(*m_ticket, { 1 }); + m_manager->SpawnEntities(*m_ticket, { 2 }); + m_manager->SpawnEntities(*m_ticket, { 3 }); + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllEntitiesReferenceOtherEntities_ReferencesPointToFirstOrLatest) + { + // With SpawnEntities, entity references should either refer to the first entity that *will* be spawned, or the last entity + // that *has* been spawned. This test will create entities 0 1 2 3 that all refer to entity 3, and it will create two batches + // of those. In the first batch, they'll forward-reference. In the second batch, they should backward-reference, except for + // the second entity 3, which will now refer to itself as the last one that's been spawned. + constexpr EntityReferenceScheme refScheme = EntityReferenceScheme::AllReferenceLast; + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = + [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + size_t numElements = entities.size(); + + for (size_t i = 0; i < numElements; ++i) + { + const AZ::Entity* const entity = *(entities.begin() + i); + + auto component = entity->FindComponent(); + ASSERT_NE(nullptr, component); + AZ::EntityId comparisonId; + if (i < (numElements - 1)) + { + // There are two batches of NumEntities elements. Every entity should either forward-reference or backward-reference + // to the last entity of the first batch, except for the very last entity of the second batch, which should reference + // itself. + comparisonId = (*(entities.begin() + (NumEntities- 1)))->GetId(); + } + else + { + // The very last entity of the second batch should reference itself because it's now the latest instance of that + // entity to be spawned. + comparisonId = entity->GetId(); + } + + EXPECT_EQ(comparisonId, component->m_entityReference); + } + }; + + // Create 2 batches of forward references. In the first batch, entities 0 1 2 will point forward to 3. In the second batch, + // entities 0 1 2 will point *backward* to the first 3, and the second entity 3 will point to itself. + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3 }); + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3 }); + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllEntitiesReferenceOtherEntities_MultipleSpawnsInSameCallReferenceCorrectly) + { + // With SpawnEntities, entity references should either refer to the first entity that *will* be spawned, or the last entity + // that *has* been spawned. This test will create entities 0 1 2 3 that all refer to entity 3, and it will create three sets + // of those in the same call, with the following results: + // - The first 0 1 2 will forward-reference to the first 3 + // - The first 3 will reference itself + // - The second 0 1 2 will backwards-reference to the first 3 + // - The second 3 will reference itself + // - The third 0 1 2 will backwards-reference to the second 3 + // - The third 3 will reference itself + constexpr EntityReferenceScheme refScheme = EntityReferenceScheme::AllReferenceLast; + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = + [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + size_t numElements = entities.size(); + + for (size_t i = 0; i < numElements; ++i) + { + const AZ::Entity* const entity = *(entities.begin() + i); + + auto component = entity->FindComponent(); + ASSERT_NE(nullptr, component); + AZ::EntityId comparisonId; + + if (i < ((NumEntities * 2) - 1)) + { + // The first 7 entities (0 1 2 3 0 1 2) will all refer to the 4th one (1st '3'). + comparisonId = (*(entities.begin() + (NumEntities - 1)))->GetId(); + } + else if (i < (numElements - 1)) + { + // The next 4 entities (3 0 1 2) will all refer to the 8th one (2nd '3'). + comparisonId = (*(entities.begin() + ((NumEntities * 2) - 1)))->GetId(); + } + else + { + // The very last entity (3) will reference itself (3rd '3'). + comparisonId = entity->GetId(); + } + + EXPECT_EQ(comparisonId, component->m_entityReference); + } + }; + + // Create the 3 batches of entities 0, 1, 2, 3. The entity references should work as described at the top of the test. + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3, 0, 1, 2, 3, 0, 1, 2, 3 }); + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_AllEntitiesReferenceOtherEntities_OptionalFlagClearsReferenceMap) + { + constexpr EntityReferenceScheme refScheme = EntityReferenceScheme::AllReferenceLast; + constexpr size_t NumEntities = 4; + FillSpawnable(NumEntities); + CreateEntityReferences(refScheme); + + auto callback = + [this, refScheme, NumEntities](AzFramework::EntitySpawnTicket::Id, AzFramework::SpawnableConstEntityContainerView entities) + { + ValidateEntityReferences(refScheme, NumEntities, entities); + }; + + // By setting the "referencePreviouslySpawnedEntities" flag to false, the map will get cleared on each call, so in both batches + // the entities will forward-reference to the last entity in the batch. If the flag were true, entities 0 1 2 in the second + // batch would refer backwards to the first entity 3. + + AzFramework::SpawnEntitiesOptionalArgs optionalArgsSecondBatch; + optionalArgsSecondBatch.m_completionCallback = AZStd::move(callback); + optionalArgsSecondBatch.m_referencePreviouslySpawnedEntities = false; + + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3 }, optionalArgsSecondBatch); + m_manager->SpawnEntities(*m_ticket, { 0, 1, 2, 3 }, AZStd::move(optionalArgsSecondBatch)); + m_manager->ListEntities(*m_ticket, callback); + m_manager->ProcessQueue(AzFramework::SpawnableEntitiesManager::CommandQueuePriority::Regular); + } + TEST_F(SpawnableEntitiesManagerTest, SpawnEntities_DeleteTicketBeforeCall_NoCrash) { { diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.h b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.h index 3ad20b8f6a..cbf41f6bf8 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.h +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.h @@ -17,7 +17,6 @@ #include #include #include -#include namespace Vegetation { @@ -28,7 +27,6 @@ namespace Vegetation template class EditorVegetationComponentBase : public LmbrCentral::EditorWrappedComponentBase - , private CrySystemEventBus::Handler { public: using BaseClassType = LmbrCentral::EditorWrappedComponentBase; @@ -48,11 +46,6 @@ namespace Vegetation static void Reflect(AZ::ReflectContext* context); - //////////////////////////////////////////////////////////////////////////// - // CrySystemEvents - void OnCryEditorBeginLevelExport() override; - void OnCryEditorEndLevelExport(bool /*success*/) override; - protected: using BaseClassType::m_configuration; using BaseClassType::m_component; diff --git a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.inl b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.inl index 3a5afd1c27..93c253f212 100644 --- a/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.inl +++ b/Gems/Vegetation/Code/Include/Vegetation/Editor/EditorVegetationComponentBase.inl @@ -12,24 +12,6 @@ namespace Vegetation { - template - void EditorVegetationComponentBase::OnCryEditorEndLevelExport(bool /*success*/) - { - // Restore the activation state of our components after the export is complete. - if (m_visible) - { - m_component.Activate(); - } - } - - template - void EditorVegetationComponentBase::OnCryEditorBeginLevelExport() - { - // We need to deactivate our game components at the start of level exports because any vegetation meshes that are loaded - // or instances that are spawned can end up in our static vegetation level data. - m_component.Deactivate(); - } - template AZ::u32 EditorVegetationComponentBase::ConfigurationChanged() { @@ -69,13 +51,11 @@ namespace Vegetation { GradientSignal::SetSamplerOwnerEntity(m_configuration, GetEntityId()); BaseClassType::Activate(); - CrySystemEventBus::Handler::BusConnect(); } template void EditorVegetationComponentBase::Deactivate() { - CrySystemEventBus::Handler::BusDisconnect(); BaseClassType::Deactivate(); } From c78fa200ef533780a1dcd1484236744c62bfd41b Mon Sep 17 00:00:00 2001 From: AMZN-koppersr <82230785+AMZN-koppersr@users.noreply.github.com> Date: Tue, 22 Jun 2021 13:29:20 -0700 Subject: [PATCH 79/91] Addressed PR feedback. --- .../IO/Streamer/StorageDriveTests_Windows.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp index 9781b60543..ecf6873052 100644 --- a/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp +++ b/Code/Framework/AzCore/Tests/Platform/Windows/Tests/IO/Streamer/StorageDriveTests_Windows.cpp @@ -18,10 +18,6 @@ #include #include -#if defined(HAVE_BENCHMARK) -#include -#endif - #include #include @@ -1155,7 +1151,10 @@ namespace AZ::IO } } // namespace AZ::IO -#ifdef HAVE_BENCHMARK +#if defined(HAVE_BENCHMARK) + +#include + namespace Benchmark { class StorageDriveWindowsFixture : public benchmark::Fixture @@ -1259,7 +1258,8 @@ namespace Benchmark BENCHMARK_DEFINE_F(StorageDriveWindowsFixture, ReadsBaseline)(benchmark::State& state) { - SetupStreamer(false); + constexpr bool EnableFileSharing = false; + SetupStreamer(EnableFileSharing); RepeatedlyReadFile(state); } @@ -1267,7 +1267,8 @@ namespace Benchmark { using namespace AZ::IO; - SetupStreamer(true); + constexpr bool EnableFileSharing = true; + SetupStreamer(EnableFileSharing); RepeatedlyReadFile(state); } From f79cca6f9d61e35969d2b05437a253b7e11da926 Mon Sep 17 00:00:00 2001 From: AMZN-Olex <5432499+AMZN-Olex@users.noreply.github.com> Date: Mon, 21 Jun 2021 20:28:43 -0400 Subject: [PATCH 80/91] Corrects ReplicationSet to be ordered so that logic in EntityReplicationManager::UpdateWindow is correct --- .../Multiplayer/ReplicationWindows/IReplicationWindow.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/Multiplayer/Code/Include/Multiplayer/ReplicationWindows/IReplicationWindow.h b/Gems/Multiplayer/Code/Include/Multiplayer/ReplicationWindows/IReplicationWindow.h index 5d90fc286b..8e51c30b2c 100644 --- a/Gems/Multiplayer/Code/Include/Multiplayer/ReplicationWindows/IReplicationWindow.h +++ b/Gems/Multiplayer/Code/Include/Multiplayer/ReplicationWindows/IReplicationWindow.h @@ -14,7 +14,7 @@ #include #include -#include +#include namespace Multiplayer { @@ -24,7 +24,7 @@ namespace Multiplayer NetEntityRole m_netEntityRole = NetEntityRole::InvalidRole; float m_priority = 0.0f; }; - using ReplicationSet = AZStd::unordered_map; + using ReplicationSet = AZStd::map; class IReplicationWindow { From cca2b489d73adf5d23395af78698ce9556914f9a Mon Sep 17 00:00:00 2001 From: mriegger Date: Tue, 22 Jun 2021 13:53:31 -0700 Subject: [PATCH 81/91] better formatting and changes from feedback --- .../Code/Source/AtomDebugDisplayViewportInterface.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp index ccafbf2820..1233f3846c 100644 --- a/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp +++ b/Gems/AtomLyIntegration/AtomBridge/Code/Source/AtomDebugDisplayViewportInterface.cpp @@ -1160,8 +1160,8 @@ namespace AZ::AtomBridge // Draw 3 axis aligned circles const float stepAngle = DegToRad(11.25f); const float startAngle = DegToRad(0.0f); - const float stopAngle = DegToRad(360.0f) + startAngle; - SingleColorDynamicSizeLineHelper lines(2+static_cast(360.0f/11.25f)); // num disk segments + 1 for axis line + 1 for spare + const float stopAngle = DegToRad(360.0f); + SingleColorDynamicSizeLineHelper lines(2 + static_cast(360.0f / 11.25f)); // num disk segments + 1 for axis line + 1 for spare const AZ::Vector3 radiusV3 = AZ::Vector3(radius); CreateArbitraryAxisArc( lines, From cb2d64b205a06e42c02c1d671c516cf1753be7a3 Mon Sep 17 00:00:00 2001 From: SJ Date: Tue, 22 Jun 2021 15:31:52 -0700 Subject: [PATCH 82/91] Add parameters to specify custom native build path and enable unity build in Android gradle builds (#1494) * Add parameters to specify custom native build path and enable unity build in Android gradle builds * Enable unity build for gradle to shorten the path to the generated object files which fixes build failures on Jenkins due to paths exceeding limit. This also speeds up builds. --- .../Tools/Platform/Android/android_support.py | 18 +++++++++++++----- .../Android/generate_android_project.py | 13 ++++++++++++- .../build/Platform/Android/gradle_windows.cmd | 8 ++++---- 3 files changed, 29 insertions(+), 10 deletions(-) diff --git a/cmake/Tools/Platform/Android/android_support.py b/cmake/Tools/Platform/Android/android_support.py index 75e0cd2970..d4aff062ee 100755 --- a/cmake/Tools/Platform/Android/android_support.py +++ b/cmake/Tools/Platform/Android/android_support.py @@ -331,7 +331,7 @@ android_gradle_plugin={android_gradle_plugin_version} NATIVE_CMAKE_SECTION_ANDROID_FORMAT = """ externalNativeBuild {{ cmake {{ - buildStagingDirectory "." + buildStagingDirectory "{native_build_path}" version "{cmake_version}" path "{absolute_cmakelist_path}" }} @@ -447,8 +447,8 @@ class AndroidProjectGenerator(object): def __init__(self, engine_root, build_dir, android_sdk_path, build_tool, android_sdk_platform, android_native_api_level, android_ndk, project_path, third_party_path, cmake_version, override_cmake_path, override_gradle_path, gradle_version, gradle_plugin_version, - override_ninja_path, include_assets_in_apk, asset_mode, asset_type, signing_config, is_test_project=False, - overwrite_existing=True): + override_ninja_path, include_assets_in_apk, asset_mode, asset_type, signing_config, native_build_path, is_test_project=False, + overwrite_existing=True, unity_build_enabled=False): """ Initialize the object with all the required parameters needed to create an Android Project. The parameters should be verified before initializing this object @@ -509,6 +509,8 @@ class AndroidProjectGenerator(object): self.include_assets_in_apk = include_assets_in_apk + self.native_build_path = native_build_path + self.asset_mode = asset_mode self.asset_type = asset_type @@ -519,6 +521,8 @@ class AndroidProjectGenerator(object): self.overwrite_existing = overwrite_existing + self.unity_build_enabled = unity_build_enabled + def execute(self): """ Execute the android project creation workflow @@ -756,6 +760,9 @@ class AndroidProjectGenerator(object): template_engine_root = common.normalize_path_for_settings(self.engine_root) template_third_party_path = common.normalize_path_for_settings(self.third_party_path) template_ndk_path = common.normalize_path_for_settings(os.path.join(self.android_sdk_path, self.android_ndk.location)) + template_unity_build = 1 if self.unity_build_enabled else 0 + + native_build_path = pathlib.Path(self.native_build_path).resolve().as_posix() if self.native_build_path else '.' gradle_build_env = dict() @@ -766,7 +773,7 @@ class AndroidProjectGenerator(object): gradle_build_env['TARGET_TYPE'] = 'application' gradle_build_env['PROJECT_DEPENDENCIES'] = PROJECT_DEPENDENCIES_VALUE_FORMAT.format(dependencies='\n'.join(gradle_project_dependencies)) - gradle_build_env['NATIVE_CMAKE_SECTION_ANDROID'] = NATIVE_CMAKE_SECTION_ANDROID_FORMAT.format(cmake_version=str(self.cmake_version), absolute_cmakelist_path=absolute_cmakelist_path) + gradle_build_env['NATIVE_CMAKE_SECTION_ANDROID'] = NATIVE_CMAKE_SECTION_ANDROID_FORMAT.format(cmake_version=str(self.cmake_version), native_build_path=native_build_path, absolute_cmakelist_path=absolute_cmakelist_path) gradle_build_env['NATIVE_CMAKE_SECTION_DEFAULT_CONFIG'] = NATIVE_CMAKE_SECTION_DEFAULT_CONFIG_NDK_FORMAT_STR.format(abi=ANDROID_ARCH) gradle_build_env['OVERRIDE_JAVA_SOURCESET'] = OVERRIDE_JAVA_SOURCESET_STR.format(absolute_azandroid_path=absolute_azandroid_path) @@ -784,7 +791,8 @@ class AndroidProjectGenerator(object): f'"-S{template_engine_root}"', f'"-DCMAKE_BUILD_TYPE={native_config_lower}"', f'"-DCMAKE_TOOLCHAIN_FILE={template_engine_root}/cmake/Platform/Android/Toolchain_Android.cmake"', - f'"-DLY_3RDPARTY_PATH={template_third_party_path}"'] + f'"-DLY_3RDPARTY_PATH={template_third_party_path}"', + f'"-DLY_UNITY_BUILD={template_unity_build}"'] if not self.is_test_project: cmake_argument_list.append(f'"-DLY_PROJECTS={pathlib.PurePath(self.project_path).as_posix()}"') diff --git a/cmake/Tools/Platform/Android/generate_android_project.py b/cmake/Tools/Platform/Android/generate_android_project.py index 5a52ac385e..8e6adc0ecc 100755 --- a/cmake/Tools/Platform/Android/generate_android_project.py +++ b/cmake/Tools/Platform/Android/generate_android_project.py @@ -215,6 +215,11 @@ def main(args): default=None, required=False) + parser.add_argument('--native-build-path', + help='Custom path to place native build artifacts.', + default=None, + required=False) + # Asset Options parser.add_argument(INCLUDE_APK_ASSETS_ARGUMENT_NAME, action='store_true', @@ -258,6 +263,10 @@ def main(args): action='store_true', help='Option to overwrite existing scripts in the target build folder if they exist already.') + parser.add_argument('--enable-unity-build', + action='store_true', + help='Enable unity build') + parsed_args = parser.parse_args(args) wrap_parsed_args(parsed_args) @@ -395,7 +404,9 @@ def main(args): asset_type=parsed_args.get_argument(ASSET_TYPE_ARGUMENT_NAME), signing_config=signing_config, is_test_project=is_test_project, - overwrite_existing=parsed_args.overwrite_existing) + overwrite_existing=parsed_args.overwrite_existing, + unity_build_enabled=parsed_args.enable_unity_build, + native_build_path=parsed_args.native_build_path) generator.execute() diff --git a/scripts/build/Platform/Android/gradle_windows.cmd b/scripts/build/Platform/Android/gradle_windows.cmd index dd5285bdbf..4a91426094 100644 --- a/scripts/build/Platform/Android/gradle_windows.cmd +++ b/scripts/build/Platform/Android/gradle_windows.cmd @@ -135,11 +135,11 @@ IF "%GENERATE_SIGNED_APK%"=="true" ( ECHO Using keystore file at %CI_ANDROID_KEYSTORE_FILE_ABS% ) - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build --android-sdk-path=%ANDROID_HOME% %ANDROID_GRADLE_PLUGIN_OPTION% --signconfig-store-file %CI_ANDROID_KEYSTORE_FILE_ABS% --signconfig-store-password %CI_ANDROID_KEYSTORE_PASSWORD% --signconfig-key-alias %CI_ANDROID_KEYSTORE_ALIAS% --signconfig-key-password %CI_ANDROID_KEYSTORE_PASSWORD% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) ELSE ( - ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing - CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + ECHO [ci_build] %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% %GRADLE_OVERRIDE_OPTION% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing + CALL %PYTHON% cmake\Tools\Platform\Android\generate_android_project.py --engine-root=. --build-dir=%OUTPUT_DIRECTORY% -g %GAME_PROJECT% --gradle-install-path=%GRADLE_BUILD_HOME% --ninja-install-path=%LY_NINJA_PATH% --third-party-path=%LY_3RDPARTY_PATH% --enable-unity-build %ANDROID_GRADLE_PLUGIN_OPTION% --android-sdk-path=%ANDROID_HOME% %ADDITIONAL_GENERATE_ARGS% --overwrite-existing ) REM Validate the android project generation From 6557a14e360792b3beb5038a916dff72c8744c56 Mon Sep 17 00:00:00 2001 From: mriegger Date: Tue, 22 Jun 2021 16:12:38 -0700 Subject: [PATCH 83/91] small fix for debug cascades not working with bicubic --- .../ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli | 1 + 1 file changed, 1 insertion(+) diff --git a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli index 893df85e3e..03d00d21f9 100644 --- a/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli +++ b/Gems/Atom/Feature/Common/Assets/ShaderLib/Atom/Features/Shadow/DirectionalLightShadow.azsli @@ -427,6 +427,7 @@ float DirectionalLightShadow::SamplePcfBicubic() shadowCoord.y >= 0. && shadowCoord.y * size < size - PixelMargin && shadowCoord.z < 1. - DepthMargin) { + m_debugInfo.m_cascadeIndex = indexOfCascade; return SamplePcfBicubic(shadowCoord, indexOfCascade); } } From 35001eba0999e6a989066b165b09b219c42f7ed0 Mon Sep 17 00:00:00 2001 From: amzn-hdoke <61443753+hdoke@users.noreply.github.com> Date: Tue, 22 Jun 2021 16:31:46 -0700 Subject: [PATCH 84/91] Fix resource mappings file names and client auth warnings and asserts. Fix cdk permissions (#1487) * Fix resource mappings file names and client auth warnings and asserts conditions * Add comments to explain reasoning for client auth role permissions * Update comments based on feedback * Fix AWSClientAuth unit test --- ...e_mappings.json => default_aws_resource_mappings.json} | 0 .../Windows/aws_metrics/aws_metrics_automation_test.py | 2 +- .../AWS/Windows/client_auth/test_anonymous_credentials.py | 2 +- .../AWS/Windows/client_auth/test_password_signin.py | 2 +- AutomatedTesting/Registry/awscoreconfiguration.setreg | 2 +- .../Authentication/AWSCognitoAuthenticationProvider.cpp | 4 ++-- .../Authentication/AuthenticationProviderManager.cpp | 4 ++-- .../Authentication/GoogleAuthenticationProvider.cpp | 8 ++++---- .../Source/Authentication/LWAAuthenticationProvider.cpp | 8 ++++---- .../Authorization/AWSCognitoAuthorizationController.cpp | 4 ++-- .../AuthenticationProviderManagerScriptCanvasBusTest.cpp | 2 +- .../Authentication/AuthenticationProviderManagerTest.cpp | 2 +- Gems/AWSClientAuth/cdk/README.md | 7 +++++++ Gems/AWSClientAuth/cdk/auth/cognito_identity_pool_role.py | 7 +++++-- Gems/AWSClientAuth/cdk/auth/cognito_user_pool_sms_role.py | 8 +++++++- 15 files changed, 39 insertions(+), 23 deletions(-) rename AutomatedTesting/Config/{aws_resource_mappings.json => default_aws_resource_mappings.json} (100%) diff --git a/AutomatedTesting/Config/aws_resource_mappings.json b/AutomatedTesting/Config/default_aws_resource_mappings.json similarity index 100% rename from AutomatedTesting/Config/aws_resource_mappings.json rename to AutomatedTesting/Config/default_aws_resource_mappings.json diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py index 511d9b3ecd..d8fd8b145a 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/aws_metrics/aws_metrics_automation_test.py @@ -112,7 +112,7 @@ def remove_file(file_path: str) -> None: @pytest.mark.parametrize('project', ['AutomatedTesting']) @pytest.mark.parametrize('level', ['AWS/Metrics']) @pytest.mark.parametrize('feature_name', [AWS_METRICS_FEATURE_NAME]) -@pytest.mark.parametrize('resource_mappings_filename', ['aws_resource_mappings.json']) +@pytest.mark.parametrize('resource_mappings_filename', ['default_aws_resource_mappings.json']) @pytest.mark.parametrize('profile_name', ['AWSAutomationTest']) @pytest.mark.parametrize('region_name', ['us-west-2']) @pytest.mark.parametrize('assume_role_arn', ['arn:aws:iam::645075835648:role/o3de-automation-tests']) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py index f8aa5b85eb..a477e89821 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_anonymous_credentials.py @@ -36,7 +36,7 @@ logger = logging.getLogger(__name__) @pytest.mark.usefixtures('cdk') @pytest.mark.parametrize('feature_name', [AWS_CLIENT_AUTH_FEATURE_NAME]) @pytest.mark.usefixtures('resource_mappings') -@pytest.mark.parametrize('resource_mappings_filename', ['aws_resource_mappings.json']) +@pytest.mark.parametrize('resource_mappings_filename', ['default_aws_resource_mappings.json']) @pytest.mark.usefixtures('aws_utils') @pytest.mark.parametrize('region_name', ['us-west-2']) @pytest.mark.parametrize('assume_role_arn', ['arn:aws:iam::645075835648:role/o3de-automation-tests']) diff --git a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py index 28b17fdeee..a0bcf56b0d 100644 --- a/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py +++ b/AutomatedTesting/Gem/PythonTests/AWS/Windows/client_auth/test_password_signin.py @@ -35,7 +35,7 @@ logger = logging.getLogger(__name__) @pytest.mark.usefixtures('cdk') @pytest.mark.parametrize('feature_name', [AWS_CLIENT_AUTH_FEATURE_NAME]) @pytest.mark.usefixtures('resource_mappings') -@pytest.mark.parametrize('resource_mappings_filename', ['aws_resource_mappings.json']) +@pytest.mark.parametrize('resource_mappings_filename', ['default_aws_resource_mappings.json']) @pytest.mark.usefixtures('aws_utils') @pytest.mark.parametrize('region_name', ['us-west-2']) @pytest.mark.parametrize('assume_role_arn', ['arn:aws:iam::645075835648:role/o3de-automation-tests']) diff --git a/AutomatedTesting/Registry/awscoreconfiguration.setreg b/AutomatedTesting/Registry/awscoreconfiguration.setreg index b7c60b0fb9..1927909328 100644 --- a/AutomatedTesting/Registry/awscoreconfiguration.setreg +++ b/AutomatedTesting/Registry/awscoreconfiguration.setreg @@ -4,7 +4,7 @@ "AWSCore": { "ProfileName": "AWSAutomationTest", - "ResourceMappingConfigFileName": "aws_resource_mappings.json" + "ResourceMappingConfigFileName": "default_aws_resource_mappings.json" } } } \ No newline at end of file diff --git a/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.cpp b/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.cpp index 74865c0044..20f5bf68cc 100644 --- a/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authentication/AWSCognitoAuthenticationProvider.cpp @@ -146,12 +146,12 @@ namespace AWSClientAuth void AWSCognitoAuthenticationProvider::DeviceCodeGrantSignInAsync() { - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void AWSCognitoAuthenticationProvider::DeviceCodeGrantConfirmSignInAsync() { - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void AWSCognitoAuthenticationProvider::RefreshTokensAsync() diff --git a/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp index d4d2d0d67b..fe8c526a11 100644 --- a/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authentication/AuthenticationProviderManager.cpp @@ -53,7 +53,7 @@ namespace AWSClientAuth if (!m_settingsRegistry->MergeSettingsFile(resolvedPath.data(), AZ::SettingsRegistryInterface::Format::JsonMergePatch)) { - AZ_Error("AuthenticationProviderManager", true, "Error merging settings registry for path: %s", resolvedPath.data()); + AZ_Error("AuthenticationProviderManager", false, "Error merging settings registry for path: %s", resolvedPath.data()); return false; } @@ -199,7 +199,7 @@ namespace AWSClientAuth { return enumValue.value(); } - AZ_Warning("AuthenticationProviderManager", true, "Incorrect string value for enum: %s", name.c_str()); + AZ_Warning("AuthenticationProviderManager", false, "Incorrect string value for enum: %s", name.c_str()); return ProviderNameEnum::None; } diff --git a/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.cpp b/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.cpp index 7762b3919b..efabaf5fc1 100644 --- a/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authentication/GoogleAuthenticationProvider.cpp @@ -39,7 +39,7 @@ namespace AWSClientAuth { if (!settingsRegistry.lock()->GetObject(m_settings.get(), azrtti_typeid(m_settings.get()), GoogleSettingsPath)) { - AZ_Warning("AWSCognitoAuthenticationProvider", true, "Failed to get Google settings object for path %s", GoogleSettingsPath); + AZ_Warning("AWSCognitoAuthenticationProvider", false, "Failed to get Google settings object for path %s", GoogleSettingsPath); return false; } return true; @@ -49,21 +49,21 @@ namespace AWSClientAuth { AZ_UNUSED(username); AZ_UNUSED(password); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void GoogleAuthenticationProvider::PasswordGrantMultiFactorSignInAsync(const AZStd::string& username, const AZStd::string& password) { AZ_UNUSED(username); AZ_UNUSED(password); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void GoogleAuthenticationProvider::PasswordGrantMultiFactorConfirmSignInAsync(const AZStd::string& username, const AZStd::string& confirmationCode) { AZ_UNUSED(username); AZ_UNUSED(confirmationCode); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } // Call Google authentication provider device code end point. diff --git a/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.cpp b/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.cpp index a86e01a58e..f43611f2c0 100644 --- a/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authentication/LWAAuthenticationProvider.cpp @@ -38,7 +38,7 @@ namespace AWSClientAuth { if (!settingsRegistry.lock()->GetObject(m_settings.get(), azrtti_typeid(m_settings.get()), LwaSettingsPath)) { - AZ_Warning("AWSCognitoAuthenticationProvider", true, "Failed to get login with Amazon settings object for path %s", LwaSettingsPath); + AZ_Warning("AWSCognitoAuthenticationProvider", false, "Failed to get login with Amazon settings object for path %s", LwaSettingsPath); return false; } return true; @@ -48,21 +48,21 @@ namespace AWSClientAuth { AZ_UNUSED(username); AZ_UNUSED(password); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void LWAAuthenticationProvider::PasswordGrantMultiFactorSignInAsync(const AZStd::string& username, const AZStd::string& password) { AZ_UNUSED(username); AZ_UNUSED(password); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } void LWAAuthenticationProvider::PasswordGrantMultiFactorConfirmSignInAsync(const AZStd::string& username, const AZStd::string& confirmationCode) { AZ_UNUSED(username); AZ_UNUSED(confirmationCode); - AZ_Assert(true, "Not supported"); + AZ_Assert(false, "Not supported"); } // Call LWA authentication provider device code end point. diff --git a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp index 5e2c07bdbb..1cae2bd0b1 100644 --- a/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp +++ b/Gems/AWSClientAuth/Code/Source/Authorization/AWSCognitoAuthorizationController.cpp @@ -149,7 +149,7 @@ namespace AWSClientAuth } else { - AZ_Warning("AWSCognitoAuthorizationController", true, "No logins found. Fetching anonymous/unauthenticated credentials"); + AZ_Warning("AWSCognitoAuthorizationController", false, "No logins found. Fetching anonymous/unauthenticated credentials"); } AZ::JobContext* jobContext = nullptr; @@ -277,7 +277,7 @@ namespace AWSClientAuth // Check anonymous credentials as they are optional settings in Cognito Identity pool. if (!m_cognitoCachingAnonymousCredentialsProvider->GetAWSCredentials().IsEmpty()) { - AZ_Warning("AWSCognitoAuthorizationCredentialHandler", true, "No logins found. Using Anonymous credential provider"); + AZ_Warning("AWSCognitoAuthorizationCredentialHandler", false, "No logins found. Using Anonymous credential provider"); return m_cognitoCachingAnonymousCredentialsProvider; } diff --git a/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerScriptCanvasBusTest.cpp b/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerScriptCanvasBusTest.cpp index 7673840299..6aef72af7e 100644 --- a/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerScriptCanvasBusTest.cpp +++ b/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerScriptCanvasBusTest.cpp @@ -257,5 +257,5 @@ TEST_F(AuthenticationProviderManagerScriptCanvasTest, Initialize_Fail_InvalidPat { AZ_TEST_START_TRACE_SUPPRESSION; ASSERT_FALSE(m_mockController->Initialize(m_enabledProviderNames, "")); - AZ_TEST_STOP_TRACE_SUPPRESSION(1); + AZ_TEST_STOP_TRACE_SUPPRESSION(2); } diff --git a/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerTest.cpp b/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerTest.cpp index 4b5bdfb841..ce91e29a1a 100644 --- a/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerTest.cpp +++ b/Gems/AWSClientAuth/Code/Tests/Authentication/AuthenticationProviderManagerTest.cpp @@ -256,5 +256,5 @@ TEST_F(AuthenticationProviderManagerTest, Initialize_Fail_InvalidPath) { AZ_TEST_START_TRACE_SUPPRESSION; ASSERT_FALSE(m_mockController->Initialize(m_enabledProviderNames, "")); - AZ_TEST_STOP_TRACE_SUPPRESSION(1); + AZ_TEST_STOP_TRACE_SUPPRESSION(2); } diff --git a/Gems/AWSClientAuth/cdk/README.md b/Gems/AWSClientAuth/cdk/README.md index 4fe668cb9d..3bc2b59fc1 100644 --- a/Gems/AWSClientAuth/cdk/README.md +++ b/Gems/AWSClientAuth/cdk/README.md @@ -51,6 +51,13 @@ To add additional dependencies, for example other CDK libraries, just add them to your requirements.txt file and rerun the `..\..\..\Lumberyard\python\pip.cmd install -r .\Gems\AWSClientAuth\cdk\requirements.txt` command. + +## Update Authorization Permissions +To give permissions to call AWS resources, please update CognitoIdentityPoolRole class with correct policy statements. + +An example IAM permission policy is provided to grant both authenticated and unauthenticated the permission to list S3 buckets in the project. +However, it is expected that developers replace these permissions with those required by your users to use your resources. + ## Useful commands * `cdk ls` list all stacks in the app diff --git a/Gems/AWSClientAuth/cdk/auth/cognito_identity_pool_role.py b/Gems/AWSClientAuth/cdk/auth/cognito_identity_pool_role.py index 3a2e413617..52df897db9 100755 --- a/Gems/AWSClientAuth/cdk/auth/cognito_identity_pool_role.py +++ b/Gems/AWSClientAuth/cdk/auth/cognito_identity_pool_role.py @@ -53,14 +53,17 @@ class CognitoIdentityPoolRole: } }, assume_role_action='sts:AssumeRoleWithWebIdentity')) - # basic permissions + # The above role is created for developers to add custom permissions that they need to provide authorized + # clients. Developers should update the policy statements below to add their required permissions. + # As an example s3:ListBuckets permissions are provided. + # Note: There must be at least one policy statement here. stack_statement = iam.PolicyStatement( actions=[ 's3:ListBuckets' ], effect=iam.Effect.ALLOW, resources=[ - '*' + f'arn:aws:s3:::{project_name}/*' ], sid=name_utils.format_aws_resource_sid(feature_name, project_name, iam.PolicyStatement.__name__) ) diff --git a/Gems/AWSClientAuth/cdk/auth/cognito_user_pool_sms_role.py b/Gems/AWSClientAuth/cdk/auth/cognito_user_pool_sms_role.py index 286b439a76..c4a442f481 100755 --- a/Gems/AWSClientAuth/cdk/auth/cognito_user_pool_sms_role.py +++ b/Gems/AWSClientAuth/cdk/auth/cognito_user_pool_sms_role.py @@ -32,12 +32,18 @@ class CognitoUserPoolSMSRole: name_utils.format_aws_resource_id(feature_name, project_name, env, iam.Role.__name__), description='Role permissions used by Cognito user pool to send sms', assumed_by=iam.ServicePrincipal("cognito-idp.amazonaws.com"), + # Deny all others and then allow only for the current sms role. inline_policies={ 'SNSRoleInlinePolicy': iam.PolicyDocument( statements=[ + # SMS role will be used by CognitoIDP tp allow to publish to SNS topic owned by CognitoIDP + # team to push a sms. + # Need to use * as the resource name used by CognitoIDP principal service is unknown. iam.PolicyStatement( - actions=["sns:Publish"], resources=["*"] + effect=iam.Effect.ALLOW, + actions=['sns:Publish'], + resources=['*'] ) ] ) From 2323cdd9e49593514e160e5911718488c81171e8 Mon Sep 17 00:00:00 2001 From: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> Date: Tue, 22 Jun 2021 16:41:43 -0700 Subject: [PATCH 85/91] LYN-4755 lrelease in debug should have the profile qt libraries --- Assets/Editor/UI/releaseTranslations.py | 38 ------------------- Gems/LmbrCentral/Code/CMakeLists.txt | 2 +- .../Code/Platform/Linux/lrelease_linux.cmake | 4 ++ .../Code/Platform/Mac/lrelease_mac.cmake | 4 ++ .../Platform/Windows/lrelease_windows.cmake | 5 +++ 5 files changed, 14 insertions(+), 39 deletions(-) delete mode 100755 Assets/Editor/UI/releaseTranslations.py diff --git a/Assets/Editor/UI/releaseTranslations.py b/Assets/Editor/UI/releaseTranslations.py deleted file mode 100755 index 9ab0345d98..0000000000 --- a/Assets/Editor/UI/releaseTranslations.py +++ /dev/null @@ -1,38 +0,0 @@ -# -*- coding: utf-8 -*- -# -# 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. -# -import os - -os.chdir('qml') -startDir = os.getcwd() - -# since it's a .exe file it will only work on windows, but we may as well -# construct the path in a platform-independent way. -lreleaseCmd = os.path.join(startDir, '..', '..', '..', - 'Code', 'SDKs', 'Qt', 'x64', 'bin', 'lrelease.exe ') - -print(startDir) - -# Korean, Japanese and Simplified Chinese -targetLanguages = ['ko', 'ja', 'zh_CN'] - -for lang in targetLanguages: - os.chdir(startDir) - tgtLang = '-target-language ' + lang - os.system(lreleaseCmd + 'this_' + lang + '.ts') - - for fileName in os.listdir(): - if not fileName.endswith(".ts"): - continue - - os.system(lreleaseCmd + ' ' + fileName) - - print(('Finished processing: ' + fileName)) diff --git a/Gems/LmbrCentral/Code/CMakeLists.txt b/Gems/LmbrCentral/Code/CMakeLists.txt index 4d03d30923..588502954d 100644 --- a/Gems/LmbrCentral/Code/CMakeLists.txt +++ b/Gems/LmbrCentral/Code/CMakeLists.txt @@ -104,7 +104,7 @@ if (PAL_TRAIT_BUILD_HOST_TOOLS) ly_add_target_files( TARGETS LmbrCentral.Editor - FILES ${QT_LRELEASE_EXECUTABLE} + FILES ${lrelease_files} ) # by default, load the above "Gem::LmbrCentral.Editor" module in dev tools diff --git a/Gems/LmbrCentral/Code/Platform/Linux/lrelease_linux.cmake b/Gems/LmbrCentral/Code/Platform/Linux/lrelease_linux.cmake index 41eaf4a47a..70fbecf851 100644 --- a/Gems/LmbrCentral/Code/Platform/Linux/lrelease_linux.cmake +++ b/Gems/LmbrCentral/Code/Platform/Linux/lrelease_linux.cmake @@ -17,3 +17,7 @@ add_custom_command(TARGET LmbrCentral.Editor POST_BUILD COMMENT "Patching lrelease..." VERBATIM ) + +set(lrelease_files + ${QT_LRELEASE_EXECUTABLE} +) diff --git a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake index 4d5680a30d..53fcdfa02a 100644 --- a/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake +++ b/Gems/LmbrCentral/Code/Platform/Mac/lrelease_mac.cmake @@ -8,3 +8,7 @@ # 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. # + +set(lrelease_files + ${QT_LRELEASE_EXECUTABLE} +) diff --git a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake index 4d5680a30d..dda1715d76 100644 --- a/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake +++ b/Gems/LmbrCentral/Code/Platform/Windows/lrelease_windows.cmake @@ -8,3 +8,8 @@ # 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. # + +set(lrelease_files + ${QT_LRELEASE_EXECUTABLE} + ${QT_PATH}/bin/Qt5Core.dll # this is a dependency of lrelease. Even in debug we use the release version +) From e21443b5d6bf2f3ac5c04c87cc215a108883465b Mon Sep 17 00:00:00 2001 From: AMZN-nggieber <52797929+AMZN-nggieber@users.noreply.github.com> Date: Tue, 22 Jun 2021 17:24:48 -0700 Subject: [PATCH 86/91] Added Project Preview to Project Settings and Fixed Issues with Moving Projects (#1380) * Updated Project Settings Screen with preview and fixed moving projects * Tests for some Project Utils * Remove old defined consts * Update UX to use display name when avaliable where appropriate * Use newPreviewImagePath for temp changing preview.png otherwise use iconPath for preview in UX * Removed use of newPreviewImagePath in ProjectButton --- .../Source/EngineSettingsScreen.cpp | 10 +- .../Source/FormBrowseEditWidget.cpp | 22 +--- .../Source/FormBrowseEditWidget.h | 4 +- .../Source/FormFolderBrowseEditWidget.cpp | 42 ++++++ .../Source/FormFolderBrowseEditWidget.h | 33 +++++ .../Source/FormImageBrowseEditWidget.cpp | 35 +++++ .../Source/FormImageBrowseEditWidget.h | 33 +++++ .../Source/NewProjectSettingsScreen.cpp | 2 +- .../ProjectManager/Source/ProjectBuilder.cpp | 11 +- .../Source/ProjectButtonWidget.cpp | 24 ++-- .../ProjectManager/Source/ProjectInfo.cpp | 75 +++++++++-- .../Tools/ProjectManager/Source/ProjectInfo.h | 18 +-- .../Source/ProjectManagerDefs.h | 24 ++++ .../Source/ProjectSettingsScreen.cpp | 4 +- .../Source/ProjectSettingsScreen.h | 4 +- .../ProjectManager/Source/ProjectUtils.cpp | 74 ++++++++--- .../ProjectManager/Source/ProjectUtils.h | 4 +- .../ProjectManager/Source/ProjectsScreen.cpp | 19 +-- .../ProjectManager/Source/ProjectsScreen.h | 2 - .../ProjectManager/Source/PythonBindings.cpp | 4 +- .../Source/UpdateProjectCtrl.cpp | 120 ++++++++++++------ .../ProjectManager/Source/UpdateProjectCtrl.h | 1 + .../Source/UpdateProjectSettingsScreen.cpp | 113 ++++++++++++++++- .../Source/UpdateProjectSettingsScreen.h | 18 +++ .../project_manager_files.cmake | 5 + .../project_manager_tests_files.cmake | 1 + .../Tools/ProjectManager/tests/UtilsTests.cpp | 120 ++++++++++++++++++ 27 files changed, 679 insertions(+), 143 deletions(-) create mode 100644 Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.cpp create mode 100644 Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.h create mode 100644 Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.cpp create mode 100644 Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.h create mode 100644 Code/Tools/ProjectManager/Source/ProjectManagerDefs.h create mode 100644 Code/Tools/ProjectManager/tests/UtilsTests.cpp diff --git a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp index cf597745ea..4efa9d1d0f 100644 --- a/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/EngineSettingsScreen.cpp @@ -16,7 +16,7 @@ #include #include #include -#include +#include #include #include @@ -46,28 +46,28 @@ namespace O3DE::ProjectManager m_engineVersion->lineEdit()->setReadOnly(true); layout->addWidget(m_engineVersion); - m_thirdParty = new FormBrowseEditWidget(tr("3rd Party Software Folder"), engineInfo.m_thirdPartyPath, this); + m_thirdParty = new FormFolderBrowseEditWidget(tr("3rd Party Software Folder"), engineInfo.m_thirdPartyPath, this); m_thirdParty->lineEdit()->setValidator(new PathValidator(PathValidator::PathMode::ExistingFolder, this)); m_thirdParty->lineEdit()->setReadOnly(true); m_thirdParty->setErrorLabelText(tr("Please provide a valid path to a folder that exists")); connect(m_thirdParty->lineEdit(), &QLineEdit::textChanged, this, &EngineSettingsScreen::OnTextChanged); layout->addWidget(m_thirdParty); - m_defaultProjects = new FormBrowseEditWidget(tr("Default Projects Folder"), engineInfo.m_defaultProjectsFolder, this); + m_defaultProjects = new FormFolderBrowseEditWidget(tr("Default Projects Folder"), engineInfo.m_defaultProjectsFolder, this); m_defaultProjects->lineEdit()->setValidator(new PathValidator(PathValidator::PathMode::ExistingFolder, this)); m_defaultProjects->lineEdit()->setReadOnly(true); m_defaultProjects->setErrorLabelText(tr("Please provide a valid path to a folder that exists")); connect(m_defaultProjects->lineEdit(), &QLineEdit::textChanged, this, &EngineSettingsScreen::OnTextChanged); layout->addWidget(m_defaultProjects); - m_defaultGems = new FormBrowseEditWidget(tr("Default Gems Folder"), engineInfo.m_defaultGemsFolder, this); + m_defaultGems = new FormFolderBrowseEditWidget(tr("Default Gems Folder"), engineInfo.m_defaultGemsFolder, this); m_defaultGems->lineEdit()->setValidator(new PathValidator(PathValidator::PathMode::ExistingFolder, this)); m_defaultGems->lineEdit()->setReadOnly(true); m_defaultGems->setErrorLabelText(tr("Please provide a valid path to a folder that exists")); connect(m_defaultGems->lineEdit(), &QLineEdit::textChanged, this, &EngineSettingsScreen::OnTextChanged); layout->addWidget(m_defaultGems); - m_defaultProjectTemplates = new FormBrowseEditWidget(tr("Default Project Templates Folder"), engineInfo.m_defaultTemplatesFolder, this); + m_defaultProjectTemplates = new FormFolderBrowseEditWidget(tr("Default Project Templates Folder"), engineInfo.m_defaultTemplatesFolder, this); m_defaultProjectTemplates->lineEdit()->setValidator(new PathValidator(PathValidator::PathMode::ExistingFolder, this)); m_defaultProjectTemplates->lineEdit()->setReadOnly(true); m_defaultProjectTemplates->setErrorLabelText(tr("Please provide a valid path to a folder that exists")); diff --git a/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.cpp b/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.cpp index c30d6a7b30..9a2227cf4a 100644 --- a/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.cpp +++ b/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.cpp @@ -11,13 +11,9 @@ */ #include -#include + #include #include -#include -#include -#include -#include namespace O3DE::ProjectManager { @@ -30,20 +26,4 @@ namespace O3DE::ProjectManager connect(browseButton, &QPushButton::pressed, this, &FormBrowseEditWidget::HandleBrowseButton); m_frameLayout->addWidget(browseButton); } - - void FormBrowseEditWidget::HandleBrowseButton() - { - QString defaultPath = m_lineEdit->text(); - if (defaultPath.isEmpty()) - { - defaultPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); - } - - QString directory = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(this, tr("Browse"), defaultPath)); - if (!directory.isEmpty()) - { - m_lineEdit->setText(directory); - } - - } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.h b/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.h index 887fc29dd9..1eba97654b 100644 --- a/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.h +++ b/Code/Tools/ProjectManager/Source/FormBrowseEditWidget.h @@ -27,7 +27,7 @@ namespace O3DE::ProjectManager explicit FormBrowseEditWidget(const QString& labelText, const QString& valueText = "", QWidget* parent = nullptr); ~FormBrowseEditWidget() = default; - private slots: - void HandleBrowseButton(); + protected slots: + virtual void HandleBrowseButton() = 0; }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.cpp b/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.cpp new file mode 100644 index 0000000000..2c4cad5adb --- /dev/null +++ b/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.cpp @@ -0,0 +1,42 @@ +/* +* 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 +#include + +#include +#include +#include + +namespace O3DE::ProjectManager +{ + FormFolderBrowseEditWidget::FormFolderBrowseEditWidget(const QString& labelText, const QString& valueText, QWidget* parent) + : FormBrowseEditWidget(labelText, valueText, parent) + { + } + + void FormFolderBrowseEditWidget::HandleBrowseButton() + { + QString defaultPath = m_lineEdit->text(); + if (defaultPath.isEmpty()) + { + defaultPath = QStandardPaths::writableLocation(QStandardPaths::DocumentsLocation); + } + + QString directory = QDir::toNativeSeparators(QFileDialog::getExistingDirectory(this, tr("Browse"), defaultPath)); + if (!directory.isEmpty()) + { + m_lineEdit->setText(directory); + } + + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.h b/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.h new file mode 100644 index 0000000000..a99fe3b5c2 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/FormFolderBrowseEditWidget.h @@ -0,0 +1,33 @@ +/* +* 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class FormFolderBrowseEditWidget + : public FormBrowseEditWidget + { + Q_OBJECT + + public: + explicit FormFolderBrowseEditWidget(const QString& labelText, const QString& valueText = "", QWidget* parent = nullptr); + ~FormFolderBrowseEditWidget() = default; + + protected: + void HandleBrowseButton() override; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.cpp b/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.cpp new file mode 100644 index 0000000000..5bb9d61dd6 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.cpp @@ -0,0 +1,35 @@ +/* + * 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 +#include + +#include +#include + +namespace O3DE::ProjectManager +{ + FormImageBrowseEditWidget::FormImageBrowseEditWidget(const QString& labelText, const QString& valueText, QWidget* parent) + : FormBrowseEditWidget(labelText, valueText, parent) + { + } + + void FormImageBrowseEditWidget::HandleBrowseButton() + { + QString file = QDir::toNativeSeparators(QFileDialog::getOpenFileName( + this, tr("Select Image"), m_lineEdit->text(), tr("PNG (*.png)"))); + if (!file.isEmpty()) + { + m_lineEdit->setText(file); + } + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.h b/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.h new file mode 100644 index 0000000000..e01e9254f8 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/FormImageBrowseEditWidget.h @@ -0,0 +1,33 @@ +/* + * 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + +namespace O3DE::ProjectManager +{ + class FormImageBrowseEditWidget + : public FormBrowseEditWidget + { + Q_OBJECT + + public: + explicit FormImageBrowseEditWidget(const QString& labelText, const QString& valueText = "", QWidget* parent = nullptr); + ~FormImageBrowseEditWidget() = default; + + protected: + void HandleBrowseButton() override; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp index 5faa6cb8bd..efe34f6fa6 100644 --- a/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/NewProjectSettingsScreen.cpp @@ -12,8 +12,8 @@ #include #include -#include #include +#include #include #include #include diff --git a/Code/Tools/ProjectManager/Source/ProjectBuilder.cpp b/Code/Tools/ProjectManager/Source/ProjectBuilder.cpp index 8cdab93c6a..62f879963f 100644 --- a/Code/Tools/ProjectManager/Source/ProjectBuilder.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectBuilder.cpp @@ -11,6 +11,7 @@ */ #include +#include #include #include @@ -30,8 +31,6 @@ namespace O3DE::ProjectManager { // 10 Minutes constexpr int MaxBuildTimeMSecs = 600000; - static const QString BuildPathPostfix = "windows_vs2019"; - static const QString ErrorLogPathPostfix = "CMakeFiles/CMakeProjectBuildError.log"; ProjectBuilderWorker::ProjectBuilderWorker(const ProjectInfo& projectInfo) : QObject() @@ -83,7 +82,7 @@ namespace O3DE::ProjectManager QStringList { "-B", - QDir(m_projectInfo.m_path).filePath(BuildPathPostfix), + QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix), "-S", m_projectInfo.m_path, "-G", @@ -123,7 +122,7 @@ namespace O3DE::ProjectManager QStringList { "--build", - QDir(m_projectInfo.m_path).filePath(BuildPathPostfix), + QDir(m_projectInfo.m_path).filePath(ProjectBuildPathPostfix), "--target", m_projectInfo.m_projectName + ".GameLauncher", "Editor", @@ -159,8 +158,8 @@ namespace O3DE::ProjectManager QString ProjectBuilderWorker::LogFilePath() const { QDir logFilePath(m_projectInfo.m_path); - logFilePath.cd(BuildPathPostfix); - return logFilePath.filePath(ErrorLogPathPostfix); + logFilePath.cd(ProjectBuildPathPostfix); + return logFilePath.filePath(ProjectBuildErrorLogPathPostfix); } void ProjectBuilderWorker::WriteErrorLog(const QString& log) diff --git a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp index 3bde0a310d..aaf87fd9cf 100644 --- a/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectButtonWidget.cpp @@ -11,6 +11,7 @@ */ #include +#include #include #include @@ -22,12 +23,11 @@ #include #include #include +#include +#include namespace O3DE::ProjectManager { - inline constexpr static int s_projectImageWidth = 210; - inline constexpr static int s_projectImageHeight = 280; - LabelButton::LabelButton(QWidget* parent) : QLabel(parent) { @@ -92,11 +92,6 @@ namespace O3DE::ProjectManager : QFrame(parent) , m_projectInfo(projectInfo) { - if (m_projectInfo.m_imagePath.isEmpty()) - { - m_projectInfo.m_imagePath = ":/DefaultProjectImage.png"; - } - BaseSetup(); if (processing) { @@ -118,20 +113,25 @@ namespace O3DE::ProjectManager setLayout(vLayout); m_projectImageLabel = new LabelButton(this); - m_projectImageLabel->setFixedSize(s_projectImageWidth, s_projectImageHeight); + m_projectImageLabel->setFixedSize(ProjectPreviewImageWidth, ProjectPreviewImageHeight); m_projectImageLabel->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); connect(m_projectImageLabel, &LabelButton::triggered, [this]() { emit OpenProject(m_projectInfo.m_path); }); vLayout->addWidget(m_projectImageLabel); - m_projectImageLabel->setPixmap( - QPixmap(m_projectInfo.m_imagePath).scaled(m_projectImageLabel->size(), Qt::KeepAspectRatioByExpanding)); + QString projectPreviewPath = QDir(m_projectInfo.m_path).filePath(m_projectInfo.m_iconPath); + QFileInfo doesPreviewExist(projectPreviewPath); + if (!doesPreviewExist.exists() || !doesPreviewExist.isFile()) + { + projectPreviewPath = ":/DefaultProjectImage.png"; + } + m_projectImageLabel->setPixmap(QPixmap(projectPreviewPath).scaled(m_projectImageLabel->size(), Qt::KeepAspectRatioByExpanding)); m_projectFooter = new QFrame(this); QHBoxLayout* hLayout = new QHBoxLayout(); hLayout->setContentsMargins(0, 0, 0, 0); m_projectFooter->setLayout(hLayout); { - QLabel* projectNameLabel = new QLabel(m_projectInfo.m_displayName, this); + QLabel* projectNameLabel = new QLabel(m_projectInfo.GetProjectDisplayName(), this); hLayout->addWidget(projectNameLabel); } diff --git a/Code/Tools/ProjectManager/Source/ProjectInfo.cpp b/Code/Tools/ProjectManager/Source/ProjectInfo.cpp index 99649cbfdf..e7d8a6d0e7 100644 --- a/Code/Tools/ProjectManager/Source/ProjectInfo.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectInfo.cpp @@ -10,33 +10,74 @@ * */ -#include "ProjectInfo.h" +#include +#include + +#include namespace O3DE::ProjectManager { - ProjectInfo::ProjectInfo(const QString& path, const QString& projectName, const QString& displayName, - const QString& origin, const QString& summary, const QString& imagePath, const QString& backgroundImagePath, + ProjectInfo::ProjectInfo( + const QString& path, + const QString& projectName, + const QString& displayName, + const QString& origin, + const QString& summary, + const QString& iconPath, + const QString& newPreviewImagePath, + const QString& newBackgroundImagePath, bool needsBuild) : m_path(path) , m_projectName(projectName) , m_displayName(displayName) , m_origin(origin) , m_summary(summary) - , m_imagePath(imagePath) - , m_backgroundImagePath(backgroundImagePath) + , m_iconPath(iconPath) + , m_newPreviewImagePath(newPreviewImagePath) + , m_newBackgroundImagePath(newBackgroundImagePath) , m_needsBuild(needsBuild) { } - bool ProjectInfo::operator==(const ProjectInfo& rhs) + bool ProjectInfo::operator==(const ProjectInfo& rhs) const { - return m_path == rhs.m_path - && m_projectName == rhs.m_projectName - && m_imagePath == rhs.m_imagePath - && m_backgroundImagePath == rhs.m_backgroundImagePath; + if (m_path != rhs.m_path) + { + return false; + } + if (m_projectName != rhs.m_projectName) + { + return false; + } + if (m_displayName != rhs.m_displayName) + { + return false; + } + if (m_origin != rhs.m_origin) + { + return false; + } + if (m_summary != rhs.m_summary) + { + return false; + } + if (m_iconPath != rhs.m_iconPath) + { + return false; + } + if (m_newPreviewImagePath != rhs.m_newPreviewImagePath) + { + return false; + } + if (m_newBackgroundImagePath != rhs.m_newBackgroundImagePath) + { + return false; + } + + return true; } - bool ProjectInfo::operator!=(const ProjectInfo& rhs) + bool ProjectInfo::operator!=(const ProjectInfo& rhs) const { return !operator==(rhs); } @@ -45,4 +86,16 @@ namespace O3DE::ProjectManager { return !m_path.isEmpty() && !m_projectName.isEmpty(); } + + const QString& ProjectInfo::GetProjectDisplayName() const + { + if (!m_displayName.isEmpty()) + { + return m_displayName; + } + else + { + return m_projectName; + } + } } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectInfo.h b/Code/Tools/ProjectManager/Source/ProjectInfo.h index 184916a514..72f64408f4 100644 --- a/Code/Tools/ProjectManager/Source/ProjectInfo.h +++ b/Code/Tools/ProjectManager/Source/ProjectInfo.h @@ -31,14 +31,16 @@ namespace O3DE::ProjectManager const QString& displayName, const QString& origin, const QString& summary, - const QString& imagePath, - const QString& backgroundImagePath, + const QString& iconPath, + const QString& newPreviewImagePath, + const QString& newBackgroundImagePath, bool needsBuild); - bool operator==(const ProjectInfo& rhs); - bool operator!=(const ProjectInfo& rhs); + bool operator==(const ProjectInfo& rhs) const; + bool operator!=(const ProjectInfo& rhs) const; bool IsValid() const; + const QString& GetProjectDisplayName() const; // from o3de_manifest.json and o3de_projects.json QString m_path; @@ -48,14 +50,14 @@ namespace O3DE::ProjectManager QString m_displayName; QString m_origin; QString m_summary; + QString m_iconPath; QStringList m_userTags; - // Used on projects home screen - QString m_imagePath; - QString m_backgroundImagePath; + // Used as temp variable for replace images + QString m_newPreviewImagePath; + QString m_newBackgroundImagePath; // Used in project creation - bool m_needsBuild = false; //! Does this project need to be built }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h b/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h new file mode 100644 index 0000000000..eafab28a60 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/ProjectManagerDefs.h @@ -0,0 +1,24 @@ +/* + * 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 + +namespace O3DE::ProjectManager +{ + inline constexpr static int ProjectPreviewImageWidth = 210; + inline constexpr static int ProjectPreviewImageHeight = 280; + + static const QString ProjectBuildPathPostfix = "Windows_VS2019"; + static const QString ProjectBuildErrorLogPathPostfix = "CMakeFiles/CMakeProjectBuildError.log"; + static const QString ProjectPreviewImagePath = "preview.png"; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp index b198724353..9dbbf26aa4 100644 --- a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.cpp @@ -11,7 +11,7 @@ */ #include -#include +#include #include #include #include @@ -47,7 +47,7 @@ namespace O3DE::ProjectManager connect(m_projectName->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::ValidateProjectName); m_verticalLayout->addWidget(m_projectName); - m_projectPath = new FormBrowseEditWidget(tr("Project Location"), "", this); + m_projectPath = new FormFolderBrowseEditWidget(tr("Project Location"), "", this); m_projectPath->lineEdit()->setReadOnly(true); connect(m_projectPath->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::Validate); m_verticalLayout->addWidget(m_projectPath); diff --git a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.h b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.h index 0d75bbbc64..1b1f03051d 100644 --- a/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.h +++ b/Code/Tools/ProjectManager/Source/ProjectSettingsScreen.h @@ -32,9 +32,9 @@ namespace O3DE::ProjectManager ~ProjectSettingsScreen() = default; ProjectManagerScreen GetScreenEnum() override; - ProjectInfo GetProjectInfo(); + virtual ProjectInfo GetProjectInfo(); - bool Validate(); + virtual bool Validate(); protected slots: virtual bool ValidateProjectName(); diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp index 3e2b3c13e1..91e7f0a719 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.cpp @@ -29,11 +29,8 @@ namespace O3DE::ProjectManager if (!QDir(path).isEmpty()) { QMessageBox::StandardButton warningResult = QMessageBox::warning( - parent, - QObject::tr("Overwrite Directory"), - QObject::tr("Directory is not empty! Are you sure you want to overwrite it?"), - QMessageBox::No | QMessageBox::Yes - ); + parent, QObject::tr("Overwrite Directory"), + QObject::tr("Directory is not empty! Are you sure you want to overwrite it?"), QMessageBox::No | QMessageBox::Yes); if (warningResult != QMessageBox::Yes) { @@ -53,14 +50,13 @@ namespace O3DE::ProjectManager { if (ancestor == descendent) { - return false; + return true; } descendent.cdUp(); - } - while (!descendent.isRoot()); + } while (!descendent.isRoot()); - return true; + return false; } static bool CopyDirectory(const QString& origPath, const QString& newPath) @@ -138,7 +134,7 @@ namespace O3DE::ProjectManager bool CopyProject(const QString& origPath, const QString& newPath) { // Disallow copying from or into subdirectory - if (!IsDirectoryDescedent(origPath, newPath) || !IsDirectoryDescedent(newPath, origPath)) + if (IsDirectoryDescedent(origPath, newPath) || IsDirectoryDescedent(newPath, origPath)) { return false; } @@ -173,20 +169,66 @@ namespace O3DE::ProjectManager return false; } - bool MoveProject(const QString& origPath, const QString& newPath, QWidget* parent) + bool MoveProject(QString origPath, QString newPath, QWidget* parent, bool ignoreRegister) { - if (!WarnDirectoryOverwrite(newPath, parent) || !UnregisterProject(origPath)) + origPath = QDir::toNativeSeparators(origPath); + newPath = QDir::toNativeSeparators(newPath); + + if (!WarnDirectoryOverwrite(newPath, parent) || (!ignoreRegister && !UnregisterProject(origPath))) { return false; } - QDir directory; - if (directory.rename(origPath, newPath)) + QDir newDirectory(newPath); + if (!newDirectory.removeRecursively()) { - return directory.rename(origPath, newPath); + return false; + } + if (!newDirectory.rename(origPath, newPath)) + { + // Likely failed because trying to move to another partition, try copying + if (!CopyProject(origPath, newPath)) + { + return false; + } + + DeleteProjectFiles(origPath, true); } - if (!RegisterProject(newPath)) + if (!ignoreRegister && !RegisterProject(newPath)) + { + return false; + } + + return true; + } + + bool ReplaceFile(const QString& origFile, const QString& newFile, QWidget* parent, bool interactive) + { + QFileInfo original(origFile); + if (original.exists()) + { + if (interactive) + { + QMessageBox::StandardButton warningResult = QMessageBox::warning( + parent, + QObject::tr("Overwrite File?"), + QObject::tr("Replacing this will overwrite the current file on disk. Are you sure?"), + QMessageBox::No | QMessageBox::Yes); + + if (warningResult == QMessageBox::No) + { + return false; + } + } + + if (!QFile::remove(origFile)) + { + return false; + } + } + + if (!QFile::copy(newFile, origFile)) { return false; } diff --git a/Code/Tools/ProjectManager/Source/ProjectUtils.h b/Code/Tools/ProjectManager/Source/ProjectUtils.h index 9c711ad187..2fa1258e8f 100644 --- a/Code/Tools/ProjectManager/Source/ProjectUtils.h +++ b/Code/Tools/ProjectManager/Source/ProjectUtils.h @@ -24,7 +24,9 @@ namespace O3DE::ProjectManager bool CopyProjectDialog(const QString& origPath, QWidget* parent = nullptr); bool CopyProject(const QString& origPath, const QString& newPath); bool DeleteProjectFiles(const QString& path, bool force = false); - bool MoveProject(const QString& origPath, const QString& newPath, QWidget* parent = nullptr); + bool MoveProject(QString origPath, QString newPath, QWidget* parent = nullptr, bool ignoreRegister = false); + + bool ReplaceFile(const QString& origFile, const QString& newFile, QWidget* parent = nullptr, bool interactive = true); bool IsVS2019Installed(); diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp index 6633558406..d0534c1e76 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.cpp @@ -12,6 +12,7 @@ #include +#include #include #include #include @@ -35,7 +36,6 @@ #include #include #include -#include #include #include #include @@ -218,16 +218,7 @@ namespace O3DE::ProjectManager ProjectButton* ProjectsScreen::CreateProjectButton(ProjectInfo& project, QLayout* flowLayout, bool processing) { - ProjectButton* projectButton; - - QString projectPreviewPath = project.m_path + m_projectPreviewImagePath; - QFileInfo doesPreviewExist(projectPreviewPath); - if (doesPreviewExist.exists() && doesPreviewExist.isFile()) - { - project.m_imagePath = projectPreviewPath; - } - - projectButton = new ProjectButton(project, this, processing); + ProjectButton* projectButton = new ProjectButton(project, this, processing); flowLayout->addWidget(projectButton); @@ -438,7 +429,7 @@ namespace O3DE::ProjectManager { QMessageBox::information(this, tr("Project Should be rebuilt."), - projectInfo.m_projectName + tr(" project likely needs to be rebuilt.")); + projectInfo.GetProjectDisplayName() + tr(" project likely needs to be rebuilt.")); } } @@ -499,8 +490,8 @@ namespace O3DE::ProjectManager { QMessageBox::StandardButton buildProject = QMessageBox::information( this, - tr("Building \"%1\"").arg(projectInfo.m_projectName), - tr("Ready to build \"%1\"?").arg(projectInfo.m_projectName), + tr("Building \"%1\"").arg(projectInfo.GetProjectDisplayName()), + tr("Ready to build \"%1\"?").arg(projectInfo.GetProjectDisplayName()), QMessageBox::No | QMessageBox::Yes); if (buildProject == QMessageBox::Yes) diff --git a/Code/Tools/ProjectManager/Source/ProjectsScreen.h b/Code/Tools/ProjectManager/Source/ProjectsScreen.h index bc28d4ef30..b86c2b0240 100644 --- a/Code/Tools/ProjectManager/Source/ProjectsScreen.h +++ b/Code/Tools/ProjectManager/Source/ProjectsScreen.h @@ -80,8 +80,6 @@ namespace O3DE::ProjectManager QQueue m_buildQueue; ProjectBuilderController* m_currentBuilder = nullptr; - const QString m_projectPreviewImagePath = "/preview.png"; - inline constexpr static int s_contentMargins = 80; inline constexpr static int s_spacerSize = 20; }; diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 0e00319b6b..993c0abeaa 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -12,6 +12,7 @@ #include +#include // Qt defines slots, which interferes with the use here. #pragma push_macro("slots") @@ -693,6 +694,7 @@ namespace O3DE::ProjectManager projectInfo.m_displayName = Py_To_String_Optional(projectData, "display_name", projectInfo.m_projectName); projectInfo.m_origin = Py_To_String_Optional(projectData, "origin", projectInfo.m_origin); projectInfo.m_summary = Py_To_String_Optional(projectData, "summary", projectInfo.m_summary); + projectInfo.m_iconPath = Py_To_String_Optional(projectData, "icon", ProjectPreviewImagePath); if (projectData.contains("user_tags")) { for (auto tag : projectData["user_tags"]) @@ -786,7 +788,7 @@ namespace O3DE::ProjectManager pybind11::str(projectInfo.m_origin.toStdString()), // new_origin pybind11::str(projectInfo.m_displayName.toStdString()), // new_display pybind11::str(projectInfo.m_summary.toStdString()), // new_summary - pybind11::str(projectInfo.m_imagePath.toStdString()), // new_icon + pybind11::str(projectInfo.m_iconPath.toStdString()), // new_icon pybind11::none(), // add_tags not used pybind11::none(), // remove_tags not used pybind11::list(pybind11::cast(newTags))); // replace_tags diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp index 409c51315d..f5414a67a1 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp @@ -11,6 +11,7 @@ */ #include +#include #include #include #include @@ -24,6 +25,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -101,8 +103,11 @@ namespace O3DE::ProjectManager void UpdateProjectCtrl::HandleGemsButton() { - m_stack->setCurrentWidget(m_gemCatalogScreen); - Update(); + if (UpdateProjectSettings(true)) + { + m_stack->setCurrentWidget(m_gemCatalogScreen); + Update(); + } } void UpdateProjectCtrl::HandleBackButton() @@ -114,7 +119,10 @@ namespace O3DE::ProjectManager } else { - emit GotoPreviousScreenRequest(); + if (UpdateProjectSettings(true)) + { + emit GotoPreviousScreenRequest(); + } } } @@ -124,38 +132,9 @@ namespace O3DE::ProjectManager if (m_stack->currentIndex() == ScreenOrder::Settings && m_updateSettingsScreen) { - if (m_updateSettingsScreen) + if (!UpdateProjectSettings()) { - if (!m_updateSettingsScreen->Validate()) - { - QMessageBox::critical(this, tr("Invalid project settings"), tr("Invalid project settings")); - return; - } - - ProjectInfo newProjectSettings = m_updateSettingsScreen->GetProjectInfo(); - - // Update project if settings changed - if (m_projectInfo != newProjectSettings) - { - auto result = PythonBindingsInterface::Get()->UpdateProject(newProjectSettings); - if (!result.IsSuccess()) - { - QMessageBox::critical(this, tr("Project update failed"), tr(result.GetError().c_str())); - return; - } - } - - // Check if project path has changed and move it - if (newProjectSettings.m_path != m_projectInfo.m_path) - { - if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path)) - { - QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project.")); - return; - } - } - - m_projectInfo = newProjectSettings; + return; } } else if (m_stack->currentIndex() == ScreenOrder::Gems && m_gemCatalogScreen) @@ -190,14 +169,15 @@ namespace O3DE::ProjectManager { if (m_stack->currentIndex() == ScreenOrder::Gems) { - m_header->setTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.m_projectName)); + + m_header->setTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.GetProjectDisplayName())); m_header->setSubTitle(QString(tr("Configure Gems"))); - m_nextButton->setText(tr("Finalize")); + m_nextButton->setText(tr("Save")); } else { m_header->setTitle(""); - m_header->setSubTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.m_projectName)); + m_header->setSubTitle(QString(tr("Edit Project Settings: \"%1\"")).arg(m_projectInfo.GetProjectDisplayName())); m_nextButton->setText(tr("Save")); } } @@ -207,4 +187,70 @@ namespace O3DE::ProjectManager m_updateSettingsScreen->SetProjectInfo(m_projectInfo); } + bool UpdateProjectCtrl::UpdateProjectSettings(bool shouldConfirm) + { + AZ_Assert(m_updateSettingsScreen, "Update settings screen is nullptr.") + + ProjectInfo newProjectSettings = m_updateSettingsScreen->GetProjectInfo(); + + if (m_projectInfo != newProjectSettings) + { + if (shouldConfirm) + { + QMessageBox::StandardButton warningResult = QMessageBox::warning( + this, + QObject::tr("Unsaved Changes!"), + QObject::tr("Would you like to save your changes to project settings?"), + QMessageBox::No | QMessageBox::Yes + ); + + if (warningResult == QMessageBox::No) + { + return true; + } + } + + if (!m_updateSettingsScreen->Validate()) + { + QMessageBox::critical(this, tr("Invalid project settings"), tr("Invalid project settings")); + return false; + } + + // Update project if settings changed + { + auto result = PythonBindingsInterface::Get()->UpdateProject(newProjectSettings); + if (!result.IsSuccess()) + { + QMessageBox::critical(this, tr("Project update failed"), tr(result.GetError().c_str())); + return false; + } + } + + // Check if project path has changed and move it + if (newProjectSettings.m_path != m_projectInfo.m_path) + { + if (!ProjectUtils::MoveProject(m_projectInfo.m_path, newProjectSettings.m_path)) + { + QMessageBox::critical(this, tr("Project move failed"), tr("Failed to move project.")); + return false; + } + } + + if (!newProjectSettings.m_newPreviewImagePath.isEmpty()) + { + if (!ProjectUtils::ReplaceFile( + QDir(newProjectSettings.m_path).filePath(newProjectSettings.m_iconPath), newProjectSettings.m_newPreviewImagePath)) + { + QMessageBox::critical(this, tr("File replace failed"), tr("Failed to replace project preview image.")); + return false; + } + m_updateSettingsScreen->ResetProjectPreviewPath(); + } + + m_projectInfo = newProjectSettings; + } + + return true; + } + } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h index 231bfb8f19..b8b57c0c20 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.h @@ -46,6 +46,7 @@ namespace O3DE::ProjectManager private: void Update(); void UpdateSettingsScreen(); + bool UpdateProjectSettings(bool shouldConfirm = false); enum ScreenOrder { diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp index c29be3c7fd..f7be7e84c3 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.cpp @@ -11,17 +11,43 @@ */ #include -#include +#include +#include #include +#include #include #include +#include +#include namespace O3DE::ProjectManager { UpdateProjectSettingsScreen::UpdateProjectSettingsScreen(QWidget* parent) : ProjectSettingsScreen(parent) + , m_userChangedPreview(false) { + m_projectPreview = new FormImageBrowseEditWidget(tr("Project Preview"), "", this); + m_projectPreview->lineEdit()->setReadOnly(true); + connect(m_projectPreview->lineEdit(), &QLineEdit::textChanged, this, &ProjectSettingsScreen::Validate); + connect(m_projectPreview->lineEdit(), &QLineEdit::textChanged, this, &UpdateProjectSettingsScreen::PreviewPathChanged); + connect(m_projectPath->lineEdit(), &QLineEdit::textChanged, this, &UpdateProjectSettingsScreen::UpdateProjectPreviewPath); + m_verticalLayout->addWidget(m_projectPreview); + + QVBoxLayout* previewExtrasLayout = new QVBoxLayout(this); + previewExtrasLayout->setAlignment(Qt::AlignLeft); + previewExtrasLayout->setContentsMargins(50, 0, 0, 0); + + QLabel* projectPreviewLabel = new QLabel(tr("Select an image (PNG). Minimum %1 x %2 pixels.") + .arg(QString::number(ProjectPreviewImageWidth), QString::number(ProjectPreviewImageHeight))); + previewExtrasLayout->addWidget(projectPreviewLabel); + + m_projectPreviewImage = new QLabel(this); + m_projectPreviewImage->setFixedSize(ProjectPreviewImageWidth, ProjectPreviewImageHeight); + m_projectPreviewImage->setAlignment(Qt::AlignHCenter | Qt::AlignVCenter); + previewExtrasLayout->addWidget(m_projectPreviewImage); + + m_verticalLayout->addLayout(previewExtrasLayout); } ProjectManagerScreen UpdateProjectSettingsScreen::GetScreenEnum() @@ -29,10 +55,58 @@ namespace O3DE::ProjectManager return ProjectManagerScreen::UpdateProjectSettings; } + ProjectInfo UpdateProjectSettingsScreen::GetProjectInfo() + { + m_projectInfo.m_displayName = m_projectName->lineEdit()->text(); + m_projectInfo.m_path = m_projectPath->lineEdit()->text(); + + if (m_userChangedPreview) + { + m_projectInfo.m_iconPath = ProjectPreviewImagePath; + m_projectInfo.m_newPreviewImagePath = m_projectPreview->lineEdit()->text(); + } + return m_projectInfo; + } + void UpdateProjectSettingsScreen::SetProjectInfo(const ProjectInfo& projectInfo) { - m_projectName->lineEdit()->setText(projectInfo.m_projectName); + m_projectInfo = projectInfo; + + m_projectName->lineEdit()->setText(projectInfo.GetProjectDisplayName()); + m_projectPath->lineEdit()->setText(projectInfo.m_path); + UpdateProjectPreviewPath(); + } + + void UpdateProjectSettingsScreen::UpdateProjectPreviewPath() + { + if (!m_userChangedPreview) + { + m_projectPreview->lineEdit()->setText(QDir(m_projectPath->lineEdit()->text()).filePath(m_projectInfo.m_iconPath)); + // Setting the text sets m_userChangedPreview to true + // Set it back to false because it should only be true when changed by user + m_userChangedPreview = false; + } + } + + bool UpdateProjectSettingsScreen::Validate() + { + return ProjectSettingsScreen::Validate() && ValidateProjectPreview(); + } + + void UpdateProjectSettingsScreen::ResetProjectPreviewPath() + { + m_userChangedPreview = false; + UpdateProjectPreviewPath(); + } + + void UpdateProjectSettingsScreen::PreviewPathChanged() + { + m_userChangedPreview = true; + + // Update with latest image + m_projectPreviewImage->setPixmap( + QPixmap(m_projectPreview->lineEdit()->text()).scaled(m_projectPreviewImage->size(), Qt::KeepAspectRatioByExpanding)); } bool UpdateProjectSettingsScreen::ValidateProjectPath() @@ -48,4 +122,39 @@ namespace O3DE::ProjectManager return projectPathIsValid; } + bool UpdateProjectSettingsScreen::ValidateProjectPreview() + { + bool projectPreviewIsValid = true; + + if (m_projectPreview->lineEdit()->text().isEmpty()) + { + projectPreviewIsValid = false; + m_projectPreview->setErrorLabelText(tr("Please select a file.")); + } + else + { + if (m_userChangedPreview) + { + QFileInfo previewFile(m_projectPreview->lineEdit()->text()); + if (!previewFile.exists() || !previewFile.isFile()) + { + projectPreviewIsValid = false; + m_projectPreview->setErrorLabelText(tr("Please select a valid png file.")); + } + else + { + QString fileType = previewFile.completeSuffix().toLower(); + if (fileType != "png") + { + projectPreviewIsValid = false; + m_projectPreview->setErrorLabelText(tr("Please select a png image.")); + } + } + } + } + + m_projectPreview->setErrorLabelVisible(!projectPreviewIsValid); + return projectPreviewIsValid; + } + } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h index 95bbceb9c6..1961648b5b 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h +++ b/Code/Tools/ProjectManager/Source/UpdateProjectSettingsScreen.h @@ -15,6 +15,8 @@ #include #endif +QT_FORWARD_DECLARE_CLASS(QLabel) + namespace O3DE::ProjectManager { class UpdateProjectSettingsScreen @@ -25,10 +27,26 @@ namespace O3DE::ProjectManager ~UpdateProjectSettingsScreen() = default; ProjectManagerScreen GetScreenEnum() override; + ProjectInfo GetProjectInfo() override; void SetProjectInfo(const ProjectInfo& projectInfo); + bool Validate() override; + + void ResetProjectPreviewPath(); + + public slots: + void UpdateProjectPreviewPath(); + void PreviewPathChanged(); + protected: bool ValidateProjectPath() override; + virtual bool ValidateProjectPreview(); + + FormBrowseEditWidget* m_projectPreview; + QLabel* m_projectPreviewImage; + + ProjectInfo m_projectInfo; + bool m_userChangedPreview; //! Did the user change the project preview path }; } // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index 587b5907bb..8e4c4cd321 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -13,6 +13,7 @@ set(FILES Source/Application.h Source/Application.cpp + Source/ProjectManagerDefs.h Source/ScreenDefs.h Source/ScreenFactory.h Source/ScreenFactory.cpp @@ -25,6 +26,10 @@ set(FILES Source/FormLineEditWidget.cpp Source/FormBrowseEditWidget.h Source/FormBrowseEditWidget.cpp + Source/FormFolderBrowseEditWidget.h + Source/FormFolderBrowseEditWidget.cpp + Source/FormImageBrowseEditWidget.h + Source/FormImageBrowseEditWidget.cpp Source/PathValidator.h Source/PathValidator.cpp Source/ProjectManagerWindow.h diff --git a/Code/Tools/ProjectManager/project_manager_tests_files.cmake b/Code/Tools/ProjectManager/project_manager_tests_files.cmake index e1e84a43a7..e340469bcc 100644 --- a/Code/Tools/ProjectManager/project_manager_tests_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_tests_files.cmake @@ -14,4 +14,5 @@ set(FILES Resources/ProjectManager.qss tests/ApplicationTests.cpp tests/main.cpp + tests/UtilsTests.cpp ) diff --git a/Code/Tools/ProjectManager/tests/UtilsTests.cpp b/Code/Tools/ProjectManager/tests/UtilsTests.cpp new file mode 100644 index 0000000000..e248d37bee --- /dev/null +++ b/Code/Tools/ProjectManager/tests/UtilsTests.cpp @@ -0,0 +1,120 @@ +/* + * 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 +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + namespace ProjectUtils + { + class ProjectManagerUtilsTests + : public ::UnitTest::ScopedAllocatorSetupFixture + { + public: + ProjectManagerUtilsTests() + { + m_application = AZStd::make_unique(); + m_application->Init(false); + + QDir dir; + dir.mkdir("ProjectA"); + dir.mkdir("ProjectB"); + + QFile origFile("ProjectA/origFile.txt"); + if (origFile.open(QIODevice::ReadWrite)) + { + QTextStream stream(&origFile); + stream << "orig" << Qt::endl; + origFile.close(); + } + + QFile replaceFile("ProjectA/replaceFile.txt"); + if (replaceFile.open(QIODevice::ReadWrite)) + { + QTextStream stream(&replaceFile); + stream << "replace" << Qt::endl; + replaceFile.close(); + } + } + + ~ProjectManagerUtilsTests() + { + QDir dirA("ProjectA"); + dirA.removeRecursively(); + + QDir dirB("ProjectB"); + dirB.removeRecursively(); + + m_application.reset(); + } + + AZStd::unique_ptr m_application; + }; + +#if AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS + TEST_F(ProjectManagerUtilsTests, DISABLED_MoveProject_Succeeds) +#else + TEST_F(ProjectManagerUtilsTests, MoveProject_Succeeds) +#endif // !AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS + { + EXPECT_TRUE(MoveProject( + QDir::currentPath() + QDir::separator() + "ProjectA", + QDir::currentPath() + QDir::separator() + "ProjectB", + nullptr, true)); + + QFileInfo origFile("ProjectA/origFile.txt"); + EXPECT_TRUE(!origFile.exists()); + + QFileInfo replaceFile("ProjectA/replaceFile.txt"); + EXPECT_TRUE(!replaceFile.exists()); + + QFileInfo origFileMoved("ProjectB/origFile.txt"); + EXPECT_TRUE(origFileMoved.exists() && origFileMoved.isFile()); + + QFileInfo replaceFileMoved("ProjectB/replaceFile.txt"); + EXPECT_TRUE(replaceFileMoved.exists() && replaceFileMoved.isFile()); + } + +#if AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS + TEST_F(ProjectManagerUtilsTests, DISABLED_ReplaceFile_Succeeds) +#else + TEST_F(ProjectManagerUtilsTests, ReplaceFile_Succeeds) +#endif // !AZ_TRAIT_DISABLE_FAILED_PROJECT_MANAGER_TESTS + { + EXPECT_TRUE(ReplaceFile("ProjectA/origFile.txt", "ProjectA/replaceFile.txt", nullptr, false)); + + QFile origFile("ProjectA/origFile.txt"); + if (origFile.open(QIODevice::ReadOnly)) + { + QTextStream stream(&origFile); + QString line = stream.readLine(); + EXPECT_EQ(line, "replace"); + + origFile.close(); + } + else + { + FAIL(); + } + } + } // namespace ProjectUtils +} // namespace O3DE::ProjectManager From 570696ad765e0ceacd6e4b3bfe10fca15b813def Mon Sep 17 00:00:00 2001 From: Ken Pruiksma Date: Tue, 22 Jun 2021 21:25:43 -0500 Subject: [PATCH 87/91] [ATOM-14344][ATOM-13908] Merging skinned and static mesh motion shaders using an optional vertex stream (#1491) [ATOM-14344][ATOM-13908] Merging skinned and static mesh motion shaders using an optional vertext stream. This removes the log spam "Mesh does not have all the required input streams. Missing 'POSITIONT0'." and allows Material::GetShaderCollection() to be const only as it was intended. The MeshFeatureProcessor also no longer needs to decide which motion vector shader to use, and therefore no longer has m_skinnedMeshWithMotion in the descriptor to acquire a mesh. --- .../Materials/Types/EnhancedPBR.materialtype | 10 +-- .../Assets/Materials/Types/Skin.materialtype | 9 +- .../Types/StandardMultilayerPBR.materialtype | 10 +-- .../Materials/Types/StandardPBR.materialtype | 10 +-- .../MotionVector/MeshMotionVector.azsl | 86 +++++++++++++++++++ ...nVector.shader => MeshMotionVector.shader} | 2 +- .../MotionVector/MeshMotionVectorCommon.azsli | 49 ----------- .../MotionVector/SkinnedMeshMotionVector.azsl | 34 -------- .../SkinnedMeshMotionVector.shader | 24 ------ .../MotionVector/StaticMeshMotionVector.azsl | 32 ------- .../atom_feature_common_asset_files.cmake | 7 +- .../Atom/Feature/Mesh/MeshFeatureProcessor.h | 1 - .../Mesh/MeshFeatureProcessorInterface.h | 1 - .../Code/Source/Mesh/MeshFeatureProcessor.cpp | 30 ------- .../Atom/RPI.Public/Material/Material.h | 1 - .../Source/RPI.Public/Material/Material.cpp | 5 -- .../Code/Source/AtomActorInstance.cpp | 5 +- 17 files changed, 101 insertions(+), 215 deletions(-) create mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.azsl rename Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/{StaticMeshMotionVector.shader => MeshMotionVector.shader} (89%) delete mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVectorCommon.azsli delete mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.azsl delete mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.shader delete mode 100644 Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.azsl diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype index c635f94d56..a71fc65e2a 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/EnhancedPBR.materialtype @@ -1465,14 +1465,9 @@ "file": "./EnhancedPBR_DepthPass_WithPS.shader", "tag": "DepthPass_WithPS" }, - // [GFX TODO][ATOM-4726] Use an "isSkinnedMesh" external material property and a functor that enables/disables the appropriate motion-vector shader { - "file": "Shaders/MotionVector/StaticMeshMotionVector.shader", - "tag": "StaticMeshMotionVector" - }, - { - "file": "Shaders/MotionVector/SkinnedMeshMotionVector.shader", - "tag": "SkinnedMeshMotionVector" + "file": "Shaders/MotionVector/MeshMotionVector.shader", + "tag": "MeshMotionVector" }, // Used by the light culling system to produce accurate depth bounds for this object when it uses blended transparency { @@ -1669,4 +1664,3 @@ "UV1": "Unwrapped" } } - diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype index dfe2fad60f..fe86576cf8 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/Skin.materialtype @@ -980,14 +980,9 @@ "file": "Shaders/Depth/DepthPass.shader", "tag": "DepthPass" }, - // [GFX TODO][ATOM-4726] Use an "isSkinnedMesh" external material property and a functor that enables/disables the appropriate motion-vector shader { - "file": "Shaders/MotionVector/StaticMeshMotionVector.shader", - "tag": "StaticMeshMotionVector" - }, - { - "file": "Shaders/MotionVector/SkinnedMeshMotionVector.shader", - "tag": "SkinnedMeshMotionVector" + "file": "Shaders/MotionVector/MeshMotionVector.shader", + "tag": "MeshMotionVector" } ], "functors": [ diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype index d9a21e7662..bccb530eb4 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardMultilayerPBR.materialtype @@ -2632,14 +2632,9 @@ "file": "./StandardMultilayerPBR_DepthPass_WithPS.shader", "tag": "DepthPass_WithPS" }, - // [GFX TODO][ATOM-4726] Use an "isSkinnedMesh" external material property and a functor that enables/disables the appropriate motion-vector shader { - "file": "Shaders/MotionVector/StaticMeshMotionVector.shader", - "tag": "StaticMeshMotionVector" - }, - { - "file": "Shaders/MotionVector/SkinnedMeshMotionVector.shader", - "tag": "SkinnedMeshMotionVector" + "file": "Shaders/MotionVector/MeshMotionVector.shader", + "tag": "MeshMotionVector" } ], "functors": [ @@ -3103,4 +3098,3 @@ "UV1": "Unwrapped" } } - diff --git a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype index fd2c74dae0..93220973df 100644 --- a/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype +++ b/Gems/Atom/Feature/Common/Assets/Materials/Types/StandardPBR.materialtype @@ -1030,14 +1030,9 @@ "file": "./StandardPBR_DepthPass_WithPS.shader", "tag": "DepthPass_WithPS" }, - // [GFX TODO][ATOM-4726] Use an "isSkinnedMesh" external material property and a functor that enables/disables the appropriate motion-vector shader { - "file": "Shaders/MotionVector/StaticMeshMotionVector.shader", - "tag": "StaticMeshMotionVector" - }, - { - "file": "Shaders/MotionVector/SkinnedMeshMotionVector.shader", - "tag": "SkinnedMeshMotionVector" + "file": "Shaders/MotionVector/MeshMotionVector.shader", + "tag": "MeshMotionVector" }, // Used by the light culling system to produce accurate depth bounds for this object when it uses blended transparency { @@ -1187,4 +1182,3 @@ "UV1": "Unwrapped" } } - diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.azsl new file mode 100644 index 0000000000..3fb3fc0fd8 --- /dev/null +++ b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.azsl @@ -0,0 +1,86 @@ +/* +* 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 +#include + +#include +#include + +struct VSInput +{ + float3 m_position : POSITION; + + // This gets set automatically by the system at runtime only if it's available. + // There is a soft naming convention that associates this with o_prevPosition_isBound, which will be set to true whenever m_optional_prevPosition is available. + // (search "m_optional_" in ShaderVariantAssetBuilder for details on the naming convention). + // [GFX TODO][ATOM-14475]: Come up with a more elegant way to associate the isBound flag with the input stream. + // Vertex position of last frame to capture small scale motion due to vertex animation + float3 m_optional_prevPosition : POSITIONT; +}; + +struct VSOutput +{ + float4 m_position : SV_Position; + float3 m_worldPos : TEXCOORD0; + float3 m_worldPosPrev: TEXCOORD1; +}; + +struct PSOutput +{ + float2 m_motion : SV_Target0; +}; + +// Indicates whether the vertex input struct's "m_optional_prevPosition" is bound. If false, it is not safe to read from m_optional_prevPosition. +// This option gets set automatically by the system at runtime; there is a soft naming convention that associates it with m_optional_prevPosition. +// (search "m_optional_" in ShaderVariantAssetBuilder for details on the naming convention). +// [GFX TODO][ATOM-14475]: Come up with a more elegant way to associate the isBound flag with the input stream. +option bool o_prevPosition_isBound; + +VSOutput MainVS(VSInput IN) +{ + VSOutput OUT; + + OUT.m_worldPos = mul(SceneSrg::GetObjectToWorldMatrix(ObjectSrg::m_objectId), float4(IN.m_position, 1.0)).xyz; + OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(OUT.m_worldPos, 1.0)); + + if (o_prevPosition_isBound) + { + OUT.m_worldPosPrev = mul(SceneSrg::GetObjectToWorldMatrixPrev(ObjectSrg::m_objectId), float4(IN.m_optional_prevPosition, 1.0)).xyz; + } + else + { + OUT.m_worldPosPrev = mul(SceneSrg::GetObjectToWorldMatrixPrev(ObjectSrg::m_objectId), float4(IN.m_position, 1.0)).xyz; + } + + return OUT; +} + +PSOutput MainPS(VSOutput IN) +{ + PSOutput OUT; + + // Current clip position + float4 clipPos = mul(ViewSrg::m_viewProjectionMatrix, float4(IN.m_worldPos, 1.0)); + + // Reprojected last frame's clip position, for skinned mesh it also implies last key frame + float4 clipPosPrev = mul(ViewSrg::m_viewProjectionPrevMatrix, float4(IN.m_worldPosPrev, 1.0)); + + float2 motion = (clipPos.xy / clipPos.w - clipPosPrev.xy / clipPosPrev.w) * 0.5; + + OUT.m_motion = motion; + + // Flip y to line up with uv coordinates + OUT.m_motion.y = -OUT.m_motion.y; + + return OUT; +} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.shader b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.shader similarity index 89% rename from Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.shader rename to Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.shader index 0d580b1b10..c585060f3d 100644 --- a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.shader +++ b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVector.shader @@ -1,5 +1,5 @@ { - "Source" : "StaticMeshMotionVector", + "Source" : "MeshMotionVector", "DepthStencilState" : { "Depth" : { "Enable" : true, "CompareFunc" : "GreaterEqual" } diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVectorCommon.azsli b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVectorCommon.azsli deleted file mode 100644 index ff2758af87..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/MeshMotionVectorCommon.azsli +++ /dev/null @@ -1,49 +0,0 @@ -/* -* 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 -#include - -#include -#include - -struct VSOutput -{ - float4 m_position : SV_Position; - float3 m_worldPos : TEXCOORD0; - float3 m_worldPosPrev: TEXCOORD1; -}; - -struct PSOutput -{ - float2 m_motion : SV_Target0; -}; - -PSOutput MainPS(VSOutput IN) -{ - PSOutput OUT; - - // Current clip position - float4 clipPos = mul(ViewSrg::m_viewProjectionMatrix, float4(IN.m_worldPos, 1.0)); - - // Reprojected last frame's clip position, for skinned mesh it also implies last key frame - float4 clipPosPrev = mul(ViewSrg::m_viewProjectionPrevMatrix, float4(IN.m_worldPosPrev, 1.0)); - - float2 motion = (clipPos.xy / clipPos.w - clipPosPrev.xy / clipPosPrev.w) * 0.5; - - OUT.m_motion = motion; - - // Flip y to line up with uv coordinates - OUT.m_motion.y = -OUT.m_motion.y; - - return OUT; -} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.azsl deleted file mode 100644 index dcbba22b2a..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.azsl +++ /dev/null @@ -1,34 +0,0 @@ -/* -* 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 "./MeshMotionVectorCommon.azsli" - -struct VSInput -{ - float3 m_position : POSITION; - // Vertex position of last frame to capture small scale motion due to vertex animation - float3 m_prevPosition : POSITIONT; -}; - -VSOutput MainVS(VSInput IN) -{ - VSOutput OUT; - - OUT.m_worldPos = mul(SceneSrg::GetObjectToWorldMatrix(ObjectSrg::m_objectId), float4(IN.m_position, 1.0)).xyz; - OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(OUT.m_worldPos, 1.0)); - OUT.m_worldPosPrev = mul(SceneSrg::GetObjectToWorldMatrixPrev(ObjectSrg::m_objectId), float4(IN.m_prevPosition, 1.0)).xyz; - - return OUT; -} - - - diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.shader b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.shader deleted file mode 100644 index 66d2fd88c5..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/SkinnedMeshMotionVector.shader +++ /dev/null @@ -1,24 +0,0 @@ -{ - "Source" : "SkinnedMeshMotionVector", - - "DepthStencilState" : { - "Depth" : { "Enable" : true, "CompareFunc" : "GreaterEqual" } - }, - - "DrawList" : "motion", - - "ProgramSettings": - { - "EntryPoints": - [ - { - "name": "MainVS", - "type": "Vertex" - }, - { - "name": "MainPS", - "type": "Fragment" - } - ] - } -} diff --git a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.azsl b/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.azsl deleted file mode 100644 index 11bc528f3b..0000000000 --- a/Gems/Atom/Feature/Common/Assets/Shaders/MotionVector/StaticMeshMotionVector.azsl +++ /dev/null @@ -1,32 +0,0 @@ -/* -* 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 "./MeshMotionVectorCommon.azsli" - -struct VSInput -{ - float3 m_position : POSITION; -}; - -VSOutput MainVS(VSInput IN) -{ - VSOutput OUT; - - OUT.m_worldPos = mul(SceneSrg::GetObjectToWorldMatrix(ObjectSrg::m_objectId), float4(IN.m_position, 1.0)).xyz; - OUT.m_position = mul(ViewSrg::m_viewProjectionMatrix, float4(OUT.m_worldPos, 1.0)); - OUT.m_worldPosPrev = mul(SceneSrg::GetObjectToWorldMatrixPrev(ObjectSrg::m_objectId), float4(IN.m_position, 1.0)).xyz; - - return OUT; -} - - - diff --git a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake index 3dfabc586a..6a2721d4af 100644 --- a/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake +++ b/Gems/Atom/Feature/Common/Assets/atom_feature_common_asset_files.cmake @@ -354,11 +354,8 @@ set(FILES Shaders/MorphTargets/MorphTargetSRG.azsli Shaders/MotionVector/CameraMotionVector.azsl Shaders/MotionVector/CameraMotionVector.shader - Shaders/MotionVector/MeshMotionVectorCommon.azsli - Shaders/MotionVector/SkinnedMeshMotionVector.azsl - Shaders/MotionVector/SkinnedMeshMotionVector.shader - Shaders/MotionVector/StaticMeshMotionVector.azsl - Shaders/MotionVector/StaticMeshMotionVector.shader + Shaders/MotionVector/MeshMotionVector.azsl + Shaders/MotionVector/MeshMotionVector.shader Shaders/PostProcessing/AcesOutputTransformLut.azsl Shaders/PostProcessing/AcesOutputTransformLut.shader Shaders/PostProcessing/ApplyShaperLookupTable.azsl diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h index f1156cfe37..391a60a68d 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessor.h @@ -72,7 +72,6 @@ namespace AZ void UpdateDrawPackets(bool forceUpdate = false); void BuildCullable(); void UpdateCullBounds(const TransformServiceFeatureProcessor* transformService); - void SelectMotionVectorShader(Data::Instance material); void UpdateObjectSrg(); bool MaterialRequiresForwardPassIblSpecular(Data::Instance material) const; diff --git a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h index d5a6ac1c3e..7cf9ab9685 100644 --- a/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h +++ b/Gems/Atom/Feature/Common/Code/Include/Atom/Feature/Mesh/MeshFeatureProcessorInterface.h @@ -32,7 +32,6 @@ namespace AZ using RequiresCloneCallback = AZStd::function& modelAsset)>; Data::Asset m_modelAsset; - bool m_isSkinnedMeshWithMotion = false; bool m_isRayTracingEnabled = true; bool m_useForwardPassIblSpecular = false; RequiresCloneCallback m_requiresCloneCallback = {}; diff --git a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp index f51defc0f3..7867faf02a 100644 --- a/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/Mesh/MeshFeatureProcessor.cpp @@ -158,11 +158,6 @@ namespace AZ MeshHandle meshDataHandle = m_meshData.emplace(); meshDataHandle->m_descriptor = descriptor; - - // Always disable ray tracing flag on skinned meshes - // [GFX TODO][ATOM-13067] Enable raytracing on skinned meshes - meshDataHandle->m_descriptor.m_isRayTracingEnabled &= !descriptor.m_isSkinnedMeshWithMotion; - meshDataHandle->m_scene = GetParentScene(); meshDataHandle->m_materialAssignments = materials; meshDataHandle->m_objectId = m_transformService->ReserveObjectId(); @@ -665,8 +660,6 @@ namespace AZ } } - SelectMotionVectorShader(material); - // setup the mesh draw packet RPI::MeshDrawPacket drawPacket(modelLod, meshIndex, material, m_shaderResourceGroup, materialAssignment.m_matModUvOverrides); @@ -1091,29 +1084,6 @@ namespace AZ m_cullBoundsNeedsUpdate = false; } - void MeshDataInstance::SelectMotionVectorShader(Data::Instance material) - { - // Two motion vector shaders are defined in the material for static mesh (only animated by transform matrix) - // and skinned mesh (per vertex animation) respectively, it's because they have different input signatures - // (skinned mesh needs two streaming channels while static mesh only needs one) that cannot be addressed by shader option - // itself. Therefore this function is used to pick one to use and disable the other one depending on the type of the mesh - // so it won't cause errors due to missing input streaming channel. - - //[GFX TODO][ATOM-4726] Replace this with a "isSkinnedMesh" external material property and a functor that enables/disables the appropriate shader - for (auto& shaderItem : material->GetShaderCollection()) - { - if (shaderItem.GetShaderAsset()->GetName() == Name{ "StaticMeshMotionVector" } && m_descriptor.m_isSkinnedMeshWithMotion) - { - shaderItem.SetEnabled(false); - } - - if (shaderItem.GetShaderAsset()->GetName() == Name{ "SkinnedMeshMotionVector" } && (!m_descriptor.m_isSkinnedMeshWithMotion)) - { - shaderItem.SetEnabled(false); - } - } - } - void MeshDataInstance::UpdateObjectSrg() { if (!m_shaderResourceGroup) diff --git a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Material/Material.h b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Material/Material.h index fa1bb57166..6cffe4a47d 100644 --- a/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Material/Material.h +++ b/Gems/Atom/RPI/Code/Include/Atom/RPI.Public/Material/Material.h @@ -105,7 +105,6 @@ namespace AZ ChangeId GetCurrentChangeId() const; //! Return the set of shaders to be run by this material. - ShaderCollection& GetShaderCollection(); const ShaderCollection& GetShaderCollection() const; //! Attempts to set the value of a system-level shader option that is controlled by this material. diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp index 3302190156..3f376ccf25 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Material/Material.cpp @@ -164,11 +164,6 @@ namespace AZ Data::AssetBus::Handler::BusDisconnect(); } - ShaderCollection& Material::GetShaderCollection() - { - return m_shaderCollection; - } - const ShaderCollection& Material::GetShaderCollection() const { return m_shaderCollection; diff --git a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp index f4d4144796..29dee12489 100644 --- a/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp +++ b/Gems/AtomLyIntegration/EMotionFXAtom/Code/Source/AtomActorInstance.cpp @@ -628,7 +628,10 @@ namespace AZ { MeshHandleDescriptor meshDescriptor; meshDescriptor.m_modelAsset = m_skinnedMeshInstance->m_model->GetModelAsset(); - meshDescriptor.m_isSkinnedMeshWithMotion = true; + + // [GFX TODO][ATOM-13067] Enable raytracing on skinned meshes + meshDescriptor.m_isRayTracingEnabled = false; + m_meshHandle = AZStd::make_shared( m_meshFeatureProcessor->AcquireMesh(meshDescriptor, materials)); } From bc3aa45ed951acc17a0090bf397261524be64a86 Mon Sep 17 00:00:00 2001 From: AMZN-nggieber <52797929+AMZN-nggieber@users.noreply.github.com> Date: Tue, 22 Jun 2021 19:44:33 -0700 Subject: [PATCH 88/91] Prism Show Gem Requirements and Prompt when Adding Gems with Requirements (#1478) * Added requirements section to gem inspector * Added Dialog when configuring for gems with extra requirements --- .../Resources/ProjectManager.qrc | 1 + .../ProjectManager/Resources/Warning.svg | 5 + .../Source/CreateProjectCtrl.cpp | 6 +- .../Source/GemCatalog/GemCatalogScreen.cpp | 20 +++- .../Source/GemCatalog/GemCatalogScreen.h | 2 +- .../Source/GemCatalog/GemInfo.h | 1 + .../Source/GemCatalog/GemInspector.cpp | 39 ++++++++ .../Source/GemCatalog/GemInspector.h | 5 + .../Source/GemCatalog/GemItemDelegate.cpp | 2 +- .../Source/GemCatalog/GemItemDelegate.h | 3 +- .../Source/GemCatalog/GemListView.cpp | 6 +- .../Source/GemCatalog/GemListView.h | 1 - .../Source/GemCatalog/GemModel.cpp | 24 +++++ .../Source/GemCatalog/GemModel.h | 7 +- .../GemCatalog/GemRequirementDelegate.cpp | 93 +++++++++++++++++++ .../GemCatalog/GemRequirementDelegate.h | 37 ++++++++ .../GemCatalog/GemRequirementDialog.cpp | 92 ++++++++++++++++++ .../Source/GemCatalog/GemRequirementDialog.h | 41 ++++++++ .../GemRequirementFilterProxyModel.cpp | 51 ++++++++++ .../GemRequirementFilterProxyModel.h | 44 +++++++++ .../GemCatalog/GemRequirementListView.cpp | 30 ++++++ .../GemCatalog/GemRequirementListView.h | 32 +++++++ .../ProjectManager/Source/PythonBindings.cpp | 1 + .../Source/UpdateProjectCtrl.cpp | 6 +- .../project_manager_files.cmake | 8 ++ 25 files changed, 545 insertions(+), 12 deletions(-) create mode 100644 Code/Tools/ProjectManager/Resources/Warning.svg create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.cpp create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.h create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.cpp create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.h create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.cpp create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.h create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.cpp create mode 100644 Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.h diff --git a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc index 33acfa9e1b..014a098a91 100644 --- a/Code/Tools/ProjectManager/Resources/ProjectManager.qrc +++ b/Code/Tools/ProjectManager/Resources/ProjectManager.qrc @@ -31,5 +31,6 @@ CarrotArrowDown.svg Summary.svg WindowClose.svg + Warning.svg diff --git a/Code/Tools/ProjectManager/Resources/Warning.svg b/Code/Tools/ProjectManager/Resources/Warning.svg new file mode 100644 index 0000000000..28f7bc5f42 --- /dev/null +++ b/Code/Tools/ProjectManager/Resources/Warning.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp index 0e3a4ba95d..93f8895079 100644 --- a/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/CreateProjectCtrl.cpp @@ -206,7 +206,11 @@ namespace O3DE::ProjectManager PythonBindingsInterface::Get()->AddProject(projectInfo.m_path); #ifdef TEMPLATE_GEM_CONFIGURATION_ENABLED - m_gemCatalogScreen->EnableDisableGemsForProject(projectInfo.m_path); + if (!m_gemCatalogScreen->EnableDisableGemsForProject(projectInfo.m_path)) + { + QMessageBox::critical(this, tr("Failed to configure gems"), tr("Failed to configure gems for template.")); + return; + } #endif // TEMPLATE_GEM_CONFIGURATION_ENABLED projectInfo.m_needsBuild = true; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp index 2c92af4e51..763c9dfb75 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.cpp @@ -14,6 +14,7 @@ #include #include #include +#include #include #include #include @@ -144,12 +145,23 @@ namespace O3DE::ProjectManager } } - void GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath) + bool GemCatalogScreen::EnableDisableGemsForProject(const QString& projectPath) { IPythonBindings* pythonBindings = PythonBindingsInterface::Get(); QVector toBeAdded = m_gemModel->GatherGemsToBeAdded(); QVector toBeRemoved = m_gemModel->GatherGemsToBeRemoved(); + if (m_gemModel->DoGemsToBeAddedHaveRequirements()) + { + GemRequirementDialog* confirmRequirementsDialog = new GemRequirementDialog(m_gemModel, toBeAdded, this); + confirmRequirementsDialog->exec(); + + if (confirmRequirementsDialog->GetButtonResult() != QDialogButtonBox::ApplyRole) + { + return false; + } + } + for (const QModelIndex& modelIndex : toBeAdded) { const QString gemPath = GemModel::GetPath(modelIndex); @@ -158,6 +170,8 @@ namespace O3DE::ProjectManager { QMessageBox::critical(nullptr, "Operation failed", QString("Cannot add gem %1 to project.\n\nError:\n%2").arg(GemModel::GetName(modelIndex), result.GetError().c_str())); + + return false; } } @@ -169,8 +183,12 @@ namespace O3DE::ProjectManager { QMessageBox::critical(nullptr, "Operation failed", QString("Cannot remove gem %1 from project.\n\nError:\n%2").arg(GemModel::GetName(modelIndex), result.GetError().c_str())); + + return false; } } + + return true; } ProjectManagerScreen GemCatalogScreen::GetScreenEnum() diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h index f5092e837a..fc771d9168 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemCatalogScreen.h @@ -33,7 +33,7 @@ namespace O3DE::ProjectManager ProjectManagerScreen GetScreenEnum() override; void ReinitForProject(const QString& projectPath, bool isNewProject); - void EnableDisableGemsForProject(const QString& projectPath); + bool EnableDisableGemsForProject(const QString& projectPath); private: void FillModel(const QString& projectPath, bool isNewProject); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h index 722783ece1..f99e9689f3 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInfo.h @@ -73,6 +73,7 @@ namespace O3DE::ProjectManager Platforms m_platforms; Types m_types; //! Asset and/or Code and/or Tool QStringList m_features; + QString m_requirement; QString m_directoryLink; QString m_documentationLink; QString m_version = "Unknown Version"; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp index 3ecc18231e..119ec68d3a 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.cpp @@ -16,6 +16,7 @@ #include #include #include +#include namespace O3DE::ProjectManager { @@ -70,6 +71,22 @@ namespace O3DE::ProjectManager m_directoryLinkLabel->SetUrl(m_model->GetDirectoryLink(modelIndex)); m_documentationLinkLabel->SetUrl(m_model->GetDocLink(modelIndex)); + if (m_model->HasRequirement(modelIndex)) + { + m_reqirementsIconLabel->show(); + m_reqirementsTitleLabel->show(); + m_reqirementsTextLabel->show(); + + m_reqirementsTitleLabel->setText("Requirement"); + m_reqirementsTextLabel->setText(m_model->GetRequirement(modelIndex)); + } + else + { + m_reqirementsIconLabel->hide(); + m_reqirementsTitleLabel->hide(); + m_reqirementsTextLabel->hide(); + } + // Depending and conflicting gems m_dependingGems->Update("Depending Gems", "The following Gems will be automatically enabled with this Gem.", m_model->GetDependingGemNames(modelIndex)); m_conflictingGems->Update("Conflicting Gems", "The following Gems will be automatically disabled with this Gem.", m_model->GetConflictingGemNames(modelIndex)); @@ -134,6 +151,28 @@ namespace O3DE::ProjectManager m_mainLayout->addSpacing(10); + // Requirements + m_reqirementsTitleLabel = GemInspector::CreateStyledLabel(m_mainLayout, 16, s_headerColor); + + QHBoxLayout* requrementsLayout = new QHBoxLayout(); + requrementsLayout->setAlignment(Qt::AlignTop); + requrementsLayout->setMargin(0); + requrementsLayout->setSpacing(0); + + m_reqirementsIconLabel = new QLabel(); + m_reqirementsIconLabel->setPixmap(QIcon(":/Warning.svg").pixmap(24, 24)); + requrementsLayout->addWidget(m_reqirementsIconLabel); + + m_reqirementsTextLabel = GemInspector::CreateStyledLabel(requrementsLayout, 10, s_textColor); + m_reqirementsTextLabel->setWordWrap(true); + + QSpacerItem* reqirementsSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding); + requrementsLayout->addSpacerItem(reqirementsSpacer); + + m_mainLayout->addLayout(requrementsLayout); + + m_mainLayout->addSpacing(20); + // Depending and conflicting gems m_dependingGems = new GemsSubWidget(); m_mainLayout->addWidget(m_dependingGems); diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h index 69c065c81e..4363ea3bc1 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemInspector.h @@ -76,6 +76,11 @@ namespace O3DE::ProjectManager LinkLabel* m_directoryLinkLabel = nullptr; LinkLabel* m_documentationLinkLabel = nullptr; + // Requirements + QLabel* m_reqirementsTitleLabel = nullptr; + QLabel* m_reqirementsIconLabel = nullptr; + QLabel* m_reqirementsTextLabel = nullptr; + // Depending and conflicting gems GemsSubWidget* m_dependingGems = nullptr; GemsSubWidget* m_conflictingGems = nullptr; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp index 03787de7e8..6529e4cf3d 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.cpp @@ -11,7 +11,7 @@ */ #include -#include "GemModel.h" +#include #include #include #include diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h index 48f173ec3f..a155d9ece0 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemItemDelegate.h @@ -62,7 +62,7 @@ namespace O3DE::ProjectManager inline constexpr static int s_buttonCircleRadius = s_buttonBorderRadius - 2; inline constexpr static qreal s_buttonFontSize = 10.0; - private: + protected: void CalcRects(const QStyleOptionViewItem& option, QRect& outFullRect, QRect& outItemRect, QRect& outContentRect) const; QRect GetTextRect(QFont& font, const QString& text, qreal fontSize) const; QRect CalcButtonRect(const QRect& contentRect) const; @@ -71,6 +71,7 @@ namespace O3DE::ProjectManager QAbstractItemModel* m_model = nullptr; + private: // Platform icons void AddPlatformIcon(GemInfo::Platform platform, const QString& iconPath); inline constexpr static int s_platformIconSize = 12; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.cpp index 2838277696..575c09db05 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.cpp @@ -10,11 +10,9 @@ * */ -#include "GemListView.h" -#include "GemItemDelegate.h" +#include +#include #include -#include -#include namespace O3DE::ProjectManager { diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.h index 178de2395f..5f1a018b9f 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemListView.h @@ -13,7 +13,6 @@ #pragma once #if !defined(Q_MOC_RUN) -#include "GemInfo.h" #include #include #include diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp index 5dc40723c9..7d9d86e3a7 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.cpp @@ -49,6 +49,7 @@ namespace O3DE::ProjectManager item->setData(gemInfo.m_binarySizeInKB, RoleBinarySize); item->setData(gemInfo.m_features, RoleFeatures); item->setData(gemInfo.m_path, RolePath); + item->setData(gemInfo.m_requirement, RoleRequirement); appendRow(item); @@ -183,6 +184,11 @@ namespace O3DE::ProjectManager return modelIndex.data(RolePath).toString(); } + QString GemModel::GetRequirement(const QModelIndex& modelIndex) + { + return modelIndex.data(RoleRequirement).toString(); + } + bool GemModel::IsAdded(const QModelIndex& modelIndex) { return modelIndex.data(RoleIsAdded).toBool(); @@ -208,6 +214,24 @@ namespace O3DE::ProjectManager return (modelIndex.data(RoleWasPreviouslyAdded).toBool() && !modelIndex.data(RoleIsAdded).toBool()); } + bool GemModel::HasRequirement(const QModelIndex& modelIndex) + { + return !modelIndex.data(RoleRequirement).toString().isEmpty(); + } + + bool GemModel::DoGemsToBeAddedHaveRequirements() const + { + for (int row = 0; row < rowCount(); ++row) + { + const QModelIndex modelIndex = index(row, 0); + if (NeedsToBeAdded(modelIndex) && HasRequirement(modelIndex)) + { + return true; + } + } + return false; + } + QVector GemModel::GatherGemsToBeAdded() const { QVector result; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h index 2e05472cdf..301053a9bf 100644 --- a/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemModel.h @@ -53,12 +53,16 @@ namespace O3DE::ProjectManager static int GetBinarySizeInKB(const QModelIndex& modelIndex); static QStringList GetFeatures(const QModelIndex& modelIndex); static QString GetPath(const QModelIndex& modelIndex); + static QString GetRequirement(const QModelIndex& modelIndex); static bool IsAdded(const QModelIndex& modelIndex); static void SetIsAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool isAdded); static void SetWasPreviouslyAdded(QAbstractItemModel& model, const QModelIndex& modelIndex, bool wasAdded); static bool NeedsToBeAdded(const QModelIndex& modelIndex); static bool NeedsToBeRemoved(const QModelIndex& modelIndex); + static bool HasRequirement(const QModelIndex& modelIndex); + + bool DoGemsToBeAddedHaveRequirements() const; QVector GatherGemsToBeAdded() const; QVector GatherGemsToBeRemoved() const; @@ -84,7 +88,8 @@ namespace O3DE::ProjectManager RoleBinarySize, RoleFeatures, RoleTypes, - RolePath + RolePath, + RoleRequirement }; QHash m_nameToIndexMap; diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.cpp new file mode 100644 index 0000000000..07024a799b --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.cpp @@ -0,0 +1,93 @@ +/* +* 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 +#include + +#include + +namespace O3DE::ProjectManager +{ + GemRequirementDelegate::GemRequirementDelegate(QAbstractItemModel* model, QObject* parent) + : GemItemDelegate(model, parent) + { + } + + void GemRequirementDelegate::paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& modelIndex) const + { + if (!modelIndex.isValid()) + { + return; + } + + QStyleOptionViewItem options(option); + initStyleOption(&options, modelIndex); + + painter->save(); + painter->setRenderHint(QPainter::Antialiasing); + + QRect fullRect, itemRect, contentRect; + CalcRects(options, fullRect, itemRect, contentRect); + + QFont standardFont(options.font); + standardFont.setPixelSize(s_fontSize); + QFontMetrics standardFontMetrics(standardFont); + + painter->save(); + painter->setClipping(true); + painter->setClipRect(fullRect); + painter->setFont(options.font); + + // Draw background + painter->fillRect(fullRect, m_backgroundColor); + + // Draw item background + const QColor itemBackgroundColor = m_itemBackgroundColor; + painter->fillRect(itemRect, itemBackgroundColor); + + // Gem name + QString gemName = GemModel::GetName(modelIndex); + QFont gemNameFont(options.font); + const int firstColumnMaxTextWidth = s_summaryStartX - 30; + gemName = QFontMetrics(gemNameFont).elidedText(gemName, Qt::TextElideMode::ElideRight, firstColumnMaxTextWidth); + gemNameFont.setPixelSize(s_gemNameFontSize); + gemNameFont.setBold(true); + QRect gemNameRect = GetTextRect(gemNameFont, gemName, s_gemNameFontSize); + gemNameRect.moveTo(contentRect.left(), contentRect.center().y() - s_gemNameFontSize); + + painter->setFont(gemNameFont); + painter->setPen(m_textColor); + painter->drawText(gemNameRect, Qt::TextSingleLine, gemName); + + // Gem requirement + const QSize requirementSize = QSize(contentRect.width() - s_summaryStartX - s_itemMargins.right(), contentRect.height()); + const QRect requirementRect = QRect(QPoint(contentRect.left() + s_summaryStartX, contentRect.top()), requirementSize); + + painter->setFont(standardFont); + painter->setPen(m_textColor); + + const QString requirement = GemModel::GetRequirement(modelIndex); + painter->drawText(requirementRect, Qt::AlignLeft | Qt::TextWordWrap, requirement); + + painter->restore(); + } + + bool GemRequirementDelegate::editorEvent( + [[maybe_unused]] QEvent* event, + [[maybe_unused]] QAbstractItemModel* model, + [[maybe_unused]] const QStyleOptionViewItem& option, + [[maybe_unused]] const QModelIndex& modelIndex) + { + // Do nothing here + return false; + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.h new file mode 100644 index 0000000000..b221dcb8fe --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDelegate.h @@ -0,0 +1,37 @@ +/* +* 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 + +#if !defined(Q_MOC_RUN) +#include +#endif + + +namespace O3DE::ProjectManager +{ + class GemRequirementDelegate + : public GemItemDelegate + { + Q_OBJECT // AUTOMOC + + public: + explicit GemRequirementDelegate(QAbstractItemModel* model, QObject* parent = nullptr); + ~GemRequirementDelegate() = default; + + void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& modelIndex) const override; + bool editorEvent(QEvent* event, QAbstractItemModel* model, const QStyleOptionViewItem& option, const QModelIndex& modelIndex) override; + + const QColor m_backgroundColor = QColor("#444444"); // Outside of the actual gem item + const QColor m_itemBackgroundColor = QColor("#393939"); // Background color of the gem item + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.cpp new file mode 100644 index 0000000000..ad0e64b1ca --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.cpp @@ -0,0 +1,92 @@ +/* + * 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 +#include +#include + +#include +#include +#include +#include +#include +#include + +namespace O3DE::ProjectManager +{ + GemRequirementDialog::GemRequirementDialog(GemModel* model, const QVector& gemsToAdd, QWidget* parent) + : QDialog(parent) + { + setWindowTitle(tr("Manual setup is required")); + setModal(true); + + QVBoxLayout* vLayout = new QVBoxLayout(); + vLayout->setMargin(0); + vLayout->setContentsMargins(25, 10, 25, 10); + vLayout->setSizeConstraint(QLayout::SetFixedSize); + setLayout(vLayout); + + QHBoxLayout* instructionLayout = new QHBoxLayout(); + instructionLayout->setMargin(0); + + QLabel* instructionIconLabel = new QLabel(); + instructionIconLabel->setPixmap(QIcon(":/Warning.svg").pixmap(32, 32)); + instructionLayout->addWidget(instructionIconLabel); + + instructionLayout->addSpacing(10); + + QLabel* instructionLabel = new QLabel(tr("The following Gem(s) require manual setup before the project can be built successfully.")); + instructionLabel->setAlignment(Qt::AlignLeft | Qt::AlignVCenter); + instructionLayout->addWidget(instructionLabel); + + QSpacerItem* instructionSpacer = new QSpacerItem(0, 0, QSizePolicy::Expanding, QSizePolicy::Minimum); + instructionLayout->addSpacerItem(instructionSpacer); + + vLayout->addLayout(instructionLayout); + + vLayout->addSpacing(20); + + GemRequirementFilterProxyModel* proxModel = new GemRequirementFilterProxyModel(model, gemsToAdd, this); + + GemRequirementListView* m_gemListView = new GemRequirementListView(proxModel, proxModel->GetSelectionModel(), this); + vLayout->addWidget(m_gemListView); + + QDialogButtonBox* dialogButtons = new QDialogButtonBox(); + dialogButtons->setObjectName("footer"); + vLayout->addWidget(dialogButtons); + + QPushButton* cancelButton = dialogButtons->addButton(tr("Cancel"), QDialogButtonBox::RejectRole); + cancelButton->setProperty("secondary", true); + QPushButton* continueButton = dialogButtons->addButton(tr("Continue"), QDialogButtonBox::ApplyRole); + + connect(cancelButton, &QPushButton::clicked, this, &GemRequirementDialog::CancelButtonPressed); + connect(continueButton, &QPushButton::clicked, this, &GemRequirementDialog::ContinueButtonPressed); + } + + QDialogButtonBox::ButtonRole GemRequirementDialog::GetButtonResult() + { + return m_buttonResult; + } + + void GemRequirementDialog::CancelButtonPressed() + { + m_buttonResult = QDialogButtonBox::RejectRole; + close(); + } + + void GemRequirementDialog::ContinueButtonPressed() + { + m_buttonResult = QDialogButtonBox::ApplyRole; + close(); + } + +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.h new file mode 100644 index 0000000000..4295c5d586 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementDialog.h @@ -0,0 +1,41 @@ +/* + * 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 + +#if !defined(Q_MOC_RUN) +#include + +#include +#endif + +namespace O3DE::ProjectManager +{ + QT_FORWARD_DECLARE_CLASS(GemModel) + + class GemRequirementDialog + : public QDialog + { + Q_OBJECT // AUTOMOC + public: + explicit GemRequirementDialog(GemModel* model, const QVector& gemsToAdd, QWidget *parent = nullptr); + ~GemRequirementDialog() = default; + + QDialogButtonBox::ButtonRole GetButtonResult(); + + private: + void CancelButtonPressed(); + void ContinueButtonPressed(); + + QDialogButtonBox::ButtonRole m_buttonResult = QDialogButtonBox::RejectRole; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.cpp new file mode 100644 index 0000000000..120ec63313 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.cpp @@ -0,0 +1,51 @@ +/* +* 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 +#include + +#include + +namespace O3DE::ProjectManager +{ + GemRequirementFilterProxyModel::GemRequirementFilterProxyModel(GemModel* sourceModel, const QVector& addedGems, QObject* parent) + : QSortFilterProxyModel(parent) + , m_sourceModel(sourceModel) + , m_addedGems(addedGems) + { + setSourceModel(sourceModel); + m_selectionProxyModel = new AzQtComponents::SelectionProxyModel(sourceModel->GetSelectionModel(), this, parent); + } + + bool GemRequirementFilterProxyModel::filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const + { + // Do not use sourceParent->child because an invalid parent does not produce valid children (which our index function does) + QModelIndex sourceIndex = sourceModel()->index(sourceRow, 0, sourceParent); + if (!sourceIndex.isValid()) + { + return false; + } + + if (!m_addedGems.contains(sourceIndex)) + { + return false; + } + + if (!m_sourceModel->HasRequirement(sourceIndex)) + { + return false; + } + + return true; + } + +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.h new file mode 100644 index 0000000000..a891d63d0c --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementFilterProxyModel.h @@ -0,0 +1,44 @@ +/* +* 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 + +#if !defined(Q_MOC_RUN) +#include +#include +#endif + +QT_FORWARD_DECLARE_CLASS(QItemSelectionModel) + +namespace O3DE::ProjectManager +{ + QT_FORWARD_DECLARE_CLASS(GemModel) + + class GemRequirementFilterProxyModel + : public QSortFilterProxyModel + { + Q_OBJECT // AUTOMOC + + public: + GemRequirementFilterProxyModel(GemModel* sourceModel, const QVector& addedGems, QObject* parent = nullptr); + + AzQtComponents::SelectionProxyModel* GetSelectionModel() const { return m_selectionProxyModel; } + + bool filterAcceptsRow(int sourceRow, const QModelIndex& sourceParent) const override; + + private: + GemModel* m_sourceModel = nullptr; + AzQtComponents::SelectionProxyModel* m_selectionProxyModel = nullptr; + + QVector m_addedGems; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.cpp b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.cpp new file mode 100644 index 0000000000..a86ae876c2 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.cpp @@ -0,0 +1,30 @@ +/* +* 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 +#include +#include + +namespace O3DE::ProjectManager +{ + GemRequirementListView::GemRequirementListView(QAbstractItemModel* model, QItemSelectionModel* selectionModel, QWidget* parent) + : QListView(parent) + { + setVerticalScrollMode(QAbstractItemView::ScrollPerPixel); + + setStyleSheet("background-color: #444444;"); + + setModel(model); + setSelectionModel(selectionModel); + setItemDelegate(new GemRequirementDelegate(model, this)); + } +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.h b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.h new file mode 100644 index 0000000000..25b2837e30 --- /dev/null +++ b/Code/Tools/ProjectManager/Source/GemCatalog/GemRequirementListView.h @@ -0,0 +1,32 @@ +/* +* 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 + +#if !defined(Q_MOC_RUN) +#include +#include +#include +#endif + +namespace O3DE::ProjectManager +{ + class GemRequirementListView + : public QListView + { + Q_OBJECT // AUTOMOC + + public: + explicit GemRequirementListView(QAbstractItemModel* model, QItemSelectionModel* selectionModel, QWidget* parent = nullptr); + ~GemRequirementListView() = default; + }; +} // namespace O3DE::ProjectManager diff --git a/Code/Tools/ProjectManager/Source/PythonBindings.cpp b/Code/Tools/ProjectManager/Source/PythonBindings.cpp index 993c0abeaa..db376fb195 100644 --- a/Code/Tools/ProjectManager/Source/PythonBindings.cpp +++ b/Code/Tools/ProjectManager/Source/PythonBindings.cpp @@ -661,6 +661,7 @@ namespace O3DE::ProjectManager gemInfo.m_displayName = Py_To_String_Optional(data, "DisplayName", gemInfo.m_name); gemInfo.m_summary = Py_To_String_Optional(data, "Summary", ""); gemInfo.m_version = Py_To_String_Optional(data, "Version", ""); + gemInfo.m_requirement = Py_To_String_Optional(data, "Requirements", ""); if (data.contains("Tags")) { diff --git a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp index f5414a67a1..e51d9e4996 100644 --- a/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp +++ b/Code/Tools/ProjectManager/Source/UpdateProjectCtrl.cpp @@ -140,7 +140,11 @@ namespace O3DE::ProjectManager else if (m_stack->currentIndex() == ScreenOrder::Gems && m_gemCatalogScreen) { // Enable or disable the gems that got adjusted in the gem catalog and apply them to the given project. - m_gemCatalogScreen->EnableDisableGemsForProject(m_projectInfo.m_path); + if (!m_gemCatalogScreen->EnableDisableGemsForProject(m_projectInfo.m_path)) + { + QMessageBox::critical(this, tr("Failed to configure gems"), tr("Failed to configure gems for project.")); + return; + } shouldRebuild = true; } diff --git a/Code/Tools/ProjectManager/project_manager_files.cmake b/Code/Tools/ProjectManager/project_manager_files.cmake index 8e4c4cd321..7eaeed0b96 100644 --- a/Code/Tools/ProjectManager/project_manager_files.cmake +++ b/Code/Tools/ProjectManager/project_manager_files.cmake @@ -87,6 +87,14 @@ set(FILES Source/GemCatalog/GemListHeaderWidget.cpp Source/GemCatalog/GemModel.h Source/GemCatalog/GemModel.cpp + Source/GemCatalog/GemRequirementDialog.h + Source/GemCatalog/GemRequirementDialog.cpp + Source/GemCatalog/GemRequirementDelegate.h + Source/GemCatalog/GemRequirementDelegate.cpp + Source/GemCatalog/GemRequirementFilterProxyModel.h + Source/GemCatalog/GemRequirementFilterProxyModel.cpp + Source/GemCatalog/GemRequirementListView.h + Source/GemCatalog/GemRequirementListView.cpp Source/GemCatalog/GemSortFilterProxyModel.h Source/GemCatalog/GemSortFilterProxyModel.cpp ) From 2d4d53bccfbd0cde0323fef985a6daac7f1054eb Mon Sep 17 00:00:00 2001 From: Doug McDiarmid Date: Tue, 22 Jun 2021 20:10:49 -0700 Subject: [PATCH 89/91] Change viewport and scissor state to use the output image size --- .../ReflectionScreenSpaceBlurChildPass.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp index 2d4b6ee85f..690a2d63c2 100644 --- a/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp +++ b/Gems/Atom/Feature/Common/Code/Source/ReflectionScreenSpace/ReflectionScreenSpaceBlurChildPass.cpp @@ -47,8 +47,12 @@ namespace AZ m_updateSrg = true; } - params.m_viewportState = RHI::Viewport(0, static_cast(m_imageSize.m_width), 0, static_cast(m_imageSize.m_height)); - params.m_scissorState = RHI::Scissor(0, 0, m_imageSize.m_width, m_imageSize.m_height); + float inverseScale = 1.0f / m_outputScale; + uint32_t outputWidth = m_imageSize.m_width * inverseScale; + uint32_t outputHeight = m_imageSize.m_height * inverseScale; + + params.m_viewportState = RHI::Viewport(0, static_cast(outputWidth), 0, static_cast(outputHeight)); + params.m_scissorState = RHI::Scissor(0, 0, outputWidth, outputHeight); FullscreenTrianglePass::FrameBeginInternal(params); } From d98ad8eda83aabaffaef46245da68d560f7362f4 Mon Sep 17 00:00:00 2001 From: Doug McDiarmid Date: Tue, 22 Jun 2021 23:48:14 -0700 Subject: [PATCH 90/91] Fix for FullscreenTrianglePass viewport and scissor state (author: moudgils). --- .../Pass/FullscreenTrianglePass.cpp | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp index 67a6fcaa5b..d1fe6e5ec0 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp @@ -24,6 +24,7 @@ #include #include +#include namespace AZ { @@ -181,19 +182,13 @@ namespace AZ RHI::Size targetImageSize = outputAttachment->m_descriptor.m_image.m_size; - m_viewportState = params.m_viewportState; - if (m_viewportState.IsNull()) - { - // compute viewport from target attachment - m_viewportState = RHI::Viewport(0, static_cast(targetImageSize.m_width), 0, static_cast(targetImageSize.m_height)); - } + m_viewportState.m_minX = m_viewportState.m_minY = 0; + m_viewportState.m_maxX = AZStd::min(static_cast(params.m_viewportState.m_maxX), targetImageSize.m_width); + m_viewportState.m_maxY = AZStd::min(static_cast(params.m_viewportState.m_maxY), targetImageSize.m_height); - m_scissorState = params.m_scissorState; - if (m_scissorState.IsNull()) - { - // compute scissor from target attachment - m_scissorState = RHI::Scissor(0, 0, targetImageSize.m_width, targetImageSize.m_height); - } + m_scissorState.m_minX = m_scissorState.m_minY = 0; + m_scissorState.m_maxX = AZStd::min(static_cast(params.m_scissorState.m_maxX), targetImageSize.m_width); + m_scissorState.m_maxY = AZStd::min(static_cast(params.m_scissorState.m_maxY), targetImageSize.m_height); RenderPass::FrameBeginInternal(params); } From 1221b0f74fc74142c2ea83a77dbd850a644473b7 Mon Sep 17 00:00:00 2001 From: Doug McDiarmid Date: Wed, 23 Jun 2021 02:06:31 -0700 Subject: [PATCH 91/91] Minor formatting change. --- .../Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp index d1fe6e5ec0..5c76b084b1 100644 --- a/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp +++ b/Gems/Atom/RPI/Code/Source/RPI.Public/Pass/FullscreenTrianglePass.cpp @@ -182,11 +182,13 @@ namespace AZ RHI::Size targetImageSize = outputAttachment->m_descriptor.m_image.m_size; - m_viewportState.m_minX = m_viewportState.m_minY = 0; + m_viewportState.m_minX = 0.0f; + m_viewportState.m_minY = 0.0f; m_viewportState.m_maxX = AZStd::min(static_cast(params.m_viewportState.m_maxX), targetImageSize.m_width); m_viewportState.m_maxY = AZStd::min(static_cast(params.m_viewportState.m_maxY), targetImageSize.m_height); - m_scissorState.m_minX = m_scissorState.m_minY = 0; + m_scissorState.m_minX = 0.0f; + m_scissorState.m_minY = 0.0f; m_scissorState.m_maxX = AZStd::min(static_cast(params.m_scissorState.m_maxX), targetImageSize.m_width); m_scissorState.m_maxY = AZStd::min(static_cast(params.m_scissorState.m_maxY), targetImageSize.m_height);