Merge branch 'stabilization/2106' into Helios_LYN-3723-FixPBRNormalMapImport

This commit is contained in:
amzn-mike
2021-06-23 17:36:04 -05:00
151 changed files with 545 additions and 655 deletions
@@ -199,7 +199,7 @@ namespace AssetBundler
void MainWindow::OnSupportClicked()
{
QDesktopServices::openUrl(
QStringLiteral("https://docs.aws.amazon.com/lumberyard/latest/userguide/asset-bundler-overview.html"));
QStringLiteral("https://docs.o3de.org/docs/user-guide/packaging/asset-bundler/"));
}
void MainWindow::ShowLogContextMenu(const QPoint& pos)
@@ -782,16 +782,6 @@ namespace AssetProcessor
}
// if we get here, we are good to go in terms of disk space and sources existing, so we make the best attempt we can.
// first, we broadcast the name of ALL of the outputs we are about to change:
for (const QPair<QString, QString>& filePair : outputsToCopy)
{
const QString& productAbsolutePath = filePair.second;
// note that this absolute path is a real file system path, and the following API requires normalized paths:
QString normalized = AssetUtilities::NormalizeFilePath(productAbsolutePath);
AssetProcessor::ProcessingJobInfoBus::Broadcast(&AssetProcessor::ProcessingJobInfoBus::Events::BeginCacheFileUpdate, normalized.toUtf8().constData());
}
// after we do the above notify its important that we do not early exit this function without undoing those locks.
bool anyFileFailed = false;
@@ -815,16 +805,6 @@ namespace AssetProcessor
AZ_TracePrintf(AssetBuilderSDK::WarningWindow, "Unable to change permission for the file: %s.\n", productAbsolutePath.toUtf8().data());
}
}
// once we're done, regardless of success or failure, we 'unlock' those files for further process.
// if we failed, also re-trigger them to rebuild (the bool param at the end of the ebus call)
for (const QPair<QString, QString>& filePair : outputsToCopy)
{
const QString& productAbsolutePath = filePair.second;
// note that this absolute path is a real file system path, and the following API requires normalized paths:
QString normalized = AssetUtilities::NormalizeFilePath(productAbsolutePath);
AssetProcessor::ProcessingJobInfoBus::Broadcast(&AssetProcessor::ProcessingJobInfoBus::Events::EndCacheFileUpdate, normalized.toUtf8().constData(), anyFileFailed);
}
return !anyFileFailed;
}
@@ -509,7 +509,7 @@ void MainWindow::OnRescanButtonClicked()
void MainWindow::OnSupportClicked(bool /*checked*/)
{
QDesktopServices::openUrl(
QStringLiteral("https://docs.aws.amazon.com/lumberyard/latest/userguide/asset-pipeline-processor.html"));
QStringLiteral("https://docs.o3de.org/docs/user-guide/assets/pipeline/"));
}
void MainWindow::EditConnection(const QModelIndex& index)
@@ -438,7 +438,7 @@ namespace AssetProcessor
void ProductAssetDetailsPanel::OnSupportClicked(bool /*checked*/)
{
QDesktopServices::openUrl(
QStringLiteral("https://docs.aws.amazon.com/lumberyard/latest/userguide/asset-bundler-assets-resolving.html"));
QStringLiteral("https://docs.o3de.org/docs/user-guide/packaging/asset-bundler/assets-resolving/"));
}
@@ -83,6 +83,10 @@ namespace AssetUtilsInternal
timer.start();
do
{
QString normalized = AssetUtilities::NormalizeFilePath(outputFile);
AssetProcessor::ProcessingJobInfoBus::Broadcast(
&AssetProcessor::ProcessingJobInfoBus::Events::BeginCacheFileUpdate, normalized.toUtf8().constData());
//Removing the old file if it exists
if (outFile.exists())
{
@@ -133,11 +137,19 @@ namespace AssetUtilsInternal
}
}
} while (!timer.hasExpired(waitTimeInSeconds * 1000)); //We will keep retrying until the timer has expired the inputted timeout
// once we're done, regardless of success or failure, we 'unlock' those files for further process.
// if we failed, also re-trigger them to rebuild (the bool param at the end of the ebus call)
QString normalized = AssetUtilities::NormalizeFilePath(outputFile);
AssetProcessor::ProcessingJobInfoBus::Broadcast(
&AssetProcessor::ProcessingJobInfoBus::Events::EndCacheFileUpdate, normalized.toUtf8().constData(), !operationSucceeded);
if (!operationSucceeded)
{
//operation failed for the given timeout
AZ_Warning(AssetProcessor::ConsoleChannel, false, "WARNING: Could not copy/move source %s to %s, giving up\n", sourceFile.toUtf8().constData(), outputFile.toUtf8().constData());
AZ_Warning(AssetProcessor::ConsoleChannel, false, "WARNING: Could not %s source from %s to %s, giving up\n",
isCopy ? "copy" : "move (via rename)",
sourceFile.toUtf8().constData(), outputFile.toUtf8().constData());
return false;
}
else if (failureOccurredOnce)
@@ -458,22 +458,20 @@ namespace AZ
decltype(boneAnimations) fillerAnimations;
// 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(parent->mName))
if (!IsPivotNode(aiString(boneName.c_str())))
{
if (!boneAnimations.contains(parent->mName.C_Str()) &&
!fillerAnimations.contains(parent->mName.C_Str()))
if (!boneAnimations.contains(boneName) &&
!fillerAnimations.contains(boneName))
{
// 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;
@@ -490,13 +488,11 @@ namespace AZ
emptyAnimation.m_ownedScalingKeys.emplace_back(0, scale);
emptyAnimation.mScalingKeys = emptyAnimation.m_ownedScalingKeys.data();
fillerAnimations.insert(AZStd::make_pair(
parent->mName.C_Str(), AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation))));
fillerAnimations.insert(
AZStd::make_pair(boneName, AZStd::make_pair(anim.second.first, AZStd::move(emptyAnimation))));
}
}
parent = parent->mParent;
}
}