Renamed several non-inclusive terms (#236)
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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));
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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.
|
||||
|
||||
@@ -308,7 +308,7 @@ namespace AssetMemoryAnalyzer
|
||||
AZStd::function<void(AssetInfo*, AssetTreeNode*, int)> recurse;
|
||||
recurse = [&recurse](AssetInfo* outAsset, AssetTreeNode* inAsset, int depth)
|
||||
{
|
||||
outAsset->m_id = inAsset->m_masterInfo ? inAsset->m_masterInfo->m_id->m_id.c_str() : nullptr;
|
||||
outAsset->m_id = inAsset->m_primaryinfo ? inAsset->m_primaryinfo->m_id->m_id.c_str() : nullptr;
|
||||
|
||||
// For every code point in this asset node, record its allocations
|
||||
for (auto& codePointInfo : inAsset->m_data.m_codePointsToAllocations)
|
||||
|
||||
Reference in New Issue
Block a user