Merge branch 'main' into amzn-mike/lyn-2249-disable-cancel

This commit is contained in:
amzn-mike
2021-04-22 15:38:32 -05:00
142 changed files with 1236 additions and 613 deletions
@@ -63,13 +63,13 @@ namespace AZ
static AssetTrackingImpl* GetSharedInstance();
static ThreadData& GetSharedThreadData();
using MasterAssets = AZStd::unordered_map<AssetTrackingId, AssetMasterInfo, AZStd::hash<AssetTrackingId>, AZStd::equal_to<AssetTrackingId>, AZStdAssetTrackingAllocator>;
using PrimaryAssets = AZStd::unordered_map<AssetTrackingId, AssetPrimaryInfo, AZStd::hash<AssetTrackingId>, AZStd::equal_to<AssetTrackingId>, AZStdAssetTrackingAllocator>;
using ThreadData = ThreadData;
using mutex_type = AZStd::mutex;
using lock_type = AZStd::lock_guard<mutex_type>;
mutex_type m_mutex;
MasterAssets m_masterAssets;
PrimaryAssets m_primaryAssets;
AssetTreeNodeBase* m_assetRoot = nullptr;
AssetAllocationTableBase* m_allocationTable = nullptr;
bool m_performingAnalysis = false;
@@ -118,7 +118,7 @@ namespace AZ
auto& threadData = GetSharedThreadData();
AssetTreeNodeBase* parentAsset = threadData.m_currentAssetStack.empty() ? nullptr : threadData.m_currentAssetStack.back();
AssetTreeNodeBase* childAsset;
AssetMasterInfo* assetMasterInfo;
AssetPrimaryInfo* assetPrimaryInfo;
if (!parentAsset)
{
@@ -128,22 +128,22 @@ namespace AZ
{
lock_type lock(m_mutex);
// Locate or create the master record for this asset
auto masterItr = m_masterAssets.find(assetId);
// Locate or create the primary record for this asset
auto primaryItr = m_primaryAssets.find(assetId);
if (masterItr != m_masterAssets.end())
if (primaryItr != m_primaryAssets.end())
{
assetMasterInfo = &masterItr->second;
assetPrimaryInfo = &primaryItr->second;
}
else
{
auto insertResult = m_masterAssets.emplace(assetId, AssetMasterInfo());
assetMasterInfo = &insertResult.first->second;
assetMasterInfo->m_id = &insertResult.first->first;
auto insertResult = m_primaryAssets.emplace(assetId, AssetPrimaryInfo());
assetPrimaryInfo = &insertResult.first->second;
assetPrimaryInfo->m_id = &insertResult.first->first;
}
// Add this asset to the stack for this thread's context
childAsset = parentAsset->FindOrAddChild(assetId, assetMasterInfo);
childAsset = parentAsset->FindOrAddChild(assetId, assetPrimaryInfo);
}
threadData.m_currentAssetStack.push_back(childAsset);
@@ -304,7 +304,7 @@ namespace AZ
char* pos = buffer;
for (auto itr = assetStack.rbegin(); itr != assetStack.rend(); ++itr)
{
pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetMasterInfo()->m_id->m_id.c_str());
pos += azsnprintf(pos, BUFFER_SIZE - (pos - buffer), "%s\n", (*itr)->GetAssetPrimaryInfo()->m_id->m_id.c_str());
if (pos >= buffer + BUFFER_SIZE)
{
@@ -79,9 +79,9 @@ namespace AZ
AssetTrackingString m_id;
};
// Master information about an asset.
// Primary information about an asset.
// Currently just contains the ID of the asset, but in the future may carry additional information about that asset (such as where in code it was initialized).
struct AssetMasterInfo
struct AssetPrimaryInfo
{
const AssetTrackingId* m_id;
};
@@ -90,8 +90,8 @@ namespace AZ
class AssetTreeNodeBase
{
public:
virtual const AssetMasterInfo* GetAssetMasterInfo() const = 0;
virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetMasterInfo* info) = 0;
virtual const AssetPrimaryInfo* GetAssetPrimaryInfo() const = 0;
virtual AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) = 0;
};
// Base class for an asset tree. Implemented by the template AssetTree<>.
@@ -29,18 +29,18 @@ namespace AZ
class AssetTreeNode : public AssetTreeNodeBase
{
public:
AssetTreeNode(const AssetMasterInfo* masterInfo = nullptr, AssetTreeNode* parent = nullptr) :
m_masterInfo(masterInfo),
AssetTreeNode(const AssetPrimaryInfo* primaryInfo = nullptr, AssetTreeNode* parent = nullptr) :
m_primaryinfo(primaryInfo),
m_parent(parent)
{
}
const AssetMasterInfo* GetAssetMasterInfo() const override
const AssetPrimaryInfo* GetAssetPrimaryInfo() const override
{
return m_masterInfo;
return m_primaryinfo;
}
AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetMasterInfo* info) override
AssetTreeNodeBase* FindOrAddChild(const AssetTrackingId& id, const AssetPrimaryInfo* info) override
{
AssetTreeNodeBase* result = nullptr;
auto childItr = m_children.find(id);
@@ -61,7 +61,7 @@ namespace AZ
using AssetMap = AssetTrackingMap<AssetTrackingId, AssetTreeNode>;
const AssetMasterInfo* m_masterInfo;
const AssetPrimaryInfo* m_primaryinfo;
AssetTreeNode* m_parent;
AssetMap m_children;
AssetDataT m_data;
+29 -2
View File
@@ -146,8 +146,8 @@ namespace AZ
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
->Method("GetTranslated", &Aabb::GetTranslated)
->Method("GetSurfaceArea", &Aabb::GetSurfaceArea)
->Method("GetTransformedObb", &Aabb::GetTransformedObb)
->Method("GetTransformedAabb", &Aabb::GetTransformedAabb)
->Method("GetTransformedObb", static_cast<Obb(Aabb::*)(const Transform&) const>(&Aabb::GetTransformedObb))
->Method("GetTransformedAabb", static_cast<Aabb(Aabb::*)(const Transform&) const>(&Aabb::GetTransformedAabb))
->Method("ApplyTransform", &Aabb::ApplyTransform)
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
->Method("Clone", [](const Aabb& rhs) -> Aabb { return rhs; })
@@ -195,6 +195,20 @@ namespace AZ
}
Obb Aabb::GetTransformedObb(const Matrix3x4& matrix3x4) const
{
Matrix3x4 matrixNoScale = matrix3x4;
const AZ::Vector3 scale = matrixNoScale.ExtractScale();
const AZ::Quaternion rotation = AZ::Quaternion::CreateFromMatrix3x4(matrixNoScale);
return Obb::CreateFromPositionRotationAndHalfLengths(
matrix3x4 * GetCenter(),
rotation,
0.5f * scale * GetExtents()
);
}
void Aabb::ApplyTransform(const Transform& transform)
{
Vector3 a, b, axisCoeffs;
@@ -224,4 +238,17 @@ namespace AZ
m_min = newMin;
m_max = newMax;
}
void Aabb::ApplyMatrix3x4(const Matrix3x4& matrix3x4)
{
const AZ::Vector3 extents = GetExtents();
const AZ::Vector3 center = matrix3x4 * GetCenter();
AZ::Vector3 newHalfExtents(
0.5f * matrix3x4.GetRowAsVector3(0).GetAbs().Dot(extents),
0.5f * matrix3x4.GetRowAsVector3(1).GetAbs().Dot(extents),
0.5f * matrix3x4.GetRowAsVector3(2).GetAbs().Dot(extents));
m_min = center - newHalfExtents;
m_max = center + newHalfExtents;
}
}
+12 -2
View File
@@ -129,11 +129,21 @@ namespace AZ
void ApplyTransform(const Transform& transform);
void ApplyMatrix3x4(const Matrix3x4& matrix3x4);
void MultiplyByScale(const Vector3& scale);
//! Transforms an Aabb and returns the resulting Obb.
class Obb GetTransformedObb(const Transform& transform) const;
[[nodiscard]] Obb GetTransformedObb(const Transform& transform) const;
//! Transforms an Aabb and returns the resulting Obb.
[[nodiscard]] Obb GetTransformedObb(const Matrix3x4& matrix3x4) const;
//! Returns a new AABB containing the transformed AABB.
Aabb GetTransformedAabb(const Transform& transform) const;
[[nodiscard]] Aabb GetTransformedAabb(const Transform& transform) const;
//! Returns a new AABB containing the transformed AABB.
[[nodiscard]] Aabb GetTransformedAabb(const Matrix3x4& matrix3x4) const;
//! Checks if this aabb is equal to another within a floating point tolerance.
bool IsClose(const Aabb& rhs, float tolerance = Constants::Tolerance) const;
@@ -292,6 +292,14 @@ namespace AZ
}
AZ_MATH_INLINE void Aabb::MultiplyByScale(const Vector3& scale)
{
m_min *= scale;
m_max *= scale;
AZ_MATH_ASSERT(IsValid(), "Min must be less than Max");
}
AZ_MATH_INLINE Aabb Aabb::GetTransformedAabb(const Transform& transform) const
{
Aabb aabb = Aabb::CreateFromMinMax(m_min, m_max);
@@ -300,6 +308,14 @@ namespace AZ
}
AZ_MATH_INLINE Aabb Aabb::GetTransformedAabb(const Matrix3x4& matrix3x4) const
{
Aabb aabb = Aabb::CreateFromMinMax(m_min, m_max);
aabb.ApplyMatrix3x4(matrix3x4);
return aabb;
}
AZ_MATH_INLINE bool Aabb::IsClose(const Aabb& rhs, float tolerance) const
{
return m_min.IsClose(rhs.m_min, tolerance) && m_max.IsClose(rhs.m_max, tolerance);
@@ -105,7 +105,7 @@ namespace UnitTest
EXPECT_EQ(&rootAsset, &m_env->m_tree.GetRoot());
ASSERT_NE(itr, rootAsset.m_children.end());
EXPECT_EQ(itr->second.m_masterInfo->m_id->m_id, "TestScopedAllocation.1");
EXPECT_EQ(itr->second.m_primaryinfo->m_id->m_id, "TestScopedAllocation.1");
EXPECT_EQ(&itr->second, m_env->m_table.FindAllocation(TEST_POINTER));
@@ -15,6 +15,7 @@
#include <AzCore/Math/Vector3.h>
#include <AzCore/Math/Transform.h>
#include <AzCore/UnitTest/TestTypes.h>
#include <AZTestShared/Math/MathTestHelpers.h>
using namespace AZ;
@@ -385,4 +386,77 @@ namespace UnitTest
EXPECT_TRUE(aabb.GetMin().IsClose(transAabb.GetMin()));
EXPECT_TRUE(aabb.GetMax().IsClose(transAabb.GetMax()));
}
TEST(MATH_AabbTransform, GetTransformedObbMatrix3x4)
{
Vector3 min(-1.0f, -2.0f, -3.0f);
Vector3 max(4.0f, 3.0f, 2.0f);
Aabb aabb = Aabb::CreateFromMinMax(min, max);
Quaternion rotation(0.46f, 0.26f, 0.58f, 0.62f);
Vector3 translation(5.0f, 7.0f, 9.0f);
Matrix3x4 matrix3x4 = Matrix3x4::CreateFromQuaternionAndTranslation(rotation, translation);
matrix3x4.MultiplyByScale(Vector3(0.5f, 1.5f, 2.0f));
Obb obb = aabb.GetTransformedObb(matrix3x4);
EXPECT_THAT(obb.GetRotation(), IsClose(rotation));
EXPECT_THAT(obb.GetHalfLengths(), IsClose(Vector3(1.25f, 3.75f, 5.0f)));
EXPECT_THAT(obb.GetPosition(), IsClose(Vector3(3.928f, 7.9156f, 9.3708f)));
}
TEST(MATH_AabbTransform, GetTransformedAabbMatrix3x4)
{
Vector3 min(2.0f, 3.0f, 5.0f);
Vector3 max(6.0f, 5.0f, 11.0f);
Aabb aabb = Aabb::CreateFromMinMax(min, max);
Quaternion rotation(0.34f, 0.46f, 0.58f, 0.58f);
Vector3 translation(-3.0f, -4.0f, -5.0f);
Matrix3x4 matrix3x4 = Matrix3x4::CreateFromQuaternionAndTranslation(rotation, translation);
matrix3x4.MultiplyByScale(Vector3(1.2f, 0.8f, 2.0f));
Aabb transformedAabb = aabb.GetTransformedAabb(matrix3x4);
EXPECT_THAT(transformedAabb.GetMin(), IsClose(Vector3(4.1488f, -0.01216f, -0.31904f)));
EXPECT_THAT(transformedAabb.GetMax(), IsClose(Vector3(16.3216f, 6.54272f, 5.98112f)));
}
TEST(MATH_AabbTransform, GetTransformedObbFitsInsideTransformedAabb)
{
Vector3 min(4.0f, 3.0f, 1.0f);
Vector3 max(7.0f, 6.0f, 8.0f);
Aabb aabb = Aabb::CreateFromMinMax(min, max);
Quaternion rotation(0.40f, 0.40f, 0.64f, 0.52f);
Vector3 translation(-2.0f, 4.0f, -3.0f);
Matrix3x4 matrix3x4 = Matrix3x4::CreateFromQuaternionAndTranslation(rotation, translation);
matrix3x4.MultiplyByScale(Vector3(2.2f, 0.6f, 1.4f));
Aabb transformedAabb = aabb.GetTransformedAabb(matrix3x4);
Obb transformedObb = aabb.GetTransformedObb(matrix3x4);
Aabb aabbContainingTransformedObb = Aabb::CreateFromObb(transformedObb);
EXPECT_THAT(transformedAabb.GetMin(), IsClose(aabbContainingTransformedObb.GetMin()));
EXPECT_THAT(transformedAabb.GetMax(), IsClose(aabbContainingTransformedObb.GetMax()));
}
TEST(MATH_AabbTransform, MultiplyByScale)
{
Vector3 min(2.0f, 6.0f, 8.0f);
Vector3 max(6.0f, 9.0f, 10.0f);
Aabb aabb = Aabb::CreateFromMinMax(min, max);
Vector3 scale(0.5f, 2.0f, 1.5f);
aabb.MultiplyByScale(scale);
EXPECT_THAT(aabb.GetMin(), IsClose(Vector3(1.0f, 12.0f, 12.0f)));
EXPECT_THAT(aabb.GetMax(), IsClose(Vector3(3.0f, 18.0f, 15.0f)));
}
}
@@ -29,6 +29,20 @@ namespace AzFramework::AssetSystem::Platform
bool LaunchAssetProcessor(AZStd::string_view executableDirectory, AZStd::string_view engineRoot,
AZStd::string_view projectPath)
{
AZ::IO::FixedMaxPath assetProcessorPath{ executableDirectory };
assetProcessorPath /= "AssetProcessor";
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
// Check for existence of one under a "bin" directory, i.e. engineRoot is an SDK structure.
assetProcessorPath = AZ::IO::FixedMaxPath{engineRoot} / "bin" / AZ_BUILD_CONFIGURATION_TYPE / "AssetProcessor";
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
return false;
}
}
pid_t firstChildPid = fork();
if (firstChildPid == 0)
{
@@ -47,9 +61,6 @@ namespace AzFramework::AssetSystem::Platform
pid_t secondChildPid = fork();
if (secondChildPid == 0)
{
AZ::IO::FixedMaxPath assetProcessorPath{ executableDirectory };
assetProcessorPath /= "AssetProcessor";
AZStd::array args {
assetProcessorPath.c_str(), assetProcessorPath.c_str(), "--start-hidden",
static_cast<const char*>(nullptr), static_cast<const char*>(nullptr), static_cast<const char*>(nullptr)
@@ -11,6 +11,7 @@
*/
#include <AzCore/IO/Path/Path.h>
#include <AzCore/IO/SystemFile.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <sys/types.h>
@@ -20,6 +21,7 @@ namespace AzFramework::AssetSystem::Platform
{
void AllowAssetProcessorToForeground()
{}
bool LaunchAssetProcessor(AZStd::string_view executableDirectory, AZStd::string_view engineRoot,
AZStd::string_view projectPath)
{
@@ -29,6 +31,17 @@ namespace AzFramework::AssetSystem::Platform
assetProcessorPath /= "../../../AssetProcessor.app";
assetProcessorPath = assetProcessorPath.LexicallyNormal();
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
// Check for existence of one under a "bin" directory, i.e. engineRoot is an SDK structure.
assetProcessorPath = AZ::IO::FixedMaxPath{engineRoot} / "bin" / AZ_BUILD_CONFIGURATION_TYPE / "AssetProcessor.app";
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
return false;
}
}
auto fullLaunchCommand = AZ::IO::FixedMaxPathString::format(R"(open -g "%s" --args --start-hidden)", assetProcessorPath.c_str());
// Add the engine path to the launch command if not empty
if (!engineRoot.empty())
@@ -12,6 +12,7 @@
#include <AzCore/PlatformIncl.h>
#include <AzCore/IO/Path/Path.h>
#include <AzCore/IO/SystemFile.h>
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
#include <Psapi.h>
@@ -67,6 +68,17 @@ namespace AzFramework::AssetSystem::Platform
AZ::IO::FixedMaxPath assetProcessorPath{ executableDirectory };
assetProcessorPath /= "AssetProcessor.exe";
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
// Check for existence of one under a "bin" directory, i.e. engineRoot is an SDK structure.
assetProcessorPath = AZ::IO::FixedMaxPath{engineRoot} / "bin" / AZ_BUILD_CONFIGURATION_TYPE / "AssetProcessor.exe";
if (!AZ::IO::SystemFile::Exists(assetProcessorPath.c_str()))
{
return false;
}
}
auto fullLaunchCommand = AZ::IO::FixedMaxPathString::format(R"("%s" --start-hidden)", assetProcessorPath.c_str());
// Add the engine path to the launch command if not empty
-1
View File
@@ -216,7 +216,6 @@ protected:
void OnSliceInstantiationFailed(const AZ::Data::AssetId& sliceAssetId, const AzFramework::SliceInstantiationTicket& /*ticket*/) override;
//////////////////////////////////////////////////////////////////////////
QString m_strMasterCDFolder;
bool m_bLoadFailed;
QColor m_waterColor;
XmlNodeRef m_fogTemplate;
+17 -17
View File
@@ -65,7 +65,7 @@ namespace
const float kTangentDelta = 0.01f;
const float kAspectRatio = 1.777778f;
const int kReserveCount = 7; // x,y,z,rot_x,rot_y,rot_z,fov
const QString kMasterCameraName = "MasterCamera";
const QString kPrimaryCameraName = "PrimaryCamera";
} // namespace
@@ -169,10 +169,10 @@ CExportManager::CExportManager()
, m_numberOfExportFrames(0)
, m_pivotEntityObject(0)
, m_bBakedKeysSequenceExport(true)
, m_animTimeExportMasterSequenceCurrentTime(0.0f)
, m_animTimeExportPrimarySequenceCurrentTime(0.0f)
, m_animKeyTimeExport(true)
, m_soundKeyTimeExport(true)
, m_bExportOnlyMasterCamera(false)
, m_bExportOnlyPrimaryCamera(false)
{
RegisterExporter(new COBJExporter());
RegisterExporter(new COCMExporter());
@@ -773,14 +773,14 @@ bool CExportManager::ShowFBXExportDialog()
return false;
}
SetFBXExportSettings(fpsDialog.GetExportCoordsLocalToTheSelectedObject(), fpsDialog.GetExportOnlyMasterCamera(), fpsDialog.GetFPS());
SetFBXExportSettings(fpsDialog.GetExportCoordsLocalToTheSelectedObject(), fpsDialog.GetExportOnlyPrimaryCamera(), fpsDialog.GetFPS());
return true;
}
bool CExportManager::ProcessObjectsForExport()
{
Export::CObject* pObj = new Export::CObject(kMasterCameraName.toUtf8().data());
Export::CObject* pObj = new Export::CObject(kPrimaryCameraName.toUtf8().data());
pObj->entityType = Export::eCamera;
m_data.m_objects.push_back(pObj);
@@ -808,13 +808,13 @@ bool CExportManager::ProcessObjectsForExport()
Export::CObject* pObj2 = m_data.m_objects[objectID];
CBaseObject* pObject = 0;
if (QString::compare(pObj2->name, kMasterCameraName) == 0)
if (QString::compare(pObj2->name, kPrimaryCameraName) == 0)
{
pObject = GetIEditor()->GetObjectManager()->FindObject(GetIEditor()->GetViewManager()->GetCameraObjectId());
}
else
{
if (m_bExportOnlyMasterCamera && pObj2->entityType != Export::eCameraTarget)
if (m_bExportOnlyPrimaryCamera && pObj2->entityType != Export::eCameraTarget)
{
continue;
}
@@ -952,7 +952,7 @@ void CExportManager::FillAnimTimeNode(XmlNodeRef writeNode, CTrackViewAnimNode*
if (numAllTracks > 0)
{
XmlNodeRef objNode = writeNode->createNode(CleanXMLText(pObjectNode->GetName()).toUtf8().data());
writeNode->setAttr("time", m_animTimeExportMasterSequenceCurrentTime);
writeNode->setAttr("time", m_animTimeExportPrimarySequenceCurrentTime);
for (unsigned int trackID = 0; trackID < numAllTracks; ++trackID)
{
@@ -1020,7 +1020,7 @@ void CExportManager::FillAnimTimeNode(XmlNodeRef writeNode, CTrackViewAnimNode*
XmlNodeRef keyNode = subNode->createNode(keyContentName.toUtf8().data());
float keyGlobalTime = m_animTimeExportMasterSequenceCurrentTime + keyTime;
float keyGlobalTime = m_animTimeExportPrimarySequenceCurrentTime + keyTime;
keyNode->setAttr("keyTime", keyGlobalTime);
if (keyStartTime > 0)
@@ -1123,13 +1123,13 @@ bool CExportManager::AddObjectsFromSequence(CTrackViewSequence* pSequence, XmlNo
const QString sequenceName = pSubSequence->GetName();
XmlNodeRef subSeqNode2 = seqNode->createNode(sequenceName.toUtf8().data());
if (sequenceName == m_animTimeExportMasterSequenceName)
if (sequenceName == m_animTimeExportPrimarySequenceName)
{
m_animTimeExportMasterSequenceCurrentTime = sequenceKey.time;
m_animTimeExportPrimarySequenceCurrentTime = sequenceKey.time;
}
else
{
m_animTimeExportMasterSequenceCurrentTime += sequenceKey.time;
m_animTimeExportPrimarySequenceCurrentTime += sequenceKey.time;
}
AddObjectsFromSequence(pSubSequence, subSeqNode2);
@@ -1336,7 +1336,7 @@ bool CExportManager::Export(const char* defaultName, const char* defaultExt, con
{
m_numberOfExportFrames = pSequence->GetTimeRange().end * m_FBXBakedExportFPS;
if (!m_bExportOnlyMasterCamera)
if (!m_bExportOnlyPrimaryCamera)
{
AddObjectsFromSequence(pSequence);
}
@@ -1365,10 +1365,10 @@ bool CExportManager::Export(const char* defaultName, const char* defaultExt, con
return returnRes;
}
void CExportManager::SetFBXExportSettings(bool bLocalCoordsToSelectedObject, bool bExportOnlyMasterCamera, const float fps)
void CExportManager::SetFBXExportSettings(bool bLocalCoordsToSelectedObject, bool bExportOnlyPrimaryCamera, const float fps)
{
m_bExportLocalCoords = bLocalCoordsToSelectedObject;
m_bExportOnlyMasterCamera = bExportOnlyMasterCamera;
m_bExportOnlyPrimaryCamera = bExportOnlyPrimaryCamera;
m_FBXBakedExportFPS = fps;
}
@@ -1439,10 +1439,10 @@ void CExportManager::SaveNodeKeysTimeToXML()
if (dlg.exec())
{
m_animTimeNode = XmlHelpers::CreateXmlNode(pSequence->GetName());
m_animTimeExportMasterSequenceName = pSequence->GetName();
m_animTimeExportPrimarySequenceName = pSequence->GetName();
m_data.Clear();
m_animTimeExportMasterSequenceCurrentTime = 0.0;
m_animTimeExportPrimarySequenceCurrentTime = 0.0;
AddObjectsFromSequence(pSequence, m_animTimeNode);
+4 -4
View File
@@ -171,7 +171,7 @@ private:
bool AddObjectsFromSequence(CTrackViewSequence* pSequence, XmlNodeRef seqNode = 0);
bool IsDuplicateObjectBeingAdded(const QString& newObject);
void SetFBXExportSettings(bool bLocalCoordsToSelectedObject, bool bExportOnlyMasterCamera, const float fps);
void SetFBXExportSettings(bool bLocalCoordsToSelectedObject, bool bExportOnlyPrimaryCamera, const float fps);
bool ProcessObjectsForExport();
bool ShowFBXExportDialog();
@@ -193,13 +193,13 @@ private:
float m_FBXBakedExportFPS;
bool m_bExportLocalCoords;
bool m_bExportOnlyMasterCamera;
bool m_bExportOnlyPrimaryCamera;
int m_numberOfExportFrames;
CEntityObject* m_pivotEntityObject;
bool m_bBakedKeysSequenceExport;
QString m_animTimeExportMasterSequenceName;
float m_animTimeExportMasterSequenceCurrentTime;
QString m_animTimeExportPrimarySequenceName;
float m_animTimeExportPrimarySequenceCurrentTime;
XmlNodeRef m_animTimeNode;
bool m_animKeyTimeExport;
+3 -3
View File
@@ -55,9 +55,9 @@ bool CFBXExporterDialog::GetExportCoordsLocalToTheSelectedObject() const
return m_ui->m_exportLocalCoordsCheckbox->isChecked();
}
bool CFBXExporterDialog::GetExportOnlyMasterCamera() const
bool CFBXExporterDialog::GetExportOnlyPrimaryCamera() const
{
return m_ui->m_exportOnlyMasterCameraCheckBox->isChecked();
return m_ui->m_exportOnlyPrimaryCameraCheckBox->isChecked();
}
void CFBXExporterDialog::SetExportLocalCoordsCheckBoxEnable(bool checked)
@@ -100,7 +100,7 @@ int CFBXExporterDialog::exec()
if (m_bDisplayOnlyFPSSetting)
{
m_ui->m_exportLocalCoordsCheckbox->setEnabled(false);
m_ui->m_exportOnlyMasterCameraCheckBox->setEnabled(false);
m_ui->m_exportOnlyPrimaryCameraCheckBox->setEnabled(false);
}
m_ui->m_fpsCombo->addItem("24");
+2 -2
View File
@@ -36,7 +36,7 @@ public:
float GetFPS() const;
bool GetExportCoordsLocalToTheSelectedObject() const;
bool GetExportOnlyMasterCamera() const;
bool GetExportOnlyPrimaryCamera() const;
void SetExportLocalCoordsCheckBoxEnable(bool checked);
int exec() override;
@@ -44,7 +44,7 @@ public:
protected:
void OnFPSChange();
void SetExportLocalToTheSelectedObjectCheckBox();
void SetExportOnlyMasterCameraCheckBox();
void SetExportOnlyPrimaryCameraCheckBox();
void accept() override;
+2 -2
View File
@@ -49,9 +49,9 @@
</layout>
</item>
<item>
<widget class="QCheckBox" name="m_exportOnlyMasterCameraCheckBox">
<widget class="QCheckBox" name="m_exportOnlyPrimaryCameraCheckBox">
<property name="text">
<string>Export Only Master Camera</string>
<string>Export Only Primary Camera</string>
</property>
</widget>
</item>
+1 -1
View File
@@ -20,7 +20,7 @@ class CEditorMock
: public IEditor
{
public:
// GMock does not work with a variadic function (https://github.com/google/googlemock/blob/master/googlemock/docs/FrequentlyAskedQuestions.md)
// GMock does not work with a variadic function
void ExecuteCommand(const char* sCommand, ...) override
{
va_list args;
@@ -32,7 +32,7 @@ namespace AZ
{
namespace FbxSceneBuilder
{
const char* AssImpUvMapImporter::m_defaultNodeName = "UVMap";
const char* AssImpUvMapImporter::m_defaultNodeName = "UV";
AssImpUvMapImporter::AssImpUvMapImporter()
{
@@ -44,7 +44,7 @@ namespace AZ
SerializeContext* serializeContext = azrtti_cast<SerializeContext*>(context);
if (serializeContext)
{
serializeContext->Class<AssImpUvMapImporter, SceneCore::LoadingComponent>()->Version(2); // LYN-2576
serializeContext->Class<AssImpUvMapImporter, SceneCore::LoadingComponent>()->Version(3); // LYN-2506
}
}
@@ -84,7 +84,13 @@ namespace AZ
AZStd::shared_ptr<SceneData::GraphData::MeshVertexUVData> uvMap =
AZStd::make_shared<AZ::SceneData::GraphData::MeshVertexUVData>();
uvMap->ReserveContainerSpace(vertexCount);
AZStd::string name(AZStd::string::format("%s%d", m_defaultNodeName, texCoordIndex));
if (mesh->mTextureCoordsNames[texCoordIndex].length)
{
name = mesh->mTextureCoordsNames[texCoordIndex].C_Str();
}
uvMap->SetCustomName(name.c_str());
for (int v = 0; v < mesh->mNumVertices; ++v)
@@ -86,7 +86,7 @@ namespace AZ
if (sourceFileExists && !updateMaterial)
{
// Don't write to the cache if there's a source material as this will be the master material.
// Don't write to the cache if there's a source material as this will be the primary material.
continue;
}
@@ -84,7 +84,7 @@ namespace AZ
NoneCheckable, // No nodes can be checked.
OnlyFilterTypesCheckable // Only nodes in the filter type list can be checked.
};
// Updates the tree to include/exclude check boxes and the master selection. Call "BuildTree()" to rebuild the tree.
// Updates the tree to include/exclude check boxes and the primary selection. Call "BuildTree()" to rebuild the tree.
virtual void MakeCheckable(CheckableOption option);
// Add a type to filter for. Filter types are used to determine if a check box is added and/or to be shown if
// the type is an end point. See "IncludeEndPoints" and "MakeCheckable" for more details.