Merge branch 'develop' into LYN-4700
Signed-off-by: igarri <igarri@amazon.com>
This commit is contained in:
@@ -260,9 +260,7 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu*
|
||||
return;
|
||||
}
|
||||
|
||||
AZStd::string fullFileDirectory;
|
||||
AZStd::string fullFilePath;
|
||||
AZStd::string fileName;
|
||||
AZStd::string extension;
|
||||
|
||||
switch (entry->GetEntryType())
|
||||
@@ -281,8 +279,6 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu*
|
||||
{
|
||||
AZ::Uuid sourceID = azrtti_cast<SourceAssetBrowserEntry*>(entry)->GetSourceUuid();
|
||||
fullFilePath = entry->GetFullPath();
|
||||
fullFileDirectory = fullFilePath.substr(0, fullFilePath.find_last_of(AZ_CORRECT_DATABASE_SEPARATOR));
|
||||
fileName = entry->GetName();
|
||||
AzFramework::StringFunc::Path::GetExtension(fullFilePath.c_str(), extension);
|
||||
|
||||
// Add the "Open" menu item.
|
||||
@@ -369,19 +365,19 @@ void AzAssetBrowserRequestHandler::AddContextMenuActions(QWidget* caller, QMenu*
|
||||
{
|
||||
if (entry->GetEntryType() == AssetBrowserEntry::AssetEntryType::Source)
|
||||
{
|
||||
CFileUtil::PopulateQMenu(caller, menu, fileName.c_str(), fullFileDirectory.c_str());
|
||||
CFileUtil::PopulateQMenu(caller, menu, fullFilePath);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
CFileUtil::PopulateQMenu(caller, menu, fileName.c_str(), fullFileDirectory.c_str());
|
||||
CFileUtil::PopulateQMenu(caller, menu, fullFilePath);
|
||||
}
|
||||
break;
|
||||
case AssetBrowserEntry::AssetEntryType::Folder:
|
||||
{
|
||||
fullFileDirectory = entry->GetFullPath();
|
||||
// we are sending an empty filename to indicate that it is a folder and not a file
|
||||
CFileUtil::PopulateQMenu(caller, menu, fileName.c_str(), fullFileDirectory.c_str());
|
||||
fullFilePath = entry->GetFullPath();
|
||||
|
||||
CFileUtil::PopulateQMenu(caller, menu, fullFilePath);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
||||
@@ -127,7 +127,6 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
#include "Util/AutoDirectoryRestoreFileDialog.h"
|
||||
#include "Util/EditorAutoLevelLoadTest.h"
|
||||
#include "Util/IndexedFiles.h"
|
||||
#include "AboutDialog.h"
|
||||
#include <AzToolsFramework/PythonTerminal/ScriptHelpDialog.h>
|
||||
|
||||
@@ -1715,18 +1714,6 @@ BOOL CCryEditApp::InitInstance()
|
||||
|
||||
if (IsInRegularEditorMode())
|
||||
{
|
||||
CIndexedFiles::Create();
|
||||
|
||||
if (gEnv->pConsole->GetCVar("ed_indexfiles")->GetIVal())
|
||||
{
|
||||
Log("Started game resource files indexing...");
|
||||
CIndexedFiles::StartFileIndexing();
|
||||
}
|
||||
else
|
||||
{
|
||||
Log("Game resource files indexing is disabled.");
|
||||
}
|
||||
|
||||
// QuickAccessBar creation should be before m_pMainWnd->SetFocus(),
|
||||
// since it receives the focus at creation time. It brakes MainFrame key accelerators.
|
||||
m_pQuickAccessBar = new CQuickAccessBar;
|
||||
@@ -2163,12 +2150,6 @@ int CCryEditApp::ExitInstance(int exitCode)
|
||||
}
|
||||
}
|
||||
|
||||
if (IsInRegularEditorMode())
|
||||
{
|
||||
CIndexedFiles::AbortFileIndexing();
|
||||
CIndexedFiles::Destroy();
|
||||
}
|
||||
|
||||
if (GetIEditor() && !GetIEditor()->IsInMatEditMode())
|
||||
{
|
||||
//Nobody seems to know in what case that kind of exit can happen so instrumented to see if it happens at all
|
||||
|
||||
@@ -103,7 +103,7 @@ public:
|
||||
static const char* GetConfigGroupName();
|
||||
|
||||
CLayoutViewPane* FindViewByClass(const QString& viewClassName);
|
||||
void BindViewport(CLayoutViewPane* vp, const QString& viewClassName, QWidget* pViewport = NULL);
|
||||
void BindViewport(CLayoutViewPane* vp, const QString& viewClassName, QWidget* pViewport = nullptr);
|
||||
QString ViewportTypeToClassName(EViewportType viewType);
|
||||
|
||||
//! Switch 2D viewports.
|
||||
|
||||
@@ -93,7 +93,7 @@ void CLevelInfo::ValidateObjects()
|
||||
|
||||
pObject->Validate(m_pReport);
|
||||
|
||||
m_pReport->SetCurrentValidatorObject(NULL);
|
||||
m_pReport->SetCurrentValidatorObject(nullptr);
|
||||
}
|
||||
|
||||
CLogFile::WriteLine("Validating Duplicate Objects...");
|
||||
|
||||
@@ -380,7 +380,7 @@ AZ_POP_DISABLE_WARNING
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if defined(AZ_PLATFORM_WINDOWS)
|
||||
EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &DisplayConfig);
|
||||
EnumDisplaySettings(nullptr, ENUM_CURRENT_SETTINGS, &DisplayConfig);
|
||||
GetPrivateProfileString("boot.description", "display.drv",
|
||||
"(Unknown graphics card)", szProfileBuffer, sizeof(szProfileBuffer),
|
||||
"system.ini");
|
||||
|
||||
+19
-19
@@ -161,45 +161,45 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
~EngineConnectionListener()
|
||||
~EngineConnectionListener() override
|
||||
{
|
||||
AzFramework::AssetSystemInfoBus::Handler::BusDisconnect();
|
||||
AzFramework::EngineConnectionEvents::Bus::Handler::BusDisconnect();
|
||||
}
|
||||
|
||||
public:
|
||||
virtual void Connected([[maybe_unused]] AzFramework::SocketConnection* connection)
|
||||
void Connected([[maybe_unused]] AzFramework::SocketConnection* connection) override
|
||||
{
|
||||
m_state = EConnectionState::Connected;
|
||||
}
|
||||
virtual void Connecting([[maybe_unused]] AzFramework::SocketConnection* connection)
|
||||
void Connecting([[maybe_unused]] AzFramework::SocketConnection* connection) override
|
||||
{
|
||||
m_state = EConnectionState::Connecting;
|
||||
}
|
||||
virtual void Listening([[maybe_unused]] AzFramework::SocketConnection* connection)
|
||||
void Listening([[maybe_unused]] AzFramework::SocketConnection* connection) override
|
||||
{
|
||||
m_state = EConnectionState::Listening;
|
||||
}
|
||||
virtual void Disconnecting([[maybe_unused]] AzFramework::SocketConnection* connection)
|
||||
void Disconnecting([[maybe_unused]] AzFramework::SocketConnection* connection) override
|
||||
{
|
||||
m_state = EConnectionState::Disconnecting;
|
||||
}
|
||||
virtual void Disconnected([[maybe_unused]] AzFramework::SocketConnection* connection)
|
||||
void Disconnected([[maybe_unused]] AzFramework::SocketConnection* connection) override
|
||||
{
|
||||
m_state = EConnectionState::Disconnected;
|
||||
}
|
||||
|
||||
virtual void AssetCompilationSuccess(const AZStd::string& assetPath) override
|
||||
void AssetCompilationSuccess(const AZStd::string& assetPath) override
|
||||
{
|
||||
m_lastAssetProcessorTask = assetPath;
|
||||
}
|
||||
|
||||
virtual void AssetCompilationFailed(const AZStd::string& assetPath) override
|
||||
void AssetCompilationFailed(const AZStd::string& assetPath) override
|
||||
{
|
||||
m_failedJobs.insert(assetPath);
|
||||
}
|
||||
|
||||
virtual void CountOfAssetsInQueue(const int& count) override
|
||||
void CountOfAssetsInQueue(const int& count) override
|
||||
{
|
||||
m_pendingJobsCount = count;
|
||||
}
|
||||
@@ -299,7 +299,7 @@ MainWindow::MainWindow(QWidget* parent)
|
||||
, m_undoStateAdapter(new UndoStackStateAdapter(this))
|
||||
, m_keyboardCustomization(nullptr)
|
||||
, m_activeView(nullptr)
|
||||
, m_settings("O3DE", "O3DE")
|
||||
, m_settings("O3DE", "O3DE")
|
||||
, m_toolbarManager(new ToolbarManager(m_actionManager, this))
|
||||
, m_assetImporterManager(new AssetImporterManager(this))
|
||||
, m_levelEditorMenuHandler(new LevelEditorMenuHandler(this, m_viewPaneManager, m_settings))
|
||||
@@ -574,7 +574,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
|
||||
if (GetIEditor()->GetDocument())
|
||||
{
|
||||
GetIEditor()->GetDocument()->SetModifiedFlag(FALSE);
|
||||
GetIEditor()->GetDocument()->SetModifiedFlag(false);
|
||||
GetIEditor()->GetDocument()->SetModifiedModules(eModifiedNothing);
|
||||
}
|
||||
// Close all edit panels.
|
||||
@@ -582,7 +582,7 @@ void MainWindow::closeEvent(QCloseEvent* event)
|
||||
GetIEditor()->GetObjectManager()->EndEditParams();
|
||||
|
||||
// force clean up of all deferred deletes, so that we don't have any issues with windows from plugins not being deleted yet
|
||||
qApp->sendPostedEvents(0, QEvent::DeferredDelete);
|
||||
qApp->sendPostedEvents(nullptr, QEvent::DeferredDelete);
|
||||
|
||||
QMainWindow::closeEvent(event);
|
||||
}
|
||||
@@ -1296,7 +1296,7 @@ void MainWindow::OnEditorNotifyEvent(EEditorNotifyEvent ev)
|
||||
auto cryEdit = CCryEditApp::instance();
|
||||
if (cryEdit)
|
||||
{
|
||||
cryEdit->SetEditorWindowTitle(0, AZ::Utils::GetProjectName().c_str(), GetIEditor()->GetGameEngine()->GetLevelName());
|
||||
cryEdit->SetEditorWindowTitle(nullptr, AZ::Utils::GetProjectName().c_str(), GetIEditor()->GetGameEngine()->GetLevelName());
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1305,7 +1305,7 @@ void MainWindow::OnEditorNotifyEvent(EEditorNotifyEvent ev)
|
||||
auto cryEdit = CCryEditApp::instance();
|
||||
if (cryEdit)
|
||||
{
|
||||
cryEdit->SetEditorWindowTitle(0, AZ::Utils::GetProjectName().c_str(), 0);
|
||||
cryEdit->SetEditorWindowTitle(nullptr, AZ::Utils::GetProjectName().c_str(), nullptr);
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -1404,8 +1404,8 @@ void MainWindow::ResetAutoSaveTimers(bool bForceInit)
|
||||
{
|
||||
delete m_autoRemindTimer;
|
||||
}
|
||||
m_autoSaveTimer = 0;
|
||||
m_autoRemindTimer = 0;
|
||||
m_autoSaveTimer = nullptr;
|
||||
m_autoRemindTimer = nullptr;
|
||||
|
||||
if (bForceInit)
|
||||
{
|
||||
@@ -1442,7 +1442,7 @@ void MainWindow::ResetBackgroundUpdateTimer()
|
||||
if (m_backgroundUpdateTimer)
|
||||
{
|
||||
delete m_backgroundUpdateTimer;
|
||||
m_backgroundUpdateTimer = 0;
|
||||
m_backgroundUpdateTimer = nullptr;
|
||||
}
|
||||
|
||||
ICVar* pBackgroundUpdatePeriod = gEnv->pConsole->GetCVar("ed_backgroundUpdatePeriod");
|
||||
@@ -1488,7 +1488,7 @@ void MainWindow::OnRefreshAudioSystem()
|
||||
|
||||
if (QString::compare(sLevelName, "Untitled", Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
// Rather pass NULL to indicate that no level is loaded!
|
||||
// Rather pass nullptr to indicate that no level is loaded!
|
||||
sLevelName = QString();
|
||||
}
|
||||
|
||||
@@ -1921,7 +1921,7 @@ QWidget* MainWindow::CreateToolbarWidget(int actionId)
|
||||
break;
|
||||
case ID_TOOLBAR_WIDGET_SPACER_RIGHT:
|
||||
w = CreateSpacerRightWidget();
|
||||
break;
|
||||
break;
|
||||
default:
|
||||
qWarning() << Q_FUNC_INFO << "Unknown id " << actionId;
|
||||
return nullptr;
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#include <QToolButton>
|
||||
|
||||
// Editor
|
||||
#include "NewTerrainDialog.h"
|
||||
#include "NewTerrainDialog.h"
|
||||
|
||||
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
#include <ui_NewLevelDialog.h>
|
||||
@@ -54,7 +54,7 @@ private:
|
||||
|
||||
// CNewLevelDialog dialog
|
||||
|
||||
CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/)
|
||||
CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=nullptr*/)
|
||||
: QDialog(pParent)
|
||||
, m_bUpdate(false)
|
||||
, ui(new Ui::CNewLevelDialog)
|
||||
@@ -69,7 +69,7 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/)
|
||||
|
||||
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:"));
|
||||
@@ -98,7 +98,7 @@ CNewLevelDialog::CNewLevelDialog(QWidget* pParent /*=NULL*/)
|
||||
|
||||
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
|
||||
// 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().
|
||||
|
||||
@@ -19,7 +19,7 @@ AZ_POP_DISABLE_WARNING
|
||||
|
||||
|
||||
|
||||
CNewTerrainDialog::CNewTerrainDialog(QWidget* pParent /*=NULL*/)
|
||||
CNewTerrainDialog::CNewTerrainDialog(QWidget* pParent /*=nullptr*/)
|
||||
: QDialog(pParent)
|
||||
, m_terrainResolutionIndex(0)
|
||||
, m_terrainUnitsIndex(0)
|
||||
|
||||
@@ -133,7 +133,7 @@ IClassDesc* CClassFactory::FindClass(const char* pClassName) const
|
||||
|
||||
if (!pSubClassName)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString name = QString(pClassName).left(pSubClassName - pClassName);
|
||||
@@ -169,7 +169,7 @@ void CClassFactory::UnregisterClass(const char* pClassName)
|
||||
{
|
||||
IClassDesc* pClassDesc = FindClass(pClassName);
|
||||
|
||||
if (pClassDesc == NULL)
|
||||
if (pClassDesc == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -18,8 +18,8 @@
|
||||
#include "Include/IPlugin.h"
|
||||
|
||||
|
||||
typedef IPlugin* (* TPfnCreatePluginInstance)(PLUGIN_INIT_PARAM* pInitParam);
|
||||
typedef void (* TPfnQueryPluginSettings)(SPluginSettings&);
|
||||
using TPfnCreatePluginInstance = IPlugin *(*)(PLUGIN_INIT_PARAM *pInitParam);
|
||||
using TPfnQueryPluginSettings = void (*)(SPluginSettings &);
|
||||
|
||||
CPluginManager::CPluginManager()
|
||||
{
|
||||
@@ -210,7 +210,7 @@ bool CPluginManager::LoadPlugins(const char* pPathWithMask)
|
||||
continue;
|
||||
}
|
||||
|
||||
IPlugin* pPlugin = NULL;
|
||||
IPlugin* pPlugin = nullptr;
|
||||
PLUGIN_INIT_PARAM sInitParam =
|
||||
{
|
||||
GetIEditor(),
|
||||
@@ -279,7 +279,7 @@ IPlugin* CPluginManager::GetPluginByGUID(const char* pGUID)
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
IPlugin* CPluginManager::GetPluginByUIID(uint8 iUserInterfaceID)
|
||||
@@ -290,7 +290,7 @@ IPlugin* CPluginManager::GetPluginByUIID(uint8 iUserInterfaceID)
|
||||
|
||||
if (it == m_uuidPluginMap.end())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return (*it).second;
|
||||
@@ -302,7 +302,7 @@ IUIEvent* CPluginManager::GetEventByIDAndPluginID(uint8 aPluginID, uint8 aEventI
|
||||
// specified by its ID and the user interface ID of the plugin which
|
||||
// created the UI element
|
||||
|
||||
IPlugin* pPlugin = NULL;
|
||||
IPlugin* pPlugin = nullptr;
|
||||
TEventHandlerIt eventIt;
|
||||
TPluginEventIt pluginIt;
|
||||
|
||||
@@ -310,21 +310,21 @@ IUIEvent* CPluginManager::GetEventByIDAndPluginID(uint8 aPluginID, uint8 aEventI
|
||||
|
||||
if (!pPlugin)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
pluginIt = m_pluginEventMap.find(pPlugin);
|
||||
|
||||
if (pluginIt == m_pluginEventMap.end())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
eventIt = (*pluginIt).second.find(aEventID);
|
||||
|
||||
if (eventIt == (*pluginIt).second.end())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return (*eventIt).second;
|
||||
|
||||
@@ -56,7 +56,7 @@ void CPerforceSourceControl::ShowSettings()
|
||||
|
||||
void CPerforceSourceControl::SetSourceControlState(SourceControlState state)
|
||||
{
|
||||
AUTO_LOCK(g_cPerforceValues);
|
||||
CryAutoLock<CryCriticalSection> lock(g_cPerforceValues);
|
||||
|
||||
switch (state)
|
||||
{
|
||||
|
||||
@@ -323,7 +323,7 @@ namespace
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void GetPythonArgumentsVector(const char* pArguments, QStringList& inputArguments)
|
||||
{
|
||||
if (pArguments == NULL)
|
||||
if (pArguments == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
QCollapsibleGroupBox::QCollapsibleGroupBox(QWidget* parent)
|
||||
: QGroupBox(parent)
|
||||
, m_collapsed(false)
|
||||
, m_toggleButton(0)
|
||||
, m_toggleButton(nullptr)
|
||||
{
|
||||
m_toggleButton = new QToolButton(this);
|
||||
m_toggleButton->setFixedSize(16, 16);
|
||||
|
||||
@@ -60,7 +60,7 @@ public:
|
||||
void DrawDome(const Matrix34& worldTM, const SGizmoParameters& setup, DisplayContext& dc, AABB& objectBox);
|
||||
bool HitTest(const Matrix34& worldTM, const SGizmoParameters& setup, HitContext& hc);
|
||||
|
||||
bool HitTestForRotationCircle(const Matrix34& worldTM, IDisplayViewport* view, const QPoint& pos, float fHitWidth, Vec3* pOutHitPos = NULL, Vec3* pOutHitNormal = NULL);
|
||||
bool HitTestForRotationCircle(const Matrix34& worldTM, IDisplayViewport* view, const QPoint& pos, float fHitWidth, Vec3* pOutHitPos = nullptr, Vec3* pOutHitNormal = nullptr);
|
||||
|
||||
void SetHighlightAxis(int axis) { m_highlightAxis = axis; };
|
||||
int GetHighlightAxis() const { return m_highlightAxis; };
|
||||
|
||||
@@ -89,7 +89,7 @@ int ResizeResolutionModel::SizeRow(uint32 dwSize) const
|
||||
// CResizeResolutionDialog dialog
|
||||
|
||||
|
||||
CResizeResolutionDialog::CResizeResolutionDialog(QWidget* pParent /*=NULL*/)
|
||||
CResizeResolutionDialog::CResizeResolutionDialog(QWidget* pParent /*=nullptr*/)
|
||||
: QDialog(pParent)
|
||||
, m_model(new ResizeResolutionModel(this))
|
||||
, ui(new Ui::CResizeResolutionDialog)
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
}
|
||||
|
||||
private:
|
||||
typedef std::map<string, const SStaticResourceSelectorEntry*, stl::less_stricmp<string> > TTypeMap;
|
||||
using TTypeMap = std::map<string, const SStaticResourceSelectorEntry *, stl::less_stricmp<string>>;
|
||||
TTypeMap m_typeMap;
|
||||
|
||||
std::map<string, string> m_globallySelectedResources;
|
||||
|
||||
@@ -49,7 +49,7 @@ QString CSelectEAXPresetDlg::GetCurrPreset() const
|
||||
{
|
||||
return m_ui->listView->currentIndex().data().toString();
|
||||
}
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
// EXCEPTION: OCX Property Pages should return false
|
||||
return QString();
|
||||
}
|
||||
|
||||
|
||||
@@ -244,7 +244,7 @@ SEditorSettings::SEditorSettings()
|
||||
|
||||
gui.nToolbarIconSize = static_cast<int>(AzQtComponents::ToolBar::ToolBarIconSize::Default);
|
||||
|
||||
int lfHeight = 8;// -MulDiv(8, GetDeviceCaps(GetDC(NULL), LOGPIXELSY), 72);
|
||||
int lfHeight = 8;// -MulDiv(8, GetDeviceCaps(GetDC(nullptr), LOGPIXELSY), 72);
|
||||
gui.nDefaultFontHieght = lfHeight;
|
||||
gui.hSystemFont = QFont("Ms Shell Dlg 2", lfHeight, QFont::Normal);
|
||||
gui.hSystemFontBold = QFont("Ms Shell Dlg 2", lfHeight, QFont::Bold);
|
||||
@@ -534,7 +534,7 @@ void SEditorSettings::Save()
|
||||
SaveValue("Settings", "ShowTimeInConsole", bShowTimeInConsole);
|
||||
|
||||
SaveValue("Settings", "EnableSceneInspector", enableSceneInspector);
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Viewport settings.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -627,7 +627,7 @@ void SEditorSettings::Save()
|
||||
SaveValue("Settings\\AssetBrowser", "AutoFilterFromViewportSelection", sAssetBrowserSettings.bAutoFilterFromViewportSelection);
|
||||
SaveValue("Settings\\AssetBrowser", "VisibleColumnNames", sAssetBrowserSettings.sVisibleColumnNames);
|
||||
SaveValue("Settings\\AssetBrowser", "ColumnNames", sAssetBrowserSettings.sColumnNames);
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// Deep Selection Settings
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -706,7 +706,7 @@ void SEditorSettings::Load()
|
||||
QString strPlaceholderString;
|
||||
// Load settings from registry.
|
||||
LoadValue("Settings", "UndoLevels", undoLevels);
|
||||
LoadValue("Settings", "UndoSliceOverrideSaveValue", m_undoSliceOverrideSaveValue);
|
||||
LoadValue("Settings", "UndoSliceOverrideSaveValue", m_undoSliceOverrideSaveValue);
|
||||
LoadValue("Settings", "ShowWelcomeScreenAtStartup", bShowDashboardAtStartup);
|
||||
LoadValue("Settings", "ShowCircularDependencyError", m_showCircularDependencyError);
|
||||
LoadValue("Settings", "LoadLastLevelAtStartup", bAutoloadLastLevelAtStartup);
|
||||
|
||||
@@ -105,7 +105,7 @@ bool CSettingsManager::CreateDefaultLayoutSettingsFile()
|
||||
|
||||
AZStd::vector<AZStd::string> CSettingsManager::BuildSettingsList()
|
||||
{
|
||||
XmlNodeRef root = NULL;
|
||||
XmlNodeRef root = nullptr;
|
||||
|
||||
root = m_pSettingsManagerMemoryNode;
|
||||
|
||||
@@ -132,8 +132,8 @@ void CSettingsManager::BuildSettingsList_Helper(const XmlNodeRef& node, const AZ
|
||||
{
|
||||
for (int i = 0; i < node->getNumAttributes(); ++i)
|
||||
{
|
||||
const char* key = NULL;
|
||||
const char* value = NULL;
|
||||
const char* key = nullptr;
|
||||
const char* value = nullptr;
|
||||
node->getAttributeByIndex(i, &key, &value);
|
||||
if (!pathToNode.empty())
|
||||
{
|
||||
@@ -163,7 +163,7 @@ void CSettingsManager::BuildSettingsList_Helper(const XmlNodeRef& node, const AZ
|
||||
result
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -190,7 +190,7 @@ void CSettingsManager::SaveSetting(const QString& path, const QString& attr, con
|
||||
// Spaces in node names not allowed
|
||||
writeAttr.replace(" ", "");
|
||||
|
||||
XmlNodeRef root = NULL;
|
||||
XmlNodeRef root = nullptr;
|
||||
|
||||
root = m_pSettingsManagerMemoryNode;
|
||||
|
||||
@@ -276,11 +276,11 @@ XmlNodeRef CSettingsManager::LoadSetting(const QString& path, const QString& att
|
||||
// Spaces in node names not allowed
|
||||
readAttr.replace(" ", "");
|
||||
|
||||
XmlNodeRef root = NULL;
|
||||
XmlNodeRef root = nullptr;
|
||||
|
||||
root = m_pSettingsManagerMemoryNode;
|
||||
|
||||
XmlNodeRef tmpNode = NULL;
|
||||
XmlNodeRef tmpNode = nullptr;
|
||||
|
||||
if (NeedSettingsNode(path))
|
||||
{
|
||||
@@ -293,7 +293,7 @@ XmlNodeRef CSettingsManager::LoadSetting(const QString& path, const QString& att
|
||||
|
||||
if (!tmpNode)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (int i = 0; i < strNodes.size(); ++i)
|
||||
@@ -304,13 +304,13 @@ XmlNodeRef CSettingsManager::LoadSetting(const QString& path, const QString& att
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (!tmpNode->findChild(readAttr.toUtf8().data()))
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -360,7 +360,7 @@ void CSettingsManager::AddToolVersion(const QString& toolName, const QString& to
|
||||
return;
|
||||
}
|
||||
|
||||
if (stl::find_in_map(m_toolNames, toolName, NULL) == "")
|
||||
if (stl::find_in_map(m_toolNames, toolName, nullptr) == "")
|
||||
{
|
||||
if (!toolVersion.isEmpty())
|
||||
{
|
||||
@@ -380,7 +380,7 @@ void CSettingsManager::AddToolName(const QString& toolName, const QString& human
|
||||
return;
|
||||
}
|
||||
|
||||
if (stl::find_in_map(m_toolNames, toolName, NULL) == "")
|
||||
if (stl::find_in_map(m_toolNames, toolName, nullptr) == "")
|
||||
{
|
||||
if (!humanReadableName.isEmpty())
|
||||
{
|
||||
@@ -499,7 +499,7 @@ void CSettingsManager::GetMatchingLayoutNames(TToolNamesMap& foundTools, XmlNode
|
||||
return;
|
||||
}
|
||||
|
||||
TToolNamesMap* toolNames = NULL;
|
||||
TToolNamesMap* toolNames = nullptr;
|
||||
|
||||
if (!foundTools.empty())
|
||||
{
|
||||
@@ -593,11 +593,11 @@ bool CSettingsManager::NeedSettingsNode(const QString& path)
|
||||
{
|
||||
if ((path != EDITOR_LAYOUT_ROOT_NODE) && (path != TOOLBOX_NODE) && (path != TOOLBOXMACROS_NODE))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -605,13 +605,13 @@ void CSettingsManager::SerializeCVars(XmlNodeRef& node, bool bLoad)
|
||||
{
|
||||
int nNumberOfVariables(0);
|
||||
int nCurrentVariable(0);
|
||||
IConsole* piConsole(NULL);
|
||||
ICVar* piVariable(NULL);
|
||||
IConsole* piConsole(nullptr);
|
||||
ICVar* piVariable(nullptr);
|
||||
std::vector<char*> cszVariableNames;
|
||||
|
||||
char* szKey(NULL);
|
||||
char* szValue(NULL);
|
||||
ICVar* piCVar(NULL);
|
||||
char* szKey(nullptr);
|
||||
char* szValue(nullptr);
|
||||
ICVar* piCVar(nullptr);
|
||||
|
||||
piConsole = gEnv->pConsole;
|
||||
|
||||
@@ -622,7 +622,7 @@ void CSettingsManager::SerializeCVars(XmlNodeRef& node, bool bLoad)
|
||||
|
||||
if (bLoad)
|
||||
{
|
||||
XmlNodeRef readNode = NULL;
|
||||
XmlNodeRef readNode = nullptr;
|
||||
XmlNodeRef inputCVarsNode = node->findChild(CVARS_NODE);
|
||||
|
||||
if (!inputCVarsNode)
|
||||
@@ -649,7 +649,7 @@ void CSettingsManager::SerializeCVars(XmlNodeRef& node, bool bLoad)
|
||||
}
|
||||
else
|
||||
{
|
||||
XmlNodeRef newCVarNode = NULL;
|
||||
XmlNodeRef newCVarNode = nullptr;
|
||||
XmlNodeRef oldCVarsNode = node->findChild(CVARS_NODE);
|
||||
|
||||
if (oldCVarsNode)
|
||||
@@ -660,9 +660,9 @@ void CSettingsManager::SerializeCVars(XmlNodeRef& node, bool bLoad)
|
||||
XmlNodeRef cvarsNode = XmlHelpers::CreateXmlNode(CVARS_NODE);
|
||||
|
||||
nNumberOfVariables = piConsole->GetNumVisibleVars();
|
||||
cszVariableNames.resize(nNumberOfVariables, NULL);
|
||||
cszVariableNames.resize(nNumberOfVariables, nullptr);
|
||||
|
||||
if (piConsole->GetSortedVars((const char**)&cszVariableNames.front(), nNumberOfVariables, NULL) != nNumberOfVariables)
|
||||
if (piConsole->GetSortedVars((const char**)&cszVariableNames.front(), nNumberOfVariables, nullptr) != nNumberOfVariables)
|
||||
{
|
||||
assert(false);
|
||||
return;
|
||||
@@ -711,8 +711,8 @@ void CSettingsManager::ReadValueStr(XmlNodeRef& sourceNode, const QString& path,
|
||||
// Spaces in node names not allowed
|
||||
readAttr.replace(" ", "");
|
||||
|
||||
XmlNodeRef root = NULL;
|
||||
XmlNodeRef tmpNode = NULL;
|
||||
XmlNodeRef root = nullptr;
|
||||
XmlNodeRef tmpNode = nullptr;
|
||||
|
||||
if (NeedSettingsNode(path))
|
||||
{
|
||||
@@ -809,7 +809,7 @@ bool CSettingsManager::IsEventSafe(const SEventLog& event)
|
||||
|
||||
if (!root)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
QString eventName = event.m_eventName;
|
||||
@@ -823,7 +823,7 @@ bool CSettingsManager::IsEventSafe(const SEventLog& event)
|
||||
// Log entry not found, so it is safe to start
|
||||
if (!resNode)
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
XmlNodeRef callerVersion = resNode->findChild(EVENT_LOG_CALLER_VERSION);
|
||||
@@ -841,15 +841,15 @@ bool CSettingsManager::IsEventSafe(const SEventLog& event)
|
||||
{
|
||||
if (callerVersionStr != GetToolVersion(eventName))
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
// The same version of tool/level found
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -947,15 +947,15 @@ XmlNodeRef CSettingsManager::LoadLogEventSetting(const QString& path, const QStr
|
||||
|
||||
if (!root)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XmlNodeRef tmpNode = NULL;
|
||||
XmlNodeRef tmpNode = nullptr;
|
||||
tmpNode = root;
|
||||
|
||||
if (!tmpNode)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (int i = 0; i < strNodes.size(); ++i)
|
||||
@@ -966,7 +966,7 @@ XmlNodeRef CSettingsManager::LoadLogEventSetting(const QString& path, const QStr
|
||||
}
|
||||
else
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -975,7 +975,7 @@ XmlNodeRef CSettingsManager::LoadLogEventSetting(const QString& path, const QStr
|
||||
return tmpNode;
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
QString CSettingsManager::GenerateContentHash(XmlNodeRef& node, QString sourceName)
|
||||
|
||||
@@ -84,7 +84,7 @@ void CSettingsManagerDialog::OnReadBtnClick()
|
||||
ui->m_layoutListBox->clear();
|
||||
|
||||
TToolNamesMap toolNames;
|
||||
XmlNodeRef dummyNode = NULL;
|
||||
XmlNodeRef dummyNode = nullptr;
|
||||
|
||||
GetIEditor()->GetSettingsManager()->GetMatchingLayoutNames(toolNames, dummyNode, m_importFileStr);
|
||||
|
||||
|
||||
@@ -27,14 +27,14 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
// CStartupLogoDialog dialog
|
||||
|
||||
CStartupLogoDialog* CStartupLogoDialog::s_pLogoWindow = 0;
|
||||
CStartupLogoDialog* CStartupLogoDialog::s_pLogoWindow = nullptr;
|
||||
|
||||
CStartupLogoDialog::CStartupLogoDialog(QString versionText, QString richTextCopyrightNotice, QWidget* pParent /*=NULL*/)
|
||||
CStartupLogoDialog::CStartupLogoDialog(QString versionText, QString richTextCopyrightNotice, QWidget* pParent /*=nullptr*/)
|
||||
: QWidget(pParent, Qt::Dialog | Qt::FramelessWindowHint)
|
||||
, m_ui(new Ui::StartupLogoDialog)
|
||||
{
|
||||
m_ui->setupUi(this);
|
||||
|
||||
|
||||
s_pLogoWindow = this;
|
||||
|
||||
m_backgroundImage = QPixmap(QStringLiteral(":/StartupLogoDialog/splashscreen_background_developer_preview.jpg"));
|
||||
@@ -61,7 +61,7 @@ CStartupLogoDialog::CStartupLogoDialog(QString versionText, QString richTextCopy
|
||||
|
||||
CStartupLogoDialog::~CStartupLogoDialog()
|
||||
{
|
||||
s_pLogoWindow = 0;
|
||||
s_pLogoWindow = nullptr;
|
||||
}
|
||||
|
||||
void CStartupLogoDialog::SetText(const char* text)
|
||||
|
||||
@@ -25,7 +25,7 @@ typedef bool (StringDlgPredicate)(QString input);
|
||||
class StringDlg : public QInputDialog
|
||||
{
|
||||
public:
|
||||
StringDlg(const QString &title, QWidget* pParent = NULL, bool bFileNameLimitation = false);
|
||||
StringDlg(const QString &title, QWidget* pParent = nullptr, bool bFileNameLimitation = false);
|
||||
|
||||
void SetCheckCallback(const std::function<StringDlgPredicate>& Check) {
|
||||
m_Check = Check;
|
||||
|
||||
@@ -186,7 +186,7 @@ const CToolBoxMacro* CToolBoxManager::GetMacro(int iIndex, bool bToolbox) const
|
||||
assert(0 <= iIndex && iIndex < m_shelveMacros.size());
|
||||
return m_shelveMacros[iIndex];
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -202,7 +202,7 @@ CToolBoxMacro* CToolBoxManager::GetMacro(int iIndex, bool bToolbox)
|
||||
assert(0 <= iIndex && iIndex < m_shelveMacros.size());
|
||||
return m_shelveMacros[iIndex];
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -240,14 +240,14 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
|
||||
const int macroCount = m_macros.size();
|
||||
if (macroCount > ID_TOOL_LAST - ID_TOOL_FIRST + 1)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < macroCount; ++i)
|
||||
{
|
||||
if (QString::compare(m_macros[i]->GetTitle(), title, Qt::CaseInsensitive) == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -264,7 +264,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
|
||||
const int shelveMacroCount = m_shelveMacros.size();
|
||||
if (shelveMacroCount > ID_TOOL_SHELVE_LAST - ID_TOOL_SHELVE_FIRST + 1)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
CToolBoxMacro* pNewTool = new CToolBoxMacro(title);
|
||||
@@ -275,7 +275,7 @@ CToolBoxMacro* CToolBoxManager::NewMacro(const QString& title, bool bToolbox, in
|
||||
m_shelveMacros.push_back(pNewTool);
|
||||
return pNewTool;
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -333,7 +333,7 @@ void CToolBoxManager::Load([[maybe_unused]] ActionManager* actionManager)
|
||||
void CToolBoxManager::Load(QString xmlpath, AmazonToolbar* pToolbar, bool bToolbox, ActionManager* actionManager)
|
||||
{
|
||||
XmlNodeRef toolBoxNode = XmlHelpers::LoadXmlFromFile(xmlpath.toUtf8().data());
|
||||
if (toolBoxNode == NULL)
|
||||
if (toolBoxNode == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -137,7 +137,7 @@ public:
|
||||
CToolBoxMacro* GetMacro(int iIndex, bool bToolbox);
|
||||
//! Get the index of a macro from its title.
|
||||
int GetMacroIndex(const QString& title, bool bToolbox) const;
|
||||
//! Creates a new macro in the manager. If the title is duplicate, this returns NULL.
|
||||
//! Creates a new macro in the manager. If the title is duplicate, this returns nullptr.
|
||||
CToolBoxMacro* NewMacro(const QString& title, bool bToolbox, int* newIdx);
|
||||
//! Try to change the title of a macro. If the title is duplicate, the change is aborted and this returns false.
|
||||
bool SetMacroTitle(int index, const QString& title, bool bToolbox);
|
||||
|
||||
@@ -109,7 +109,7 @@ private:
|
||||
QStringList m_iconFiles;
|
||||
};
|
||||
|
||||
CIconListDialog::CIconListDialog(QWidget* pParent /* = NULL */)
|
||||
CIconListDialog::CIconListDialog(QWidget* pParent /* = nullptr */)
|
||||
: QDialog(pParent)
|
||||
, m_ui(new Ui::IconListDialog)
|
||||
{
|
||||
@@ -498,7 +498,7 @@ CToolsConfigPage::CToolsConfigPage(QWidget* parent)
|
||||
QKeySequence shortcut(value);
|
||||
m_ui->m_macroShortcutKey->setKeySequence(shortcut);
|
||||
}
|
||||
|
||||
|
||||
if (m_ui->m_macroShortcutKey->keySequence().count() >= 1)
|
||||
{
|
||||
m_ui->m_assignShortcut->setEnabled(true);
|
||||
@@ -703,7 +703,7 @@ void CToolsConfigPage::OnAssignMacroShortcut()
|
||||
{
|
||||
auto pShortcutMgr = MainWindow::instance()->GetShortcutManager();
|
||||
|
||||
if (pShortcutMgr == NULL)
|
||||
if (pShortcutMgr == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -26,19 +26,19 @@ public:
|
||||
CSmartVariableArray mv_table;
|
||||
CSmartVariable<float> mv_value;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_value, "Value");
|
||||
}
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return trackType == eAnimCurveType_BezierFloat;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 0; }
|
||||
unsigned int GetPriority() const override { return 0; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -41,7 +41,7 @@ public:
|
||||
CSmartVariable<float> mv_blendInTime;
|
||||
CSmartVariable<float> mv_blendOutTime;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
// Init to an invalid id
|
||||
AZ::Data::AssetId assetId;
|
||||
@@ -62,15 +62,15 @@ public:
|
||||
mv_timeScale->SetLimits(0.001f, 100.f);
|
||||
}
|
||||
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const override
|
||||
{
|
||||
return valueType == AnimValueType::AssetBlend;
|
||||
}
|
||||
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
CSmartVariable<QString> mv_folder;
|
||||
CSmartVariable<bool> mv_once;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
mv_duration.GetVar()->SetLimits(0, 100000.0f);
|
||||
mv_timeStep.GetVar()->SetLimits(0.001f, 1.0f);
|
||||
@@ -39,14 +39,14 @@ public:
|
||||
AddVariable(mv_table, mv_folder, "Output Folder");
|
||||
AddVariable(mv_table, mv_once, "Just one frame?");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Capture;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -33,7 +33,7 @@ public:
|
||||
CSmartVariable<float> mv_endTime;
|
||||
CSmartVariable<float> mv_timeScale;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_animation, "Animation", IVariable::DT_ANIMATION);
|
||||
@@ -45,14 +45,14 @@ public:
|
||||
AddVariable(mv_table, mv_timeScale, "Time Scale");
|
||||
mv_timeScale->SetLimits(0.001f, 100.f);
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Animation || valueType == AnimValueType::CharacterAnim;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
CSmartVariableEnum<QString> mv_font;
|
||||
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_comment, "Comment");
|
||||
@@ -41,13 +41,13 @@ public:
|
||||
|
||||
AddVariable(mv_table, mv_color, "Color", IVariable::DT_COLOR);
|
||||
|
||||
mv_align->SetEnumList(NULL);
|
||||
mv_align->SetEnumList(nullptr);
|
||||
mv_align->AddEnumItem("Left", ICommentKey::eTA_Left);
|
||||
mv_align->AddEnumItem("Center", ICommentKey::eTA_Center);
|
||||
mv_align->AddEnumItem("Right", ICommentKey::eTA_Right);
|
||||
AddVariable(mv_table, mv_align, "Align");
|
||||
|
||||
mv_font->SetEnumList(NULL);
|
||||
mv_font->SetEnumList(nullptr);
|
||||
IFileUtil::FileArray fa;
|
||||
CFileUtil::ScanDirectory((Path::GetEditingGameDataFolder() + "/Fonts/").c_str(), "*.xml", fa, true);
|
||||
for (size_t i = 0; i < fa.size(); ++i)
|
||||
@@ -58,14 +58,14 @@ public:
|
||||
}
|
||||
AddVariable(mv_table, mv_font, "Font");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::CommentText;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ CCommentNodeAnimator::CCommentNodeAnimator(CTrackViewAnimNode* pCommentNode)
|
||||
|
||||
CCommentNodeAnimator::~CCommentNodeAnimator()
|
||||
{
|
||||
m_pCommentNode = 0;
|
||||
m_pCommentNode = nullptr;
|
||||
}
|
||||
|
||||
void CCommentNodeAnimator::Animate(CTrackViewAnimNode* pNode, const SAnimContext& ac)
|
||||
|
||||
@@ -24,19 +24,19 @@ public:
|
||||
CSmartVariableArray mv_table;
|
||||
CSmartVariable<QString> mv_command;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_command, "Command");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Console;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -26,7 +26,7 @@ public:
|
||||
CSmartVariable<QString> mv_value;
|
||||
CSmartVariable<bool> mv_notrigger_in_scrubbing;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_event, "Event");
|
||||
@@ -35,14 +35,14 @@ public:
|
||||
AddVariable(mv_deprecated, "Deprecated");
|
||||
AddVariable(mv_deprecated, mv_animation, "Animation");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Event;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
@@ -73,8 +73,8 @@ bool CEventKeyUIControls::OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys
|
||||
CAnimParamType paramType = keyHandle.GetTrack()->GetParameterType();
|
||||
if (paramType == AnimParamType::Event)
|
||||
{
|
||||
mv_event.SetEnumList(NULL);
|
||||
mv_animation.SetEnumList(NULL);
|
||||
mv_event.SetEnumList(nullptr);
|
||||
mv_animation.SetEnumList(nullptr);
|
||||
|
||||
// Add <None> for empty, unset event
|
||||
mv_event->AddEnumItem(QObject::tr("<None>"), "");
|
||||
|
||||
@@ -24,12 +24,12 @@ public:
|
||||
CSmartVariableArray mv_table;
|
||||
CSmartVariable<float> mv_command;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_command, "Goto Time");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
if (paramType == AnimParamType::Goto)
|
||||
{
|
||||
@@ -40,10 +40,10 @@ public:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -33,23 +33,23 @@ class CScreenFaderKeyUIControls
|
||||
public:
|
||||
//-----------------------------------------------------------------------------
|
||||
//!
|
||||
virtual bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::ScreenFader;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//!
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
|
||||
mv_fadeType->SetEnumList(NULL);
|
||||
mv_fadeType->SetEnumList(nullptr);
|
||||
mv_fadeType->AddEnumItem("FadeIn", IScreenFaderKey::eFT_FadeIn);
|
||||
mv_fadeType->AddEnumItem("FadeOut", IScreenFaderKey::eFT_FadeOut);
|
||||
AddVariable(mv_table, mv_fadeType, "Type");
|
||||
|
||||
mv_fadechangeType->SetEnumList(NULL);
|
||||
mv_fadechangeType->SetEnumList(nullptr);
|
||||
mv_fadechangeType->AddEnumItem("Linear", IScreenFaderKey::eFCT_Linear);
|
||||
mv_fadechangeType->AddEnumItem("Square", IScreenFaderKey::eFCT_Square);
|
||||
mv_fadechangeType->AddEnumItem("Cubic Square", IScreenFaderKey::eFCT_CubicSquare);
|
||||
@@ -67,13 +67,13 @@ public:
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//!
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& keys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& keys) override;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
//!
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& keys);
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& keys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -22,7 +22,7 @@ class CSelectKeyUIControls
|
||||
, protected AZ::EntitySystemBus::Handler
|
||||
{
|
||||
public:
|
||||
CSelectKeyUIControls() {}
|
||||
CSelectKeyUIControls() = default;
|
||||
|
||||
~CSelectKeyUIControls() override;
|
||||
|
||||
@@ -30,7 +30,7 @@ public:
|
||||
CSmartVariableEnum<QString> mv_camera;
|
||||
CSmartVariable<float> mv_BlendTime;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_camera, "Camera");
|
||||
@@ -39,14 +39,14 @@ public:
|
||||
Camera::CameraNotificationBus::Handler::BusConnect();
|
||||
AZ::EntitySystemBus::Handler::BusConnect();
|
||||
}
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const
|
||||
bool SupportTrackType([[maybe_unused]] const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, AnimValueType valueType) const override
|
||||
{
|
||||
return valueType == AnimValueType::Select;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
@@ -98,7 +98,7 @@ bool CSelectKeyUIControls::OnKeySelectionChange(CTrackViewKeyBundle& selectedKey
|
||||
ResetCameraEntries();
|
||||
|
||||
// Get All cameras.
|
||||
mv_camera.SetEnumList(NULL);
|
||||
mv_camera.SetEnumList(nullptr);
|
||||
|
||||
mv_camera->AddEnumItem(QObject::tr("<None>"), QString::number(static_cast<AZ::u64>(AZ::EntityId::InvalidEntityId)));
|
||||
|
||||
@@ -217,7 +217,7 @@ void CSelectKeyUIControls::OnCameraRemoved(const AZ::EntityId & cameraId)
|
||||
// We can't iterate or remove an item from the enum list, and Camera::CameraRequests::GetCameras
|
||||
// still includes the deleted camera at this point. Reset the list anyway and filter out the
|
||||
// deleted camera.
|
||||
mv_camera->SetEnumList(NULL);
|
||||
mv_camera->SetEnumList(nullptr);
|
||||
mv_camera->AddEnumItem(QObject::tr("<None>"), QString::number(static_cast<AZ::u64>(AZ::EntityId::InvalidEntityId)));
|
||||
|
||||
AZ::EBusAggregateResults<AZ::EntityId> cameraComponentEntities;
|
||||
@@ -256,7 +256,7 @@ void CSelectKeyUIControls::OnEntityNameChanged(const AZ::EntityId & entityId, [[
|
||||
|
||||
void CSelectKeyUIControls::ResetCameraEntries()
|
||||
{
|
||||
mv_camera.SetEnumList(NULL);
|
||||
mv_camera.SetEnumList(nullptr);
|
||||
mv_camera->AddEnumItem(QObject::tr("<None>"), QString::number(static_cast<AZ::u64>(AZ::EntityId::InvalidEntityId)));
|
||||
|
||||
// Find all Component Entity Cameras
|
||||
|
||||
@@ -117,8 +117,7 @@ CSequenceBatchRenderDialog::CSequenceBatchRenderDialog(float fps, QWidget* pPare
|
||||
}
|
||||
|
||||
CSequenceBatchRenderDialog::~CSequenceBatchRenderDialog()
|
||||
{
|
||||
}
|
||||
= default;
|
||||
|
||||
void CSequenceBatchRenderDialog::reject()
|
||||
{
|
||||
@@ -519,7 +518,7 @@ void CSequenceBatchRenderDialog::OnGo()
|
||||
InitializeContext();
|
||||
|
||||
// Trigger the first item.
|
||||
OnMovieEvent(IMovieListener::eMovieEvent_Stopped, NULL);
|
||||
OnMovieEvent(IMovieListener::eMovieEvent_Stopped, nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -728,7 +727,7 @@ bool CSequenceBatchRenderDialog::GetResolutionFromCustomResText(const char* cust
|
||||
bool CSequenceBatchRenderDialog::LoadOutputOptions(const QString& pathname)
|
||||
{
|
||||
XmlNodeRef batchRenderOptionsNode = XmlHelpers::LoadXmlFromFile(pathname.toStdString().c_str());
|
||||
if (batchRenderOptionsNode == NULL)
|
||||
if (batchRenderOptionsNode == nullptr)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -1391,7 +1390,7 @@ void CSequenceBatchRenderDialog::OnLoadBatch()
|
||||
Path::GetUserSandboxFolder(), loadPath))
|
||||
{
|
||||
XmlNodeRef batchRenderListNode = XmlHelpers::LoadXmlFromFile(loadPath.toStdString().c_str());
|
||||
if (batchRenderListNode == NULL)
|
||||
if (batchRenderListNode == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -1414,7 +1413,7 @@ void CSequenceBatchRenderDialog::OnLoadBatch()
|
||||
// sequence
|
||||
const QString seqName = itemNode->getAttr("sequence");
|
||||
item.pSequence = GetIEditor()->GetMovieSystem()->FindLegacySequenceByName(seqName.toUtf8().data());
|
||||
if (item.pSequence == NULL)
|
||||
if (item.pSequence == nullptr)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Sequence not found"), tr("A sequence of '%1' not found! This'll be skipped.").arg(seqName));
|
||||
continue;
|
||||
@@ -1431,7 +1430,7 @@ void CSequenceBatchRenderDialog::OnLoadBatch()
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item.pDirectorNode == NULL)
|
||||
if (item.pDirectorNode == nullptr)
|
||||
{
|
||||
QMessageBox::warning(this, tr("Director node not found"), tr("A director node of '%1' not found in the sequence of '%2'! This'll be skipped.").arg(directorName).arg(seqName));
|
||||
continue;
|
||||
@@ -1544,7 +1543,7 @@ bool CSequenceBatchRenderDialog::SetUpNewRenderItem(SRenderItem& item)
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (item.pDirectorNode == NULL)
|
||||
if (item.pDirectorNode == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -81,8 +81,8 @@ protected:
|
||||
bool disableDebugInfo;
|
||||
bool bCreateVideo;
|
||||
SRenderItem()
|
||||
: pSequence(NULL)
|
||||
, pDirectorNode(NULL)
|
||||
: pSequence(nullptr)
|
||||
, pDirectorNode(nullptr)
|
||||
, disableDebugInfo(false)
|
||||
, bCreateVideo(false) {}
|
||||
bool operator==(const SRenderItem& item)
|
||||
@@ -155,7 +155,7 @@ protected:
|
||||
, expectedTotalTime(0)
|
||||
, spentTime(0)
|
||||
, flagBU(0)
|
||||
, pActiveDirectorBU(NULL)
|
||||
, pActiveDirectorBU(nullptr)
|
||||
, cvarCustomResWidthBU(0)
|
||||
, cvarCustomResHeightBU(0)
|
||||
, cvarDisplayInfoBU(0)
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
CSmartVariable<float> mv_startTime;
|
||||
CSmartVariable<float> mv_endTime;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_sequence, "Sequence");
|
||||
@@ -35,14 +35,14 @@ public:
|
||||
AddVariable(mv_table, mv_startTime, "Start Time");
|
||||
AddVariable(mv_table, mv_endTime, "End Time");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Sequence;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
@@ -78,7 +78,7 @@ bool CSequenceKeyUIControls::OnKeySelectionChange(CTrackViewKeyBundle& selectedK
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////////
|
||||
// fill sequence comboBox with available sequences
|
||||
mv_sequence.SetEnumList(NULL);
|
||||
mv_sequence.SetEnumList(nullptr);
|
||||
|
||||
// Insert '<None>' empty enum
|
||||
mv_sequence->AddEnumItem(QObject::tr("<None>"), CTrackViewDialog::GetEntityIdAsString(AZ::EntityId(AZ::EntityId::InvalidEntityId)));
|
||||
@@ -193,7 +193,7 @@ void CSequenceKeyUIControls::OnUIChange(IVariable* pVar, CTrackViewKeyBundle& se
|
||||
|
||||
IMovieSystem* pMovieSystem = GetIEditor()->GetSystem()->GetIMovieSystem();
|
||||
|
||||
if (pMovieSystem != NULL)
|
||||
if (pMovieSystem != nullptr)
|
||||
{
|
||||
pMovieSystem->SetStartEndTime(pSequence, sequenceKey.fStartTime, sequenceKey.fEndTime);
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
CSmartVariable<float> mv_duration;
|
||||
CSmartVariable<Vec3> mv_customColor;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_startTrigger, "StartTrigger", IVariable::DT_AUDIO_TRIGGER);
|
||||
@@ -38,14 +38,14 @@ public:
|
||||
AddVariable(mv_options, "Options");
|
||||
AddVariable(mv_options, mv_customColor, "Custom Color", IVariable::DT_COLOR);
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::Sound;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -344,7 +344,7 @@ void CTVCustomizeTrackColorsDlg::Export(const QString& fullPath) const
|
||||
bool CTVCustomizeTrackColorsDlg::Import(const QString& fullPath)
|
||||
{
|
||||
XmlNodeRef customTrackColorsNode = XmlHelpers::LoadXmlFromFile(fullPath.toStdString().c_str());
|
||||
if (customTrackColorsNode == NULL)
|
||||
if (customTrackColorsNode == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -211,7 +211,7 @@ public:
|
||||
int GetNumberOfUsageAndFirstTimeUsed(const char* eventName, float& timeFirstUsed) const;
|
||||
};
|
||||
|
||||
CTVEventsDialog::CTVEventsDialog(QWidget* pParent /*=NULL*/)
|
||||
CTVEventsDialog::CTVEventsDialog(QWidget* pParent /*=nullptr*/)
|
||||
: QDialog(pParent)
|
||||
, m_ui(new Ui::TVEventsDialog)
|
||||
{
|
||||
|
||||
@@ -51,7 +51,7 @@ CTVSequenceProps::~CTVSequenceProps()
|
||||
}
|
||||
|
||||
// CTVSequenceProps message handlers
|
||||
BOOL CTVSequenceProps::OnInitDialog()
|
||||
bool CTVSequenceProps::OnInitDialog()
|
||||
{
|
||||
ui->NAME->setText(m_pSequence->GetName());
|
||||
int seqFlags = m_pSequence->GetFlags();
|
||||
@@ -97,7 +97,7 @@ BOOL CTVSequenceProps::OnInitDialog()
|
||||
ui->ORT_ONCE->setChecked(true);
|
||||
}
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
return true; // return true unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
@@ -259,7 +259,7 @@ void CTVSequenceProps::OnOK()
|
||||
|
||||
void CTVSequenceProps::ToggleCutsceneOptions(bool bActivated)
|
||||
{
|
||||
if (bActivated == FALSE)
|
||||
if (bActivated == false)
|
||||
{
|
||||
ui->NOABORT->setChecked(false);
|
||||
ui->DISABLEPLAYER->setChecked(false);
|
||||
|
||||
@@ -28,7 +28,7 @@ class CTVSequenceProps
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
CTVSequenceProps(CTrackViewSequence* pSequence, float fps, QWidget* pParent = NULL); // standard constructor
|
||||
CTVSequenceProps(CTrackViewSequence* pSequence, float fps, QWidget* pParent = nullptr); // standard constructor
|
||||
~CTVSequenceProps();
|
||||
|
||||
private:
|
||||
@@ -39,7 +39,7 @@ private:
|
||||
};
|
||||
CTrackViewSequence* m_pSequence;
|
||||
|
||||
virtual BOOL OnInitDialog();
|
||||
virtual bool OnInitDialog();
|
||||
virtual void OnOK();
|
||||
|
||||
void MoveScaleKeys();
|
||||
|
||||
@@ -27,7 +27,7 @@ public:
|
||||
CSmartVariable<float> mv_timeScale;
|
||||
CSmartVariable<bool> mv_bLoop;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_startTime, "Start Time");
|
||||
@@ -36,14 +36,14 @@ public:
|
||||
AddVariable(mv_table, mv_bLoop, "Loop");
|
||||
mv_timeScale->SetLimits(0.001f, 100.f);
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::TimeRanges;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
|
||||
@@ -26,21 +26,21 @@ public:
|
||||
CSmartVariableEnum<QString> mv_event;
|
||||
CSmartVariable<QString> mv_value;
|
||||
|
||||
virtual void OnCreateVars()
|
||||
void OnCreateVars() override
|
||||
{
|
||||
AddVariable(mv_table, "Key Properties");
|
||||
AddVariable(mv_table, mv_event, "Track Event");
|
||||
mv_event->SetFlags(mv_event->GetFlags() | IVariable::UI_UNSORTED);
|
||||
AddVariable(mv_table, mv_value, "Value");
|
||||
}
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const
|
||||
bool SupportTrackType(const CAnimParamType& paramType, [[maybe_unused]] EAnimCurveType trackType, [[maybe_unused]] AnimValueType valueType) const override
|
||||
{
|
||||
return paramType == AnimParamType::TrackEvent;
|
||||
}
|
||||
virtual bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys);
|
||||
virtual void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys);
|
||||
bool OnKeySelectionChange(CTrackViewKeyBundle& selectedKeys) override;
|
||||
void OnUIChange(IVariable* pVar, CTrackViewKeyBundle& selectedKeys) override;
|
||||
|
||||
virtual unsigned int GetPriority() const { return 1; }
|
||||
unsigned int GetPriority() const override { return 1; }
|
||||
|
||||
static const GUID& GetClassID()
|
||||
{
|
||||
@@ -182,7 +182,7 @@ void CTrackEventKeyUIControls::BuildEventDropDown(QString& curEvent, const QStri
|
||||
{
|
||||
bool curEventExists = false;
|
||||
bool addedEventExists = false;
|
||||
mv_event.SetEnumList(NULL);
|
||||
mv_event.SetEnumList(nullptr);
|
||||
const int eventCount = sequence->GetTrackEventsCount();
|
||||
|
||||
// Need to check if event exists before adding all events
|
||||
|
||||
@@ -370,7 +370,7 @@ bool CTrackViewAnimNode::IsBoundToEditorObjects() const
|
||||
else
|
||||
{
|
||||
// check if bound to legacy entity
|
||||
return (m_animNode->GetNodeOwner() != NULL);
|
||||
return (m_animNode->GetNodeOwner() != nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1468,7 +1468,7 @@ bool CTrackViewAnimNode::PasteNodesFromClipboard(QWidget* context)
|
||||
}
|
||||
|
||||
XmlNodeRef animNodesRoot = clipboard.Get();
|
||||
if (animNodesRoot == NULL || strcmp(animNodesRoot->getTag(), "CopyAnimNodesRoot") != 0)
|
||||
if (animNodesRoot == nullptr || strcmp(animNodesRoot->getTag(), "CopyAnimNodesRoot") != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -130,10 +130,10 @@ const GUID& CTrackViewDialog::GetClassID()
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CTrackViewDialog* CTrackViewDialog::s_pTrackViewDialog = NULL;
|
||||
CTrackViewDialog* CTrackViewDialog::s_pTrackViewDialog = nullptr;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CTrackViewDialog::CTrackViewDialog(QWidget* pParent /*=NULL*/)
|
||||
CTrackViewDialog::CTrackViewDialog(QWidget* pParent /*=nullptr*/)
|
||||
: QMainWindow(pParent)
|
||||
{
|
||||
s_pTrackViewDialog = this;
|
||||
@@ -152,7 +152,7 @@ CTrackViewDialog::CTrackViewDialog(QWidget* pParent /*=NULL*/)
|
||||
m_lazyInitDone = false;
|
||||
m_bEditLock = false;
|
||||
|
||||
m_pNodeForTracksToolBar = NULL;
|
||||
m_pNodeForTracksToolBar = nullptr;
|
||||
|
||||
m_currentToolBarParamTypeId = 0;
|
||||
|
||||
@@ -181,7 +181,7 @@ CTrackViewDialog::~CTrackViewDialog()
|
||||
m_findDlg->deleteLater();
|
||||
m_findDlg = nullptr;
|
||||
}
|
||||
s_pTrackViewDialog = 0;
|
||||
s_pTrackViewDialog = nullptr;
|
||||
|
||||
const CTrackViewSequenceManager* pSequenceManager = GetIEditor()->GetSequenceManager();
|
||||
CTrackViewSequence* sequence = pSequenceManager->GetSequenceByEntityId(m_currentSequenceEntityId);
|
||||
@@ -210,7 +210,7 @@ void CTrackViewDialog::OnAddEntityNodeMenu()
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
BOOL CTrackViewDialog::OnInitDialog()
|
||||
bool CTrackViewDialog::OnInitDialog()
|
||||
{
|
||||
InitToolbar();
|
||||
InitMenu();
|
||||
@@ -270,7 +270,7 @@ BOOL CTrackViewDialog::OnInitDialog()
|
||||
QString cursorPosText = QString("0.000(%1fps)").arg(FloatToIntRet(m_wndCurveEditor->GetFPS()));
|
||||
m_cursorPos->setText(cursorPosText);
|
||||
|
||||
return TRUE; // return TRUE unless you set the focus to a control
|
||||
return true; // return true unless you set the focus to a control
|
||||
// EXCEPTION: OCX Property Pages should return FALSE
|
||||
}
|
||||
|
||||
@@ -621,7 +621,7 @@ void CTrackViewDialog::InitToolbar()
|
||||
{
|
||||
qaction2->setCheckable(true);
|
||||
}
|
||||
|
||||
|
||||
m_actions[ID_TV_SNAP_NONE]->setChecked(true);
|
||||
|
||||
m_tracksToolBar = addToolBar("Tracks Toolbar");
|
||||
@@ -883,7 +883,7 @@ void CTrackViewDialog::Update()
|
||||
// The active camera node means two conditions:
|
||||
// 1. Sequence camera is currently active.
|
||||
// 2. The camera which owns this node has been set as the current camera by the director node.
|
||||
bool bSequenceCamInUse = gEnv->pMovieSystem->GetCallback() == NULL ||
|
||||
bool bSequenceCamInUse = gEnv->pMovieSystem->GetCallback() == nullptr ||
|
||||
gEnv->pMovieSystem->GetCallback()->IsSequenceCamUsed();
|
||||
AZ::EntityId camId = gEnv->pMovieSystem->GetCameraParams().cameraEntityId;
|
||||
if (camId.IsValid() && bSequenceCamInUse)
|
||||
@@ -2049,7 +2049,7 @@ void CTrackViewDialog::ClearTracksToolBar()
|
||||
m_tracksToolBar->clear();
|
||||
m_tracksToolBar->addWidget(new QLabel("Tracks:"));
|
||||
|
||||
m_pNodeForTracksToolBar = NULL;
|
||||
m_pNodeForTracksToolBar = nullptr;
|
||||
m_toolBarParamTypes.clear();
|
||||
m_currentToolBarParamTypeId = 0;
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ class CTrackViewDialog
|
||||
public:
|
||||
friend CMovieCallback;
|
||||
|
||||
CTrackViewDialog(QWidget* pParent = NULL);
|
||||
CTrackViewDialog(QWidget* pParent = nullptr);
|
||||
~CTrackViewDialog();
|
||||
|
||||
static void RegisterViewClass();
|
||||
@@ -183,7 +183,7 @@ private:
|
||||
void OnAddEntityNodeMenu();
|
||||
|
||||
void OnEditorNotifyEvent(EEditorNotifyEvent event) override;
|
||||
BOOL OnInitDialog();
|
||||
bool OnInitDialog();
|
||||
|
||||
void SaveLayouts();
|
||||
void SaveMiscSettings() const;
|
||||
|
||||
@@ -88,7 +88,7 @@ CTrackViewDopeSheetBase::CTrackViewDopeSheetBase(QWidget* parent)
|
||||
m_currentTime = 0.0f;
|
||||
m_storedTime = m_currentTime;
|
||||
m_rcSelect = QRect(0, 0, 0, 0);
|
||||
m_rubberBand = 0;
|
||||
m_rubberBand = nullptr;
|
||||
m_scrollBar = new QScrollBar(Qt::Horizontal, this);
|
||||
connect(m_scrollBar, &QScrollBar::valueChanged, this, &CTrackViewDopeSheetBase::OnHScroll);
|
||||
m_keyTimeOffset = 0;
|
||||
@@ -113,7 +113,7 @@ CTrackViewDopeSheetBase::CTrackViewDopeSheetBase(QWidget* parent)
|
||||
|
||||
m_bFastRedraw = false;
|
||||
|
||||
m_pLastTrackSelectedOnSpot = NULL;
|
||||
m_pLastTrackSelectedOnSpot = nullptr;
|
||||
|
||||
m_wndPropsOnSpot = nullptr;
|
||||
|
||||
@@ -544,7 +544,7 @@ void CTrackViewDopeSheetBase::OnLButtonUp(Qt::KeyboardModifiers modifiers, const
|
||||
SelectKeys(m_rcSelect, modifiers & Qt::ControlModifier);
|
||||
m_rcSelect = QRect();
|
||||
m_rubberBand->deleteLater();
|
||||
m_rubberBand = 0;
|
||||
m_rubberBand = nullptr;
|
||||
}
|
||||
else if (m_mouseMode == eTVMouseMode_SelectWithinTime)
|
||||
{
|
||||
@@ -552,7 +552,7 @@ void CTrackViewDopeSheetBase::OnLButtonUp(Qt::KeyboardModifiers modifiers, const
|
||||
SelectAllKeysWithinTimeFrame(m_rcSelect, modifiers & Qt::ControlModifier);
|
||||
m_rcSelect = QRect();
|
||||
m_rubberBand->deleteLater();
|
||||
m_rubberBand = 0;
|
||||
m_rubberBand = nullptr;
|
||||
}
|
||||
else if (m_mouseMode == eTVMouseMode_DragTime)
|
||||
{
|
||||
@@ -744,7 +744,7 @@ void CTrackViewDopeSheetBase::OnRButtonDown(Qt::KeyboardModifiers modifiers, con
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pLastTrackSelectedOnSpot = NULL;
|
||||
m_pLastTrackSelectedOnSpot = nullptr;
|
||||
}
|
||||
|
||||
ShowKeyPropertyCtrlOnSpot(p.x(), p.y(), selectedKeys.GetKeyCount() > 1, bKeyChangeInSameTrack);
|
||||
@@ -783,7 +783,7 @@ void CTrackViewDopeSheetBase::OnRButtonUp([[maybe_unused]] Qt::KeyboardModifiers
|
||||
|
||||
if (!m_bCursorWasInKey)
|
||||
{
|
||||
const bool bHasCopiedKey = (GetKeysInClickboard() != NULL);
|
||||
const bool bHasCopiedKey = (GetKeysInClickboard() != nullptr);
|
||||
|
||||
if (bHasCopiedKey && m_bMouseMovedAfterRButtonDown == false) // Once moved, it means the user wanted to scroll, so no paste pop-up.
|
||||
{
|
||||
@@ -1230,24 +1230,24 @@ XmlNodeRef CTrackViewDopeSheetBase::GetKeysInClickboard()
|
||||
CClipboard clip(this);
|
||||
if (clip.IsEmpty())
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (clip.GetTitle() != "Track view keys")
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
XmlNodeRef copyNode = clip.Get();
|
||||
if (copyNode == NULL || strcmp(copyNode->getTag(), "CopyKeysNode"))
|
||||
if (copyNode == nullptr || strcmp(copyNode->getTag(), "CopyKeysNode"))
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
int nNumTracksToPaste = copyNode->getChildCount();
|
||||
if (nNumTracksToPaste == 0)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return copyNode;
|
||||
@@ -1789,7 +1789,7 @@ float CTrackViewDopeSheetBase::FrameSnap(float time) const
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewDopeSheetBase::ShowKeyPropertyCtrlOnSpot(int x, int y, [[maybe_unused]] bool bMultipleKeysSelected, bool bKeyChangeInSameTrack)
|
||||
{
|
||||
if (m_keyPropertiesDlg == NULL)
|
||||
if (m_keyPropertiesDlg == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -24,13 +24,13 @@ AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
// CTrackViewFindDlg dialog
|
||||
|
||||
|
||||
CTrackViewFindDlg::CTrackViewFindDlg(const char* title, QWidget* pParent /*=NULL*/)
|
||||
CTrackViewFindDlg::CTrackViewFindDlg(const char* title, QWidget* pParent /*=nullptr*/)
|
||||
: QDialog(pParent)
|
||||
, ui(new Ui::TrackViewFindDlg)
|
||||
{
|
||||
setWindowTitle(title);
|
||||
|
||||
m_tvDlg = 0;
|
||||
m_tvDlg = nullptr;
|
||||
m_numSeqs = 0;
|
||||
|
||||
ui->setupUi(this);
|
||||
|
||||
@@ -32,7 +32,7 @@ class CTrackViewFindDlg
|
||||
Q_OBJECT
|
||||
// Construction
|
||||
public:
|
||||
CTrackViewFindDlg(const char* title = NULL, QWidget* pParent = NULL); // standard constructor
|
||||
CTrackViewFindDlg(const char* title = nullptr, QWidget* pParent = nullptr); // standard constructor
|
||||
~CTrackViewFindDlg();
|
||||
|
||||
//Functions
|
||||
|
||||
@@ -328,8 +328,8 @@ bool CTrackViewTrackPropsDlg::OnKeySelectionChange(CTrackViewKeyBundle& selected
|
||||
}
|
||||
else
|
||||
{
|
||||
ui->PREVNEXT->setEnabled(FALSE);
|
||||
ui->TIME->setEnabled(FALSE);
|
||||
ui->PREVNEXT->setEnabled(false);
|
||||
ui->TIME->setEnabled(false);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ protected:
|
||||
// Helper functions.
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
template <class T>
|
||||
void SyncValue(CSmartVariable<T>& var, T& value, bool bCopyToUI, IVariable* pSrcVar = NULL)
|
||||
void SyncValue(CSmartVariable<T>& var, T& value, bool bCopyToUI, IVariable* pSrcVar = nullptr)
|
||||
{
|
||||
if (bCopyToUI)
|
||||
{
|
||||
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
: QStyledItemDelegate(parent)
|
||||
{}
|
||||
|
||||
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const
|
||||
void paint(QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index) const override
|
||||
{
|
||||
bool enabled = index.data(CTrackViewNodesCtrl::CRecord::EnableRole).toBool();
|
||||
QStyleOptionViewItem opt = option;
|
||||
@@ -106,7 +106,7 @@ protected:
|
||||
return Qt::CopyAction | Qt::MoveAction;
|
||||
}
|
||||
|
||||
void dragMoveEvent(QDragMoveEvent* event)
|
||||
void dragMoveEvent(QDragMoveEvent* event) override
|
||||
{
|
||||
CTrackViewNodesCtrl::CRecord* record = (CTrackViewNodesCtrl::CRecord*) itemAt(event->pos());
|
||||
if (!record)
|
||||
@@ -144,7 +144,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void dropEvent(QDropEvent* event)
|
||||
void dropEvent(QDropEvent* event) override
|
||||
{
|
||||
CTrackViewNodesCtrl::CRecord* record = (CTrackViewNodesCtrl::CRecord*) itemAt(event->pos());
|
||||
if (!record)
|
||||
@@ -200,7 +200,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
void keyPressEvent(QKeyEvent* event)
|
||||
void keyPressEvent(QKeyEvent* event) override
|
||||
{
|
||||
// HAVE TO INCLUDE CASES FOR THESE IN THE ShortcutOverride handler in ::event() below
|
||||
switch (event->key())
|
||||
@@ -242,7 +242,7 @@ protected:
|
||||
}
|
||||
|
||||
|
||||
bool focusNextPrevChild([[maybe_unused]] bool next)
|
||||
bool focusNextPrevChild([[maybe_unused]] bool next) override
|
||||
{
|
||||
return false; // so we get the tab key
|
||||
}
|
||||
@@ -361,7 +361,7 @@ CTrackViewNodesCtrl::CTrackViewNodesCtrl(QWidget* hParentWnd, CTrackViewDialog*
|
||||
, m_pTrackViewDialog(parent)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
m_pDopeSheet = 0;
|
||||
m_pDopeSheet = nullptr;
|
||||
m_currentMatchIndex = 0;
|
||||
m_matchCount = 0;
|
||||
|
||||
@@ -954,7 +954,7 @@ void CTrackViewNodesCtrl::OnSelectionChanged()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CTrackViewNodesCtrl::OnNMRclick(QPoint point)
|
||||
{
|
||||
CRecord* record = 0;
|
||||
CRecord* record = nullptr;
|
||||
bool isOnAzEntity = false;
|
||||
CTrackViewSequence* sequence = GetIEditor()->GetAnimation()->GetSequence();
|
||||
if (!sequence)
|
||||
@@ -1605,7 +1605,7 @@ CTrackViewTrack* CTrackViewNodesCtrl::GetTrackViewTrack(const Export::EntityAnim
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -56,10 +56,10 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
virtual int GetSize() { return sizeof(*this); }
|
||||
virtual QString GetDescription() { return "UndoTrackViewSplineCtrl"; };
|
||||
int GetSize() override { return sizeof(*this); }
|
||||
QString GetDescription() override { return "UndoTrackViewSplineCtrl"; };
|
||||
|
||||
virtual void Undo(bool bUndo)
|
||||
void Undo(bool bUndo) override
|
||||
{
|
||||
CTrackViewSplineCtrl* pCtrl = FindControl(m_pCtrl);
|
||||
if (pCtrl)
|
||||
@@ -103,7 +103,7 @@ protected:
|
||||
}
|
||||
}
|
||||
|
||||
virtual void Redo()
|
||||
void Redo() override
|
||||
{
|
||||
const CTrackViewSequenceManager* pSequenceManager = GetIEditor()->GetSequenceManager();
|
||||
CTrackViewSequence* sequence = pSequenceManager->GetSequenceByEntityId(m_sequenceEntityId);
|
||||
@@ -136,7 +136,7 @@ protected:
|
||||
sequence->OnKeySelectionChanged();
|
||||
}
|
||||
|
||||
virtual bool IsSelectionChanged() const
|
||||
bool IsSelectionChanged() const override
|
||||
{
|
||||
const CTrackViewSequenceManager* sequenceManager = GetIEditor()->GetSequenceManager();
|
||||
CTrackViewSequence* sequence = sequenceManager->GetSequenceByEntityId(m_sequenceEntityId);
|
||||
@@ -151,19 +151,19 @@ protected:
|
||||
}
|
||||
|
||||
public:
|
||||
typedef std::list<CTrackViewSplineCtrl*> CTrackViewSplineCtrls;
|
||||
using CTrackViewSplineCtrls = std::list<CTrackViewSplineCtrl*>;
|
||||
|
||||
static CTrackViewSplineCtrl* FindControl(CTrackViewSplineCtrl* pCtrl)
|
||||
{
|
||||
if (!pCtrl)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
auto iter = std::find(s_activeCtrls.begin(), s_activeCtrls.end(), pCtrl);
|
||||
if (iter == s_activeCtrls.end())
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return *iter;
|
||||
@@ -449,7 +449,7 @@ void CTrackViewSplineCtrl::AddSpline(ISplineInterpolator* pSpline, CTrackViewTra
|
||||
}
|
||||
|
||||
si.pSpline = pSpline;
|
||||
si.pDetailSpline = NULL;
|
||||
si.pDetailSpline = nullptr;
|
||||
m_splines.push_back(si);
|
||||
m_tracks.push_back(pTrack);
|
||||
m_bKeyTimesDirty = true;
|
||||
@@ -896,7 +896,7 @@ bool CTrackViewSplineCtrl::IsUnifiedKeyCurrentlySelected() const
|
||||
{
|
||||
ISplineInterpolator* pSpline = m_splines[splineIndex].pSpline;
|
||||
|
||||
if (pSpline == NULL)
|
||||
if (pSpline == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -960,7 +960,7 @@ void CTrackViewSplineCtrl::mouseReleaseEvent(QMouseEvent* event)
|
||||
if (GetIEditor()->GetAnimation()->GetSequence())
|
||||
{
|
||||
bool restoreRecordModeToTrue = (m_editMode == TimeMarkerMode && m_stashedRecordModeWhenDraggingTime);
|
||||
|
||||
|
||||
SplineWidget::mouseReleaseEvent(event);
|
||||
|
||||
if (restoreRecordModeToTrue)
|
||||
|
||||
@@ -59,7 +59,7 @@ void CUIEnumsDatabase::SetEnumStrings(const QString& enumName, const QStringList
|
||||
{
|
||||
int nStringCount = sStringsArray.size();
|
||||
|
||||
CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, 0);
|
||||
CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, nullptr);
|
||||
if (!pEnum)
|
||||
{
|
||||
pEnum = new CUIEnumsDatabase_SEnum;
|
||||
@@ -86,6 +86,6 @@ void CUIEnumsDatabase::SetEnumStrings(const QString& enumName, const QStringList
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CUIEnumsDatabase_SEnum* CUIEnumsDatabase::FindEnum(const QString& enumName) const
|
||||
{
|
||||
CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, 0);
|
||||
CUIEnumsDatabase_SEnum* pEnum = stl::find_in_map(m_enums, enumName, nullptr);
|
||||
return pEnum;
|
||||
}
|
||||
|
||||
+12
-12
@@ -34,7 +34,7 @@ public:
|
||||
{
|
||||
m_undoSteps.push_back(step);
|
||||
}
|
||||
virtual int GetSize() const
|
||||
int GetSize() const override
|
||||
{
|
||||
int size = 0;
|
||||
for (int i = 0; i < m_undoSteps.size(); i++)
|
||||
@@ -43,18 +43,18 @@ public:
|
||||
}
|
||||
return size;
|
||||
}
|
||||
virtual bool IsEmpty() const
|
||||
bool IsEmpty() const override
|
||||
{
|
||||
return m_undoSteps.empty();
|
||||
}
|
||||
virtual void Undo(bool bUndo)
|
||||
void Undo(bool bUndo) override
|
||||
{
|
||||
for (int i = m_undoSteps.size() - 1; i >= 0; i--)
|
||||
{
|
||||
m_undoSteps[i]->Undo(bUndo);
|
||||
}
|
||||
}
|
||||
virtual void Redo()
|
||||
void Redo() override
|
||||
{
|
||||
for (int i = 0; i < m_undoSteps.size(); i++)
|
||||
{
|
||||
@@ -113,8 +113,8 @@ CUndoManager::CUndoManager()
|
||||
m_bRecording = false;
|
||||
m_bSuperRecording = false;
|
||||
|
||||
m_currentUndo = 0;
|
||||
m_superUndo = 0;
|
||||
m_currentUndo = nullptr;
|
||||
m_superUndo = nullptr;
|
||||
m_assetManagerUndoInterruptor = new AssetManagerUndoInterruptor();
|
||||
|
||||
m_suspendCount = 0;
|
||||
@@ -270,7 +270,7 @@ void CUndoManager::Accept(const QString& name)
|
||||
}
|
||||
|
||||
m_bRecording = false;
|
||||
m_currentUndo = 0;
|
||||
m_currentUndo = nullptr;
|
||||
|
||||
SignalNumUndoRedoToListeners();
|
||||
|
||||
@@ -303,7 +303,7 @@ void CUndoManager::Cancel()
|
||||
}
|
||||
|
||||
delete m_currentUndo;
|
||||
m_currentUndo = 0;
|
||||
m_currentUndo = nullptr;
|
||||
//CLogFile::WriteLine( "<Undo> Cancel OK" );
|
||||
}
|
||||
|
||||
@@ -582,7 +582,7 @@ void CUndoManager::SuperAccept(const QString& name)
|
||||
|
||||
//CLogFile::FormatLine( "Undo Object Accepted (Undo:%d,Redo:%d)",m_undoStack.size(),m_redoStack.size() );
|
||||
m_bSuperRecording = false;
|
||||
m_superUndo = 0;
|
||||
m_superUndo = nullptr;
|
||||
//CLogFile::WriteLine( "<Undo> SupperAccept OK" );
|
||||
|
||||
SignalNumUndoRedoToListeners();
|
||||
@@ -616,7 +616,7 @@ void CUndoManager::SuperCancel()
|
||||
|
||||
m_bSuperRecording = false;
|
||||
delete m_superUndo;
|
||||
m_superUndo = 0;
|
||||
m_superUndo = nullptr;
|
||||
//CLogFile::WriteLine( "<Undo> SuperCancel OK" );
|
||||
}
|
||||
|
||||
@@ -708,8 +708,8 @@ void CUndoManager::Flush()
|
||||
|
||||
delete m_superUndo;
|
||||
delete m_currentUndo;
|
||||
m_superUndo = 0;
|
||||
m_currentUndo = 0;
|
||||
m_superUndo = nullptr;
|
||||
m_currentUndo = nullptr;
|
||||
|
||||
SignalUndoFlushedToListeners();
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
continue;
|
||||
}
|
||||
|
||||
if (m_undoObjects[i]->GetObjectName() == NULL)
|
||||
if (m_undoObjects[i]->GetObjectName() == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -209,7 +209,7 @@ public:
|
||||
|
||||
bool IsHaveUndo() const;
|
||||
bool IsHaveRedo() const;
|
||||
|
||||
|
||||
void SetMaxUndoStep(int steps);
|
||||
int GetMaxUndoStep() const;
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@ public:
|
||||
m_manager.AddListener(this);
|
||||
}
|
||||
|
||||
virtual ~UndoDropDownListModel()
|
||||
~UndoDropDownListModel() override
|
||||
{
|
||||
m_manager.RemoveListener(this);
|
||||
}
|
||||
@@ -81,7 +81,7 @@ public:
|
||||
return m_stackNames[index.row()];
|
||||
}
|
||||
|
||||
void SignalNumUndoRedo(const unsigned int& numUndo, const unsigned int& numRedo)
|
||||
void SignalNumUndoRedo(const unsigned int& numUndo, const unsigned int& numRedo) override
|
||||
{
|
||||
std::vector<QString> fresh;
|
||||
if (UndoRedoDirection::Undo == m_direction && m_stackNames.size() != numUndo)
|
||||
|
||||
@@ -34,12 +34,12 @@ bool C3DConnexionDriver::InitDevice()
|
||||
// Find the Raw Devices
|
||||
UINT nDevices;
|
||||
// Get Number of devices attached
|
||||
if (GetRawInputDeviceList(NULL, &nDevices, sizeof(RAWINPUTDEVICELIST)) != 0)
|
||||
if (GetRawInputDeviceList(nullptr, &nDevices, sizeof(RAWINPUTDEVICELIST)) != 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
// Create list large enough to hold all RAWINPUTDEVICE structs
|
||||
if ((m_pRawInputDeviceList = (PRAWINPUTDEVICELIST)malloc(sizeof(RAWINPUTDEVICELIST) * nDevices)) == NULL)
|
||||
if ((m_pRawInputDeviceList = (PRAWINPUTDEVICELIST)malloc(sizeof(RAWINPUTDEVICELIST) * nDevices)) == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -85,7 +85,7 @@ bool C3DConnexionDriver::InitDevice()
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsagePage = phidInfo->usUsagePage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].usUsage = phidInfo->usUsage;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].dwFlags = 0;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = NULL;
|
||||
m_pRawInputDevices[m_nUsagePage1Usage8Devices].hwndTarget = nullptr;
|
||||
m_nUsagePage1Usage8Devices++;
|
||||
}
|
||||
}
|
||||
@@ -126,8 +126,8 @@ bool C3DConnexionDriver::GetInputMessageData(LPARAM lParam, S3DConnexionMessage&
|
||||
{
|
||||
if (event->header.dwType == RIM_TYPEHID)
|
||||
{
|
||||
static BOOL bGotTranslation = FALSE,
|
||||
bGotRotation = FALSE;
|
||||
static bool bGotTranslation = false,
|
||||
bGotRotation = false;
|
||||
static int all6DOFs[6] = {0};
|
||||
LPRAWHID pRawHid = &event->data.hid;
|
||||
|
||||
|
||||
@@ -58,7 +58,7 @@ CDynamicArray2D::~CDynamicArray2D()
|
||||
}
|
||||
|
||||
delete [] m_Array;
|
||||
m_Array = 0;
|
||||
m_Array = nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ void HeapCheck::Check([[maybe_unused]] const char* file, [[maybe_unused]] int li
|
||||
{
|
||||
CString str;
|
||||
str.Format( "Bad Start of Heap, at file %s line:%d",file,line );
|
||||
MessageBox( NULL,str,"Heap Check",MB_OK );
|
||||
MessageBox( nullptr,str,"Heap Check",MB_OK );
|
||||
}
|
||||
break;
|
||||
case _HEAPBADNODE:
|
||||
{
|
||||
CString str;
|
||||
str.Format( "Bad Node in Heap, at file %s line:%d",file,line );
|
||||
MessageBox( NULL,str,"Heap Check",MB_OK );
|
||||
MessageBox( nullptr,str,"Heap Check",MB_OK );
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -258,7 +258,7 @@ namespace EditorUtils
|
||||
AzWarningAbsorber::AzWarningAbsorber(const char* window)
|
||||
: m_window(window)
|
||||
AZ_POP_DISABLE_WARNING
|
||||
{
|
||||
{
|
||||
BusConnect();
|
||||
}
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ inline QString TokenizeString(const QString& s, LPCSTR pszTokens, int& iStart)
|
||||
|
||||
QByteArray str = s.toUtf8();
|
||||
|
||||
if (pszTokens == NULL)
|
||||
if (pszTokens == nullptr)
|
||||
{
|
||||
return str;
|
||||
}
|
||||
@@ -472,7 +472,7 @@ inline const char* strstri(const char* pString, const char* pSubstring)
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
@@ -542,7 +542,7 @@ public:
|
||||
// There is a bug in QT with writing files larger than 32MB. It separates
|
||||
// the write into 32MB blocks, but doesn't write the last block correctly.
|
||||
// To deal with this, we'll separate into blocks here so QT doesn't have to.
|
||||
|
||||
|
||||
// QT bug in qfileengine_win.cpp line 434. Block size is calculated once and always
|
||||
// used as the amount of data to write, but for the last block, unless there is exactly
|
||||
// block size left to write, the actual remaining amount needs to be written, not the
|
||||
@@ -658,14 +658,14 @@ inline CArchive& operator>>(CArchive& ar, QString& str)
|
||||
str = QString::fromUtf16(reinterpret_cast<ushort*>(raw), aznumeric_cast<int>(length));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return ar;
|
||||
}
|
||||
|
||||
inline CArchive& operator<<(CArchive& ar, const QString& str)
|
||||
{
|
||||
// This is written to mimic how MFC archiving worked, which was to
|
||||
// write markers to indicate the size of the length -
|
||||
// write markers to indicate the size of the length -
|
||||
// so a length that will fit into 8 bits takes 8 bits.
|
||||
// A length that requires more than 8 bits, puts an 8 bit marker (0xff)
|
||||
// to indicate that the length is greater, then 16 bits for the length.
|
||||
@@ -693,7 +693,7 @@ inline CArchive& operator<<(CArchive& ar, const QString& str)
|
||||
ar << static_cast<quint16>(0xffff);
|
||||
ar << static_cast<quint32>(length);
|
||||
}
|
||||
|
||||
|
||||
ar.device()->write(data);
|
||||
|
||||
return ar;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <QTimer>
|
||||
|
||||
|
||||
CFileChangeMonitor* CFileChangeMonitor::s_pFileMonitorInstance = NULL;
|
||||
CFileChangeMonitor* CFileChangeMonitor::s_pFileMonitorInstance = nullptr;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CFileChangeMonitor::CFileChangeMonitor(QObject* parent)
|
||||
@@ -34,7 +34,7 @@ CFileChangeMonitor::~CFileChangeMonitor()
|
||||
|
||||
if (pListener)
|
||||
{
|
||||
pListener->SetMonitor(NULL);
|
||||
pListener->SetMonitor(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ void CFileChangeMonitor::Unsubscribe(CFileChangeMonitorListener* pListener)
|
||||
{
|
||||
assert(pListener);
|
||||
m_listeners.erase(pListener);
|
||||
pListener->SetMonitor(NULL);
|
||||
pListener->SetMonitor(nullptr);
|
||||
}
|
||||
|
||||
void CFileChangeMonitor::OnDirectoryChange(const QString &path)
|
||||
|
||||
@@ -111,7 +111,7 @@ class CFileChangeMonitorListener
|
||||
{
|
||||
public:
|
||||
CFileChangeMonitorListener()
|
||||
: m_pMonitor(NULL)
|
||||
: m_pMonitor(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
#include "FileEnum.h"
|
||||
|
||||
CFileEnum::CFileEnum()
|
||||
: m_hEnumFile(0)
|
||||
: m_hEnumFile(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ CFileEnum::~CFileEnum()
|
||||
if (m_hEnumFile)
|
||||
{
|
||||
delete m_hEnumFile;
|
||||
m_hEnumFile = 0;
|
||||
m_hEnumFile = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -53,7 +53,7 @@ bool CFileEnum::StartEnumeration(const QString& szEnumPathAndPattern, QFileInfo*
|
||||
if (m_hEnumFile)
|
||||
{
|
||||
delete m_hEnumFile;
|
||||
m_hEnumFile = 0;
|
||||
m_hEnumFile = nullptr;
|
||||
}
|
||||
|
||||
QStringList parts = szEnumPathAndPattern.split(QRegularExpression(R"([\\/])"));
|
||||
@@ -66,7 +66,7 @@ bool CFileEnum::StartEnumeration(const QString& szEnumPathAndPattern, QFileInfo*
|
||||
{
|
||||
// No files found
|
||||
delete m_hEnumFile;
|
||||
m_hEnumFile = 0;
|
||||
m_hEnumFile = nullptr;
|
||||
|
||||
return false;
|
||||
}
|
||||
@@ -84,7 +84,7 @@ bool CFileEnum::GetNextFile(QFileInfo* pFile)
|
||||
{
|
||||
// No more files left
|
||||
delete m_hEnumFile;
|
||||
m_hEnumFile = 0;
|
||||
m_hEnumFile = nullptr;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -279,7 +279,7 @@ void CFileUtil::EditTextureFile(const char* textureFile, [[maybe_unused]] bool b
|
||||
// Qt does.
|
||||
QString fullTexturePathFixedForWindows = QString(fullTexturePath.data()).replace('/', '\\');
|
||||
QByteArray fullTexturePathFixedForWindowsUtf8 = fullTexturePathFixedForWindows.toUtf8();
|
||||
HINSTANCE hInst = ShellExecute(NULL, "open", textureEditorPath.data(), fullTexturePathFixedForWindowsUtf8.data(), NULL, SW_SHOWNORMAL);
|
||||
HINSTANCE hInst = ShellExecute(nullptr, "open", textureEditorPath.data(), fullTexturePathFixedForWindowsUtf8.data(), nullptr, SW_SHOWNORMAL);
|
||||
failedToLaunch = ((DWORD_PTR)hInst <= 32);
|
||||
#elif defined(AZ_PLATFORM_MAC)
|
||||
failedToLaunch = QProcess::execute(QString("/usr/bin/open"), {"-a", gSettings.textureEditor, QString(fullTexturePath.data()) }) != 0;
|
||||
@@ -332,7 +332,7 @@ bool CFileUtil::EditMayaFile(const char* filepath, const bool bExtractFromPak, c
|
||||
CryMessageBox("Can't open the file. You can specify a source editor in Sandbox Preferences or create an association in Windows.", "Cannot open file!", MB_OK | MB_ICONERROR);
|
||||
}
|
||||
}
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -348,10 +348,10 @@ bool CFileUtil::EditFile(const char* filePath, const bool bExtrackFromPak, const
|
||||
else if ((extension.compare(".bspace") == 0) || (extension.compare(".comb") == 0))
|
||||
{
|
||||
EditTextFile(filePath, 0, IFileUtil::FILE_TYPE_BSPACE);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -374,7 +374,7 @@ bool CFileUtil::CalculateDccFilename(const QString& assetFilename, QString& dccF
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CFileUtil::ExtractDccFilenameFromAssetDatabase(const QString& assetFilename, QString& dccFilename)
|
||||
{
|
||||
IAssetItemDatabase* pCurrentDatabaseInterface = NULL;
|
||||
IAssetItemDatabase* pCurrentDatabaseInterface = nullptr;
|
||||
std::vector<IClassDesc*> assetDatabasePlugins;
|
||||
IEditorClassFactory* pClassFactory = GetIEditor()->GetClassFactory();
|
||||
pClassFactory->GetClassesByCategory("Asset Item DB", assetDatabasePlugins);
|
||||
@@ -592,7 +592,7 @@ inline bool ScanDirectoryFiles(const QString& root, const QString& path, const Q
|
||||
|
||||
/*
|
||||
CFileFind finder;
|
||||
BOOL bWorking = finder.FindFile( Path::Make(dir,fileSpec) );
|
||||
bool bWorking = finder.FindFile( Path::Make(dir,fileSpec) );
|
||||
while (bWorking)
|
||||
{
|
||||
bWorking = finder.FindNextFile();
|
||||
@@ -663,7 +663,7 @@ inline int ScanDirectoryRecursive(const QString& root, const QString& path, cons
|
||||
{
|
||||
/*
|
||||
CFileFind finder;
|
||||
BOOL bWorking = finder.FindFile( Path::Make(dir,"*.*") );
|
||||
bool bWorking = finder.FindFile( Path::Make(dir,"*.*") );
|
||||
while (bWorking)
|
||||
{
|
||||
bWorking = finder.FindNextFile();
|
||||
@@ -847,12 +847,12 @@ void BlockAndWait(const bool& opComplete, QWidget* parent, const char* message)
|
||||
{
|
||||
// note that 16ms below is not the amount of time to wait, its the maximum time that
|
||||
// processEvents is allowed to keep processing them if they just keep being emitted.
|
||||
// adding a maximum time here means that we get an opportunity to pump the TickBus
|
||||
// adding a maximum time here means that we get an opportunity to pump the TickBus
|
||||
// periodically even during a flood of events.
|
||||
QCoreApplication::processEvents(QEventLoop::ExcludeUserInputEvents, 16);
|
||||
AZ::TickBus::ExecuteQueuedEvents();
|
||||
}
|
||||
|
||||
|
||||
// if we are not the main thread then the above will be done by the main thread, and we can just wait for it to happen.
|
||||
// its fairly important we don't sleep for really long because this legacy code is often invoked in a blocking loop
|
||||
// for many items, and in the worst case, any time we spend sleeping here will be added to each item.
|
||||
@@ -1206,10 +1206,10 @@ bool CFileUtil::CreatePath(const QString& strPath)
|
||||
QString strFilename;
|
||||
QString strExtension;
|
||||
QString strCurrentDirectoryPath;
|
||||
QStringList cstrDirectoryQueue;
|
||||
QStringList cstrDirectoryQueue;
|
||||
size_t nCurrentPathQueue(0);
|
||||
size_t nTotalPathQueueElements(0);
|
||||
BOOL bnLastDirectoryWasCreated(FALSE);
|
||||
bool bnLastDirectoryWasCreated(false);
|
||||
|
||||
if (PathExists(strPath))
|
||||
{
|
||||
@@ -1361,7 +1361,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
nTotal = cFiles.size();
|
||||
for (nCurrent = 0; nCurrent < nTotal; ++nCurrent)
|
||||
{
|
||||
BOOL bnLastFileWasCopied(FALSE);
|
||||
bool bnLastFileWasCopied(false);
|
||||
|
||||
|
||||
if (eCopyResult == IFileUtil::ETREECOPYUSERCANCELED)
|
||||
@@ -1447,7 +1447,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyTree(const QString& strSourceDirectory
|
||||
return eCopyResult;
|
||||
}
|
||||
|
||||
BOOL bnLastDirectoryWasCreated(FALSE);
|
||||
bool bnLastDirectoryWasCreated(false);
|
||||
|
||||
QString sourceName = sourceDir.absoluteFilePath(cDirectories[nCurrent]);
|
||||
QString targetName = targetDir.absoluteFilePath(cDirectories[nCurrent]);
|
||||
@@ -1529,7 +1529,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyFile(const QString& strSourceFile, c
|
||||
CUserOptions oFileOptions;
|
||||
IFileUtil::ECopyTreeResult eCopyResult(IFileUtil::ETREECOPYOK);
|
||||
|
||||
BOOL bnLastFileWasCopied(FALSE);
|
||||
bool bnLastFileWasCopied(false);
|
||||
QString name(strSourceFile);
|
||||
QString strQueryFilename;
|
||||
QString strFullStargetName;
|
||||
@@ -1658,7 +1658,7 @@ IFileUtil::ECopyTreeResult CFileUtil::CopyFile(const QString& strSourceFile, c
|
||||
}
|
||||
if (pfnProgress)
|
||||
{
|
||||
pfnProgress(source.size(), totalRead, 0, 0, 0, 0, 0, 0, 0);
|
||||
pfnProgress(source.size(), totalRead, 0, 0, 0, 0, nullptr, nullptr, nullptr);
|
||||
}
|
||||
}
|
||||
if (totalRead != source.size())
|
||||
@@ -1742,7 +1742,7 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
return eCopyResult;
|
||||
}
|
||||
|
||||
BOOL bnLastFileWasCopied(FALSE);
|
||||
bool bnLastFileWasCopied(false);
|
||||
QString sourceName(sourceDir.absoluteFilePath(cFiles[nCurrent]));
|
||||
QString targetName(targetDir.absoluteFilePath(cFiles[nCurrent]));
|
||||
|
||||
@@ -1816,7 +1816,7 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
nTotal = cDirectories.size();
|
||||
for (nCurrent = 0; nCurrent < nTotal; ++nCurrent)
|
||||
{
|
||||
BOOL bnLastDirectoryWasCreated(FALSE);
|
||||
bool bnLastDirectoryWasCreated(false);
|
||||
|
||||
if (eCopyResult == IFileUtil::ETREECOPYUSERCANCELED)
|
||||
{
|
||||
@@ -1900,76 +1900,25 @@ IFileUtil::ECopyTreeResult CFileUtil::MoveTree(const QString& strSourceDirecto
|
||||
return eCopyResult;
|
||||
}
|
||||
|
||||
QString CFileUtil::PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent)
|
||||
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath)
|
||||
{
|
||||
QStringList extraItemsFront;
|
||||
return PopupQMenu(filename, fullGamePath, parent, nullptr, extraItemsFront);
|
||||
PopulateQMenu(caller, menu, fullGamePath, nullptr);
|
||||
}
|
||||
|
||||
QString CFileUtil::PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent, [[maybe_unused]] bool* pIsSelected, const QStringList& extraItemsFront)
|
||||
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath, bool* isSelected)
|
||||
{
|
||||
QStringList extraItemsBack;
|
||||
return PopupQMenu(filename, fullGamePath, parent, nullptr, extraItemsFront, extraItemsBack);
|
||||
}
|
||||
// Normalize the full path so we get consistent separators
|
||||
AZStd::string fullFilePath(fullGamePath);
|
||||
AzFramework::StringFunc::Path::Normalize(fullFilePath);
|
||||
|
||||
QString CFileUtil::PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent, bool* pIsSelected, const QStringList& extraItemsFront, const QStringList& extraItemsBack)
|
||||
{
|
||||
QMenu menu;
|
||||
|
||||
foreach(QString text, extraItemsFront)
|
||||
{
|
||||
if (!text.isEmpty())
|
||||
{
|
||||
menu.addAction(text);
|
||||
}
|
||||
}
|
||||
if (extraItemsFront.count())
|
||||
{
|
||||
menu.addSeparator();
|
||||
}
|
||||
|
||||
PopulateQMenu(parent, &menu, filename, fullGamePath, pIsSelected);
|
||||
if (extraItemsBack.count())
|
||||
{
|
||||
menu.addSeparator();
|
||||
}
|
||||
foreach(QString text, extraItemsBack)
|
||||
{
|
||||
if (!text.isEmpty())
|
||||
{
|
||||
menu.addAction(text);
|
||||
}
|
||||
}
|
||||
|
||||
QAction* result = menu.exec(QCursor::pos());
|
||||
return result ? result->text() : QString();
|
||||
}
|
||||
|
||||
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, const QString& filename, const QString& fullGamePath)
|
||||
{
|
||||
PopulateQMenu(caller, menu, filename, fullGamePath, nullptr);
|
||||
}
|
||||
|
||||
void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, const QString& filename, const QString& fullGamePath, bool* isSelected)
|
||||
{
|
||||
QString fullPath;
|
||||
QString fullPath(fullFilePath.c_str());
|
||||
QFileInfo fileInfo(fullPath);
|
||||
|
||||
if (isSelected)
|
||||
{
|
||||
*isSelected = false;
|
||||
}
|
||||
|
||||
if (!filename.isEmpty())
|
||||
{
|
||||
QString path = Path::MakeGamePath(fullGamePath);
|
||||
path = Path::AddSlash(path) + filename;
|
||||
fullPath = Path::GamePathToFullPath(path);
|
||||
}
|
||||
else
|
||||
{
|
||||
fullPath = fullGamePath;
|
||||
}
|
||||
|
||||
uint32 nFileAttr = CFileUtil::GetAttributes(fullPath.toUtf8().data());
|
||||
|
||||
QAction* action;
|
||||
@@ -2005,21 +1954,13 @@ void CFileUtil::PopulateQMenu(QWidget* caller, QMenu* menu, const QString& filen
|
||||
|
||||
action = menu->addAction(QObject::tr("Copy Name To Clipboard"), [=]()
|
||||
{
|
||||
if (filename.isEmpty())
|
||||
{
|
||||
QFileInfo fi(fullGamePath);
|
||||
QString file = fi.completeBaseName();
|
||||
QApplication::clipboard()->setText(file);
|
||||
}
|
||||
else
|
||||
{
|
||||
QApplication::clipboard()->setText(filename);
|
||||
}
|
||||
QString fileName = fileInfo.completeBaseName();
|
||||
QApplication::clipboard()->setText(fileName);
|
||||
});
|
||||
|
||||
action = menu->addAction(QObject::tr("Copy Path To Clipboard"), [fullPath]() { QApplication::clipboard()->setText(fullPath); });
|
||||
|
||||
if (!filename.isEmpty() && GetIEditor()->IsSourceControlAvailable() && nFileAttr != SCC_FILE_ATTRIBUTE_INVALID)
|
||||
if (fileInfo.isFile() && GetIEditor()->IsSourceControlAvailable() && nFileAttr != SCC_FILE_ATTRIBUTE_INVALID)
|
||||
{
|
||||
bool isEnableSC = nFileAttr & SCC_FILE_ATTRIBUTE_MANAGED;
|
||||
bool isInPak = nFileAttr & SCC_FILE_ATTRIBUTE_INPAK;
|
||||
|
||||
@@ -123,7 +123,7 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// @param LPPROGRESS_ROUTINE pfnProgress - called by the system to notify of file copy progress
|
||||
// @param LPBOOL pbCancel - when the contents of this BOOL are set to TRUE, the system cancels the copy operation
|
||||
// @param LPBOOL pbCancel - when the contents of this BOOL are set to true, the system cancels the copy operation
|
||||
static IFileUtil::ECopyTreeResult CopyFile(const QString& strSourceFile, const QString& strTargetFile, bool boConfirmOverwrite = false, ProgressRoutine pfnProgress = nullptr, bool* pbCancel = nullptr);
|
||||
|
||||
|
||||
@@ -134,18 +134,7 @@ public:
|
||||
// THIS FUNCTION IS NOT DESIGNED FOR MULTI-THREADED USAGE
|
||||
static IFileUtil::ECopyTreeResult MoveTree(const QString& strSourceDirectory, const QString& strTargetDirectory, bool boRecurse = true, bool boConfirmOverwrite = false);
|
||||
|
||||
// Show Popup Menu with file commands include Source Control commands
|
||||
// filename: a name of file without path
|
||||
// fullGamePath: a game path to folder like "/Game/Objects" without filename
|
||||
// wnd: pointer to window class, can be nullptr
|
||||
// isSelected: output value indicated if Select menu item was chosen, if pointer is 0 - no Select menu item.
|
||||
// pItems: you can specify additional menu items and get the result of selection using this parameter.
|
||||
// return false if source control operation failed
|
||||
static QString PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent);
|
||||
static QString PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent, bool* pIsSelected, const QStringList& extraItemsFront);
|
||||
static QString PopupQMenu(const QString& filename, const QString& fullGamePath, QWidget* parent, bool* pIsSelected, const QStringList& extraItemsFront, const QStringList& extraItemsBack);
|
||||
|
||||
static void PopulateQMenu(QWidget* caller, QMenu* menu, const QString& filename, const QString& fullGamePath);
|
||||
static void PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath);
|
||||
|
||||
static void GatherAssetFilenamesFromLevel(std::set<QString>& rOutFilenames, bool bMakeLowerCase = false, bool bMakeUnixPath = false);
|
||||
|
||||
@@ -172,7 +161,7 @@ private:
|
||||
static bool s_multiFileDlgPref[IFileUtil::EFILE_TYPE_LAST];
|
||||
|
||||
// Keep this variant of this method private! pIsSelected is captured in a lambda, and so requires menu use exec() and never use show()
|
||||
static void PopulateQMenu(QWidget* caller, QMenu* menu, const QString& filename, const QString& fullGamePath, bool* pIsSelected);
|
||||
static void PopulateQMenu(QWidget* caller, QMenu* menu, AZStd::string_view fullGamePath, bool* pIsSelected);
|
||||
|
||||
static bool ExtractDccFilenameFromAssetDatabase(const QString& assetFilename, QString& dccFilename);
|
||||
static bool ExtractDccFilenameUsingNamingConventions(const QString& assetFilename, QString& dccFilename);
|
||||
|
||||
@@ -110,8 +110,8 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// @param LPPROGRESS_ROUTINE pfnProgress - called by the system to notify of file copy progress
|
||||
// @param LPBOOL pbCancel - when the contents of this BOOL are set to TRUE, the system cancels the copy operation
|
||||
ECopyTreeResult CopyFile(const QString& strSourceFile, const QString& strTargetFile, bool boConfirmOverwrite = false, ProgressRoutine pfnProgress = NULL, bool* pbCancel = NULL) override;
|
||||
// @param LPBOOL pbCancel - when the contents of this BOOL are set to true, the system cancels the copy operation
|
||||
ECopyTreeResult CopyFile(const QString& strSourceFile, const QString& strTargetFile, bool boConfirmOverwrite = false, ProgressRoutine pfnProgress = nullptr, bool* pbCancel = nullptr) override;
|
||||
|
||||
// As we don't have a FileUtil interface here, we have to duplicate some code :-( in order to keep
|
||||
// function calls clean.
|
||||
|
||||
@@ -35,7 +35,7 @@ public:
|
||||
~CAlphaBitmap();
|
||||
|
||||
//! creates the bitmap from raw 32bpp data
|
||||
//! \param pData the 32bpp raw image data, RGBA, can be NULL and it would create just an empty bitmap
|
||||
//! \param pData the 32bpp raw image data, RGBA, can be nullptr and it would create just an empty bitmap
|
||||
//! \param aWidth the bitmap width
|
||||
//! \param aHeight the bitmap height
|
||||
bool Create(void* pData, UINT aWidth, UINT aHeight, bool bVerticalFlip = false, bool bPremultiplyAlpha = false);
|
||||
|
||||
@@ -37,7 +37,7 @@ struct IXmlHistoryEventListener
|
||||
eHET_HistoryGroupAdded,
|
||||
eHET_HistoryGroupRemoved,
|
||||
};
|
||||
virtual void OnEvent(EHistoryEventType event, void* pData = NULL) = 0;
|
||||
virtual void OnEvent(EHistoryEventType event, void* pData = nullptr) = 0;
|
||||
};
|
||||
|
||||
struct IXmlHistoryView
|
||||
|
||||
@@ -105,34 +105,34 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image)
|
||||
|
||||
// ncols = grid width
|
||||
validData = validData && (azstricmp(token, "ncols") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
width = atoi(token);
|
||||
|
||||
// nrows = grid height
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
validData = validData && (azstricmp(token, "nrows") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
height = atoi(token);
|
||||
|
||||
// xllcorner = leftmost coordinate. (Skip, we don't care about it)
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
validData = validData && (azstricmp(token, "xllcorner") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
|
||||
// yllcorner = bottommost coordinate. (Skip, we don't care about it)
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
validData = validData && (azstricmp(token, "yllcorner") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
|
||||
// cellsize = size of each grid cell. (Skip, we don't care about it)
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
validData = validData && (azstricmp(token, "cellsize") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
|
||||
// nodata_value = the value used for missing data. We'll replace these with 0 height.
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
validData = validData && (azstricmp(token, "nodata_value") == 0);
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
nodataValue = atof(token);
|
||||
|
||||
if (!validData)
|
||||
@@ -152,10 +152,10 @@ bool CImageASC::Load(const QString& fileName, CFloatImage& image)
|
||||
int i = 0;
|
||||
float pixelValue;
|
||||
float maxPixel = 0.0f;
|
||||
while (token != NULL && i < size)
|
||||
while (token != nullptr && i < size)
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL)
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr)
|
||||
{
|
||||
// Negative heights aren't supported, clamp to 0.
|
||||
pixelValue = max(0.0, atof(token));
|
||||
|
||||
@@ -223,7 +223,7 @@ bool CImageGif::Load(const QString& fileName, CImageEx& outImage)
|
||||
Pass = 0;
|
||||
OutCount = 0;
|
||||
|
||||
Palette = NULL;
|
||||
Palette = nullptr;
|
||||
CHK (Raster = new uint8 [filesize]);
|
||||
|
||||
if (strncmp((char*) ptr, id87, 6))
|
||||
|
||||
@@ -142,7 +142,7 @@ bool CImageTIF::Load(const QString& fileName, CImageEx& outImage)
|
||||
uint32 dwWidth, dwHeight;
|
||||
size_t npixels;
|
||||
uint32* raster;
|
||||
char* dccfilename = NULL;
|
||||
char* dccfilename = nullptr;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEWIDTH, &dwWidth);
|
||||
TIFFGetField(tif, TIFFTAG_IMAGELENGTH, &dwHeight);
|
||||
@@ -232,7 +232,7 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage)
|
||||
{
|
||||
uint32 width = 0, height = 0;
|
||||
uint16 spp = 0, bpp = 0, format = 0;
|
||||
char* dccfilename = NULL;
|
||||
char* dccfilename = nullptr;
|
||||
|
||||
TIFFGetField(tif, TIFFTAG_IMAGEDESCRIPTION, &dccfilename);
|
||||
|
||||
@@ -252,11 +252,11 @@ bool CImageTIF::Load(const QString& fileName, CFloatImage& outImage)
|
||||
|
||||
// Check to see if it's a GeoTIFF, and if so, whether or not it has the ZScale parameter.
|
||||
uint32 tagCount = 0;
|
||||
double *pixelScales = NULL;
|
||||
double *pixelScales = nullptr;
|
||||
if (TIFFGetField(tif, GEOTIFF_MODELPIXELSCALE_TAG, &tagCount, &pixelScales) == 1)
|
||||
{
|
||||
// if there's an xyz scale, and the Z scale isn't 0, let's use it.
|
||||
if ((tagCount == 3) && (pixelScales != NULL) && (pixelScales[2] != 0.0f))
|
||||
if ((tagCount == 3) && (pixelScales != nullptr) && (pixelScales[2] != 0.0f))
|
||||
{
|
||||
pixelValueScale = static_cast<float>(pixelScales[2]);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ const char* CImageTIF::GetPreset(const QString& fileName)
|
||||
if (!file.Open(fileName.toUtf8().data(), "rb"))
|
||||
{
|
||||
CLogFile::FormatLine("File not found %s", fileName.toUtf8().data());
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
MemImage memImage;
|
||||
@@ -473,7 +473,7 @@ const char* CImageTIF::GetPreset(const QString& fileName)
|
||||
libtiffDummyCloseProc, libtiffDummySizeProc, libtiffDummyMapFileProc, libtiffDummyUnmapFileProc);
|
||||
|
||||
string strReturn;
|
||||
char* preset = NULL;
|
||||
char* preset = nullptr;
|
||||
int size;
|
||||
if (tif)
|
||||
{
|
||||
|
||||
@@ -149,13 +149,13 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
while (token != NULL && token[0] == '#')
|
||||
while (token != nullptr && token[0] == '#')
|
||||
{
|
||||
if (token != NULL && token[0] == '#')
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
}
|
||||
if (azstricmp(token, "P2") != 0)
|
||||
{
|
||||
@@ -167,32 +167,32 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
width = atoi(token);
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
height = atoi(token);
|
||||
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
if (token != NULL && token[0] == '#')
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
if (token != nullptr && token[0] == '#')
|
||||
{
|
||||
azstrtok(NULL, 0, "\n", &nextToken);
|
||||
azstrtok(nullptr, 0, "\n", &nextToken);
|
||||
}
|
||||
} while (token != NULL && token[0] == '#');
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
numColors = atoi(token);
|
||||
|
||||
image.Allocate(width, height);
|
||||
@@ -200,12 +200,12 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
uint32* p = image.GetData();
|
||||
int size = width * height;
|
||||
int i = 0;
|
||||
while (token != NULL && i < size)
|
||||
while (token != nullptr && i < size)
|
||||
{
|
||||
do
|
||||
{
|
||||
token = azstrtok(NULL, 0, seps, &nextToken);
|
||||
} while (token != NULL && token[0] == '#');
|
||||
token = azstrtok(nullptr, 0, seps, &nextToken);
|
||||
} while (token != nullptr && token[0] == '#');
|
||||
*p++ = atoi(token);
|
||||
i++;
|
||||
}
|
||||
|
||||
@@ -1,202 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : Tagged files database for 'SmartFileOpen' dialog
|
||||
|
||||
#include "EditorDefs.h"
|
||||
|
||||
#include "IndexedFiles.h"
|
||||
|
||||
volatile TIntAtomic CIndexedFiles::s_bIndexingDone;
|
||||
CIndexedFiles* CIndexedFiles::s_pIndexedFiles = NULL;
|
||||
|
||||
bool CIndexedFiles::m_startedFileIndexing = false;
|
||||
|
||||
void CIndexedFiles::Initialize(const QString& path, IFileUtil::ScanDirectoryUpdateCallBack updateCB)
|
||||
{
|
||||
m_files.clear();
|
||||
m_pathToIndex.clear();
|
||||
m_tags.clear();
|
||||
m_rootPath = path;
|
||||
|
||||
bool anyFiles = CFileUtil::ScanDirectory(path, "*.*", m_files, true, true, updateCB);
|
||||
|
||||
if (anyFiles == false)
|
||||
{
|
||||
m_files.clear();
|
||||
return;
|
||||
}
|
||||
|
||||
if (updateCB)
|
||||
{
|
||||
updateCB("Parsing & tagging...");
|
||||
}
|
||||
|
||||
for (int i = 0; i < m_files.size(); ++i)
|
||||
{
|
||||
m_pathToIndex[m_files[i].filename] = i;
|
||||
}
|
||||
|
||||
PrepareTagTable();
|
||||
|
||||
InvokeUpdateCallbacks();
|
||||
}
|
||||
|
||||
void CIndexedFiles::AddFile(const IFileUtil::FileDesc& path)
|
||||
{
|
||||
assert(m_pathToIndex.find(path.filename) == m_pathToIndex.end());
|
||||
m_files.push_back(path);
|
||||
m_pathToIndex[path.filename] = m_files.size() - 1;
|
||||
QStringList tags;
|
||||
GetTags(tags, path.filename);
|
||||
for (int k = 0; k < tags.size(); ++k)
|
||||
{
|
||||
m_tags[tags[k]].insert(m_files.size() - 1);
|
||||
}
|
||||
}
|
||||
|
||||
void CIndexedFiles::RemoveFile(const QString& path)
|
||||
{
|
||||
if (m_pathToIndex.find(path) == m_pathToIndex.end())
|
||||
{
|
||||
return;
|
||||
}
|
||||
std::map<QString, int>::iterator itr = m_pathToIndex.find(path);
|
||||
int index = itr->second;
|
||||
m_pathToIndex.erase(itr);
|
||||
m_files.erase(m_files.begin() + index);
|
||||
QStringList tags;
|
||||
GetTags(tags, path);
|
||||
for (int k = 0; k < tags.size(); ++k)
|
||||
{
|
||||
m_tags[tags[k]].erase(index);
|
||||
}
|
||||
}
|
||||
|
||||
void CIndexedFiles::Refresh(const QString& path, bool recursive)
|
||||
{
|
||||
IFileUtil::FileArray files;
|
||||
bool anyFiles = CFileUtil::ScanDirectory(m_rootPath, Path::Make(path, "*.*"), files, recursive, recursive ? true : false);
|
||||
|
||||
if (anyFiles == false)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
for (int i = 0; i < files.size(); ++i)
|
||||
{
|
||||
if (m_pathToIndex.find(files[i].filename) == m_pathToIndex.end())
|
||||
{
|
||||
AddFile(files[i]);
|
||||
}
|
||||
}
|
||||
|
||||
InvokeUpdateCallbacks();
|
||||
}
|
||||
|
||||
void CIndexedFiles::GetFilesWithTags(IFileUtil::FileArray& files, const QStringList& tags) const
|
||||
{
|
||||
files.clear();
|
||||
if (tags.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
int_set candidates;
|
||||
TagTable::const_iterator i;
|
||||
// Gets candidate files from the first tag.
|
||||
for (i = m_tags.begin(); i != m_tags.end(); ++i)
|
||||
{
|
||||
if (i->first.startsWith(tags[0]))
|
||||
{
|
||||
candidates.insert(i->second.begin(), i->second.end());
|
||||
}
|
||||
}
|
||||
// Reduces the candidates further using additional tags, if any.
|
||||
for (int k = 1; k < tags.size(); ++k)
|
||||
{
|
||||
// Gathers the filter set.
|
||||
int_set filter;
|
||||
for (i = m_tags.begin(); i != m_tags.end(); ++i)
|
||||
{
|
||||
if (i->first.startsWith(tags[k]))
|
||||
{
|
||||
filter.insert(i->second.begin(), i->second.end());
|
||||
}
|
||||
}
|
||||
|
||||
// Filters the candidates using it.
|
||||
for (int_set::iterator m = candidates.begin(); m != candidates.end(); )
|
||||
{
|
||||
if (filter.find(*m) == filter.end())
|
||||
{
|
||||
int_set::iterator target = m;
|
||||
++m;
|
||||
candidates.erase(target);
|
||||
}
|
||||
else
|
||||
{
|
||||
++m;
|
||||
}
|
||||
}
|
||||
}
|
||||
// Outputs the result.
|
||||
files.reserve(candidates.size());
|
||||
for (int_set::const_iterator m = candidates.begin(); m != candidates.end(); ++m)
|
||||
{
|
||||
files.push_back(m_files[*m]);
|
||||
}
|
||||
}
|
||||
|
||||
void CIndexedFiles::GetTags(QStringList& tags, const QString& path) const
|
||||
{
|
||||
tags = path.split(QRegularExpression(QStringLiteral(R"([\\/.])")), Qt::SkipEmptyParts);
|
||||
}
|
||||
|
||||
void CIndexedFiles::GetTagsOfPrefix(QStringList& tags, const QString& prefix) const
|
||||
{
|
||||
tags.clear();
|
||||
TagTable::const_iterator i;
|
||||
for (i = m_tags.begin(); i != m_tags.end(); ++i)
|
||||
{
|
||||
if (i->first.startsWith(prefix))
|
||||
{
|
||||
tags.push_back(i->first);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CIndexedFiles::PrepareTagTable()
|
||||
{
|
||||
QStringList tags;
|
||||
for (int i = 0; i < m_files.size(); ++i)
|
||||
{
|
||||
GetTags(tags, m_files[i].filename);
|
||||
for (int k = 0; k < tags.size(); ++k)
|
||||
{
|
||||
m_tags[tags[k]].insert(i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void CIndexedFiles::AddUpdateCallback(std::function<void()> updateCallback)
|
||||
{
|
||||
CryAutoLock<CryMutex> lock(m_updateCallbackMutex);
|
||||
|
||||
m_updateCallbacks.push_back(updateCallback);
|
||||
}
|
||||
|
||||
void CIndexedFiles::InvokeUpdateCallbacks()
|
||||
{
|
||||
CryAutoLock<CryMutex> lock(m_updateCallbackMutex);
|
||||
|
||||
for (auto updateCallback : m_updateCallbacks)
|
||||
{
|
||||
updateCallback();
|
||||
}
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) Contributors to the Open 3D Engine Project.
|
||||
* For complete copyright and license terms please see the LICENSE at the root of this distribution.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0 OR MIT
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
// Description : Tagged files database for 'SmartFileOpen' dialog
|
||||
//
|
||||
// Notice : Refer SmartFileOpenDialog h
|
||||
|
||||
|
||||
#ifndef CRYINCLUDE_EDITOR_UTIL_INDEXEDFILES_H
|
||||
#define CRYINCLUDE_EDITOR_UTIL_INDEXEDFILES_H
|
||||
#pragma once
|
||||
|
||||
|
||||
#include "FileUtil.h"
|
||||
#include <functional>
|
||||
|
||||
class CIndexedFiles
|
||||
{
|
||||
friend class CFileIndexingThread;
|
||||
public:
|
||||
static CIndexedFiles& GetDB()
|
||||
{
|
||||
if (!s_pIndexedFiles)
|
||||
{
|
||||
assert(!"CIndexedFiles not created! Make sure you use CIndexedFiles::GetDB() after CIndexedFiles::StartFileIndexing() is called.");
|
||||
}
|
||||
assert(s_pIndexedFiles);
|
||||
return *s_pIndexedFiles;
|
||||
}
|
||||
|
||||
static bool HasFileIndexingDone()
|
||||
{ return s_bIndexingDone > 0; }
|
||||
|
||||
static void Create()
|
||||
{
|
||||
assert(!s_pIndexedFiles);
|
||||
s_pIndexedFiles = new CIndexedFiles;
|
||||
}
|
||||
|
||||
static void Destroy()
|
||||
{
|
||||
SAFE_DELETE(s_pIndexedFiles);
|
||||
}
|
||||
|
||||
static void StartFileIndexing()
|
||||
{
|
||||
assert(s_bIndexingDone == 0);
|
||||
assert(s_pIndexedFiles);
|
||||
|
||||
if (!s_pIndexedFiles)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
GetFileIndexingThread().Start(-1, "FileIndexing");
|
||||
m_startedFileIndexing = true;
|
||||
}
|
||||
|
||||
static void AbortFileIndexing()
|
||||
{
|
||||
if (!m_startedFileIndexing)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (HasFileIndexingDone() == false)
|
||||
{
|
||||
GetFileIndexingThread().Abort();
|
||||
}
|
||||
m_startedFileIndexing = false;
|
||||
}
|
||||
|
||||
static void RegisterCallback(std::function<void()> callback)
|
||||
{
|
||||
assert(s_pIndexedFiles);
|
||||
if (!s_pIndexedFiles)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
s_pIndexedFiles->AddUpdateCallback(callback);
|
||||
}
|
||||
|
||||
public:
|
||||
void Initialize(const QString& path, IFileUtil::ScanDirectoryUpdateCallBack updateCB = NULL);
|
||||
|
||||
// Adds a new file to the database.
|
||||
void AddFile(const IFileUtil::FileDesc& path);
|
||||
// Removes a no-longer-existing file from the database.
|
||||
void RemoveFile(const QString& path);
|
||||
// Refreshes this database for the subdirectory.
|
||||
void Refresh(const QString& path, bool recursive = true);
|
||||
|
||||
void GetFilesWithTags(IFileUtil::FileArray& files, const QStringList& tags) const;
|
||||
|
||||
//! This method returns all the tags which start with a given prefix.
|
||||
//! It is useful for the tag auto-completion.
|
||||
void GetTagsOfPrefix(QStringList& tags, const QString& prefix) const;
|
||||
|
||||
uint32 GetTotalCount() const
|
||||
{ return (uint32)m_files.size(); }
|
||||
|
||||
private:
|
||||
static bool m_startedFileIndexing;
|
||||
|
||||
std::vector <std::function<void()> > m_updateCallbacks;
|
||||
IFileUtil::FileArray m_files;
|
||||
std::map<QString, int> m_pathToIndex;
|
||||
typedef std::set<int, std::less<int> > int_set;
|
||||
typedef std::map<QString, int_set, std::less<QString> > TagTable;
|
||||
TagTable m_tags;
|
||||
QString m_rootPath;
|
||||
|
||||
void GetTags(QStringList& tags, const QString& path) const;
|
||||
void PrepareTagTable();
|
||||
|
||||
CryMutex m_updateCallbackMutex;
|
||||
|
||||
void AddUpdateCallback(std::function<void()> updateCallback);
|
||||
void InvokeUpdateCallbacks();
|
||||
|
||||
// A done flag for the background file indexing
|
||||
static volatile TIntAtomic s_bIndexingDone;
|
||||
// A thread for the background file indexing
|
||||
class CFileIndexingThread
|
||||
: public CryThread<CFileIndexingThread>
|
||||
{
|
||||
public:
|
||||
virtual void Run()
|
||||
{
|
||||
CIndexedFiles::GetDB().Initialize("@assets@", CallBack);
|
||||
CryInterlockedAdd(CIndexedFiles::s_bIndexingDone.Addr(), 1);
|
||||
}
|
||||
|
||||
CFileIndexingThread()
|
||||
: m_abort(false) {}
|
||||
|
||||
void Abort()
|
||||
{
|
||||
m_abort = true;
|
||||
WaitForThread();
|
||||
}
|
||||
|
||||
virtual ~CFileIndexingThread()
|
||||
{
|
||||
Abort();
|
||||
}
|
||||
private:
|
||||
bool m_abort;
|
||||
static bool CallBack([[maybe_unused]] const QString& msg)
|
||||
{
|
||||
if (CIndexedFiles::GetFileIndexingThread().m_abort)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
static CFileIndexingThread& GetFileIndexingThread()
|
||||
{
|
||||
static CFileIndexingThread s_fileIndexingThread;
|
||||
|
||||
return s_fileIndexingThread;
|
||||
}
|
||||
|
||||
// A global database for tagged files
|
||||
static CIndexedFiles* s_pIndexedFiles;
|
||||
};
|
||||
#endif // CRYINCLUDE_EDITOR_UTIL_INDEXEDFILES_H
|
||||
+12
-12
@@ -17,9 +17,9 @@ class KDTreeNode
|
||||
public:
|
||||
KDTreeNode()
|
||||
{
|
||||
pChildren[0] = NULL;
|
||||
pChildren[1] = NULL;
|
||||
pVertexIndices = NULL;
|
||||
pChildren[0] = nullptr;
|
||||
pChildren[1] = nullptr;
|
||||
pVertexIndices = nullptr;
|
||||
}
|
||||
~KDTreeNode()
|
||||
{
|
||||
@@ -76,13 +76,13 @@ public:
|
||||
}
|
||||
bool IsLeaf() const
|
||||
{
|
||||
return pChildren[0] == NULL && pChildren[1] == NULL;
|
||||
return pChildren[0] == nullptr && pChildren[1] == nullptr;
|
||||
}
|
||||
KDTreeNode* GetChild(uint32 nIndex) const
|
||||
{
|
||||
if (nIndex > 1)
|
||||
{
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
return pChildren[nIndex];
|
||||
}
|
||||
@@ -200,7 +200,7 @@ bool SearchForBestSplitPos(CKDTree::ESplitAxis axis, const std::vector<CKDTree::
|
||||
const CKDTree::SStatObj* pObj = &statObjList[nObjIndex];
|
||||
|
||||
const IIndexedMesh* pMesh = pObj->pStatObj->GetIndexedMesh();
|
||||
if (pMesh == NULL)
|
||||
if (pMesh == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -256,7 +256,7 @@ bool SplitNode(const std::vector<CKDTree::SStatObj>& statObjList, const AABB& bo
|
||||
const CKDTree::SStatObj* pObj = &statObjList[nObjIndex];
|
||||
|
||||
const IIndexedMesh* pMesh = pObj->pStatObj->GetIndexedMesh();
|
||||
if (pMesh == NULL)
|
||||
if (pMesh == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -295,7 +295,7 @@ bool SplitNode(const std::vector<CKDTree::SStatObj>& statObjList, const AABB& bo
|
||||
|
||||
CKDTree::CKDTree()
|
||||
{
|
||||
m_pRootNode = NULL;
|
||||
m_pRootNode = nullptr;
|
||||
}
|
||||
|
||||
CKDTree::~CKDTree()
|
||||
@@ -308,7 +308,7 @@ CKDTree::~CKDTree()
|
||||
|
||||
bool CKDTree::Build(IStatObj* pStatObj)
|
||||
{
|
||||
if (pStatObj == NULL)
|
||||
if (pStatObj == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -332,7 +332,7 @@ bool CKDTree::Build(IStatObj* pStatObj)
|
||||
for (int i = 0, iStatObjSize(m_StatObjectList.size()); i < iStatObjSize; ++i)
|
||||
{
|
||||
IIndexedMesh* pMesh = m_StatObjectList[i].pStatObj->GetIndexedMesh(true);
|
||||
if (pMesh == NULL)
|
||||
if (pMesh == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
@@ -398,7 +398,7 @@ void CKDTree::BuildRecursively(KDTreeNode* pNode, const AABB& boundbox, std::vec
|
||||
|
||||
void CKDTree::ConstructStatObjList(IStatObj* pStatObj, const Matrix34& matParent)
|
||||
{
|
||||
if (pStatObj == NULL)
|
||||
if (pStatObj == nullptr)
|
||||
{
|
||||
return;
|
||||
}
|
||||
@@ -472,7 +472,7 @@ bool CKDTree::FindNearestVertexRecursively(KDTreeNode* pNode, const Vec3& raySrc
|
||||
const SStatObj* pStatObjInfo = &(m_StatObjectList[nObjIndex]);
|
||||
|
||||
IIndexedMesh* pMesh = m_StatObjectList[nObjIndex].pStatObj->GetIndexedMesh();
|
||||
if (pMesh == NULL)
|
||||
if (pMesh == nullptr)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
@@ -128,7 +128,7 @@ inline float PointToLineDistance(const Vec3& p1, const Vec3& p2, const Vec3& p3,
|
||||
@param p2 Target point of first line.
|
||||
@param p3 Source point of second line.
|
||||
@param p4 Target point of second line.
|
||||
@return FALSE if no solution exists.
|
||||
@return false if no solution exists.
|
||||
*/
|
||||
inline bool LineLineIntersect(const Vec3& p1, const Vec3& p2, const Vec3& p3, const Vec3& p4,
|
||||
Vec3& pa, Vec3& pb, float& mua, float& mub)
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CMemoryBlock::CMemoryBlock()
|
||||
: m_buffer(0)
|
||||
: m_buffer(nullptr)
|
||||
, m_size(0)
|
||||
, m_uncompressedSize(0)
|
||||
, m_owns(false)
|
||||
@@ -54,7 +54,7 @@ CMemoryBlock& CMemoryBlock::operator=(const CMemoryBlock& mem)
|
||||
}
|
||||
else
|
||||
{
|
||||
m_buffer = 0;
|
||||
m_buffer = nullptr;
|
||||
m_size = 0;
|
||||
m_owns = false;
|
||||
}
|
||||
@@ -104,7 +104,7 @@ bool CMemoryBlock::Allocate(int size, int uncompressedSize)
|
||||
m_size = size;
|
||||
m_uncompressedSize = uncompressedSize;
|
||||
// Check if allocation failed.
|
||||
if (m_buffer == 0)
|
||||
if (m_buffer == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -118,7 +118,7 @@ void CMemoryBlock::Free()
|
||||
{
|
||||
free(m_buffer);
|
||||
}
|
||||
m_buffer = 0;
|
||||
m_buffer = nullptr;
|
||||
m_owns = false;
|
||||
m_size = 0;
|
||||
m_uncompressedSize = 0;
|
||||
|
||||
@@ -36,7 +36,7 @@ void CNamedData::AddDataBlock(const QString& blockName, void* pData, int nSize
|
||||
assert(pData);
|
||||
assert(nSize > 0);
|
||||
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)0);
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)nullptr);
|
||||
if (pBlock)
|
||||
{
|
||||
delete pBlock;
|
||||
@@ -66,7 +66,7 @@ void CNamedData::AddDataBlock(const QString& blockName, void* pData, int nSize
|
||||
|
||||
void CNamedData::AddDataBlock(const QString& blockName, CMemoryBlock& mem)
|
||||
{
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)0);
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)nullptr);
|
||||
if (pBlock)
|
||||
{
|
||||
delete pBlock;
|
||||
@@ -102,7 +102,7 @@ void CNamedData::Clear()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
bool CNamedData::GetDataBlock(const QString& blockName, void*& pData, int& nSize)
|
||||
{
|
||||
pData = 0;
|
||||
pData = nullptr;
|
||||
nSize = 0;
|
||||
|
||||
bool bUncompressed = false;
|
||||
@@ -119,10 +119,10 @@ bool CNamedData::GetDataBlock(const QString& blockName, void*& pData, int& nSize
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CMemoryBlock* CNamedData::GetDataBlock(const QString& blockName, bool& bCompressed)
|
||||
{
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)0);
|
||||
DataBlock* pBlock = stl::find_in_map(m_blocks, blockName, (DataBlock*)nullptr);
|
||||
if (!pBlock)
|
||||
{
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if (bCompressed)
|
||||
@@ -150,7 +150,7 @@ CMemoryBlock* CNamedData::GetDataBlock(const QString& blockName, bool& bCompress
|
||||
}
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
@@ -21,14 +21,14 @@
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CPakFile::CPakFile()
|
||||
: m_pArchive(NULL)
|
||||
, m_pCryPak(NULL)
|
||||
: m_pArchive(nullptr)
|
||||
, m_pCryPak(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CPakFile::CPakFile(AZ::IO::IArchive* pCryPak)
|
||||
: m_pArchive(NULL)
|
||||
: m_pArchive(nullptr)
|
||||
, m_pCryPak(pCryPak)
|
||||
{
|
||||
}
|
||||
@@ -42,14 +42,14 @@ CPakFile::~CPakFile()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CPakFile::CPakFile(const char* filename)
|
||||
{
|
||||
m_pArchive = NULL;
|
||||
m_pArchive = nullptr;
|
||||
Open(filename);
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CPakFile::Close()
|
||||
{
|
||||
m_pArchive = NULL;
|
||||
m_pArchive = nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -61,7 +61,7 @@ bool CPakFile::Open(const char* filename, bool bAbsolutePath)
|
||||
}
|
||||
|
||||
auto pCryPak = m_pCryPak ? m_pCryPak : GetIEditor()->GetSystem()->GetIPak();
|
||||
if (pCryPak == NULL)
|
||||
if (pCryPak == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -89,7 +89,7 @@ bool CPakFile::OpenForRead(const char* filename)
|
||||
Close();
|
||||
}
|
||||
auto pCryPak = m_pCryPak ? m_pCryPak : GetIEditor()->GetSystem()->GetIPak();
|
||||
if (pCryPak == NULL)
|
||||
if (pCryPak == nullptr)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -42,7 +42,7 @@ namespace Path
|
||||
// Directory named filenames containing ":" are invalid, so we can assume if there is a :
|
||||
// it will be the drive name.
|
||||
pchCurrentPosition = strchr(pchLastPosition, ':');
|
||||
if (pchCurrentPosition == NULL)
|
||||
if (pchCurrentPosition == nullptr)
|
||||
{
|
||||
rstrDriveLetter = "";
|
||||
}
|
||||
@@ -54,7 +54,7 @@ namespace Path
|
||||
|
||||
pchCurrentPosition = strrchr(pchLastPosition, '\\');
|
||||
pchAuxPosition = strrchr(pchLastPosition, '/');
|
||||
if ((pchCurrentPosition == NULL) && (pchAuxPosition == NULL))
|
||||
if ((pchCurrentPosition == nullptr) && (pchAuxPosition == nullptr))
|
||||
{
|
||||
rstrDirectory = "";
|
||||
}
|
||||
@@ -70,7 +70,7 @@ namespace Path
|
||||
}
|
||||
|
||||
pchCurrentPosition = strrchr(pchLastPosition, '.');
|
||||
if (pchCurrentPosition == NULL)
|
||||
if (pchCurrentPosition == nullptr)
|
||||
{
|
||||
rstrExtension = "";
|
||||
strFilename.assign(pchLastPosition);
|
||||
@@ -114,7 +114,7 @@ namespace Path
|
||||
do
|
||||
{
|
||||
pchCurrentPosition = strpbrk(pchLastPosition, "\\/");
|
||||
if (pchCurrentPosition == NULL)
|
||||
if (pchCurrentPosition == nullptr)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -228,7 +228,7 @@ namespace Path
|
||||
{
|
||||
return (path.endsWith(QStringLiteral("\\")) || path.endsWith(QStringLiteral("/")));
|
||||
}
|
||||
|
||||
|
||||
template<size_t size>
|
||||
inline bool EndsWithSlash(CryStackStringT<char, size>* path)
|
||||
{
|
||||
@@ -236,15 +236,15 @@ namespace Path
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
if (
|
||||
((*path)[path->size() - 1] != '\\') ||
|
||||
((*path)[path->size() - 1] != '/')
|
||||
((*path)[path->size() - 1] != '/')
|
||||
)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -336,9 +336,9 @@ namespace Path
|
||||
{
|
||||
char path_buffer[_MAX_PATH];
|
||||
#ifdef AZ_COMPILER_MSVC
|
||||
_makepath_s(path_buffer, AZ_ARRAY_SIZE(path_buffer), NULL, dir.toUtf8().data(), filename.toUtf8().data(), ext.toUtf8().data());
|
||||
_makepath_s(path_buffer, AZ_ARRAY_SIZE(path_buffer), nullptr, dir.toUtf8().data(), filename.toUtf8().data(), ext.toUtf8().data());
|
||||
#else
|
||||
_makepath(path_buffer, NULL, dir.toUtf8().data(), filename.toUtf8().data(), ext.toUtf8().data());
|
||||
_makepath(path_buffer, nullptr, dir.toUtf8().data(), filename.toUtf8().data(), ext.toUtf8().data());
|
||||
#endif
|
||||
return CaselessPaths(path_buffer);
|
||||
}
|
||||
|
||||
@@ -48,7 +48,7 @@ static inline int Vscprintf(const char* format, va_list argList)
|
||||
int retval;
|
||||
va_list argcopy;
|
||||
va_copy(argcopy, argList);
|
||||
retval = azvsnprintf(NULL, 0, format, argcopy);
|
||||
retval = azvsnprintf(nullptr, 0, format, argcopy);
|
||||
va_end(argcopy);
|
||||
return retval;
|
||||
#else
|
||||
@@ -64,7 +64,7 @@ static inline int Vscprintf(const wchar_t* format, va_list argList)
|
||||
int retval;
|
||||
va_list argcopy;
|
||||
va_copy(argcopy, argList);
|
||||
retval = azvsnwprintf(NULL, 0, format, argcopy);
|
||||
retval = azvsnwprintf(nullptr, 0, format, argcopy);
|
||||
va_end(argcopy);
|
||||
return retval;
|
||||
#else
|
||||
@@ -408,9 +408,9 @@ bool StringHelpers::MatchesWildcardsIgnoreCase(const wstring& str, const wstring
|
||||
template <class TS>
|
||||
static inline bool MatchesWildcardsIgnoreCaseExt_Tpl(const TS& str, const TS& wildcards, std::vector<TS>& wildcardMatches)
|
||||
{
|
||||
const typename TS::value_type* savedStrBegin = 0;
|
||||
const typename TS::value_type* savedStrEnd = 0;
|
||||
const typename TS::value_type* savedWild = 0;
|
||||
const typename TS::value_type* savedStrBegin = nullptr;
|
||||
const typename TS::value_type* savedStrEnd = nullptr;
|
||||
const typename TS::value_type* savedWild = nullptr;
|
||||
size_t savedWildCount = 0;
|
||||
|
||||
const typename TS::value_type* pStr = str.c_str();
|
||||
@@ -775,7 +775,7 @@ void StringHelpers::SplitByAnyOf(const wstring& str, const wstring& separators,
|
||||
template <class TS>
|
||||
static inline TS FormatVA_Tpl(const typename TS::value_type* const format, va_list parg)
|
||||
{
|
||||
if ((format == 0) || (format[0] == 0))
|
||||
if ((format == nullptr) || (format[0] == 0))
|
||||
{
|
||||
return TS();
|
||||
}
|
||||
@@ -935,8 +935,8 @@ static string ConvertUtf16ToMultibyte(const wchar_t* wstr, uint codePage, char b
|
||||
len,
|
||||
0,
|
||||
0,
|
||||
((badChar && codePage != CP_UTF8) ? &badChar : NULL),
|
||||
NULL);
|
||||
((badChar && codePage != CP_UTF8) ? &badChar : nullptr),
|
||||
nullptr);
|
||||
if (neededByteCount <= 0)
|
||||
{
|
||||
return string();
|
||||
@@ -952,8 +952,8 @@ static string ConvertUtf16ToMultibyte(const wchar_t* wstr, uint codePage, char b
|
||||
len,
|
||||
&buffer[0], // output buffer
|
||||
neededByteCount - 1, // size of the output buffer in bytes
|
||||
((badChar && codePage != CP_UTF8) ? &badChar : NULL),
|
||||
NULL);
|
||||
((badChar && codePage != CP_UTF8) ? &badChar : nullptr),
|
||||
nullptr);
|
||||
if (byteCount != neededByteCount - 1)
|
||||
{
|
||||
return string();
|
||||
|
||||
@@ -55,15 +55,15 @@ CUIEnumerations::TDValuesContainer& CUIEnumerations::GetStandardNameContainer()
|
||||
{
|
||||
oEnumerationItem = oEnumaration->getChild(nCurrentEnumarationItem);
|
||||
|
||||
const char* szKey(NULL);
|
||||
const char* szValue(NULL);
|
||||
const char* szKey(nullptr);
|
||||
const char* szValue(nullptr);
|
||||
oEnumerationItem->getAttributeByIndex(0, &szKey, &szValue);
|
||||
|
||||
cValues.push_back(szValue);
|
||||
}
|
||||
|
||||
const char* szKey(NULL);
|
||||
const char* szValue(NULL);
|
||||
const char* szKey(nullptr);
|
||||
const char* szValue(nullptr);
|
||||
oEnumaration->getAttributeByIndex(0, &szKey, &szValue);
|
||||
|
||||
cValuesContainer.insert(TDValuesContainer::value_type(szValue, cValues));
|
||||
|
||||
@@ -447,7 +447,7 @@ void CVarObject::AddVariable(CVariableArray& table, CVariableBase& var, const QS
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CVarObject::RemoveVariable(IVariable* var)
|
||||
{
|
||||
if (m_vars != NULL)
|
||||
if (m_vars != nullptr)
|
||||
{
|
||||
m_vars->DeleteVariable(var);
|
||||
}
|
||||
@@ -455,7 +455,7 @@ void CVarObject::RemoveVariable(IVariable* var)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CVarObject::EnableUpdateCallbacks(bool boEnable)
|
||||
{
|
||||
if (m_vars != NULL)
|
||||
if (m_vars != nullptr)
|
||||
{
|
||||
m_vars->EnableUpdateCallbacks(boEnable);
|
||||
}
|
||||
@@ -463,7 +463,7 @@ void CVarObject::EnableUpdateCallbacks(bool boEnable)
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CVarObject::OnSetValues()
|
||||
{
|
||||
if (m_vars != NULL)
|
||||
if (m_vars != nullptr)
|
||||
{
|
||||
m_vars->OnSetValues();
|
||||
}
|
||||
@@ -471,7 +471,7 @@ void CVarObject::OnSetValues()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void CVarObject::ReserveNumVariables(int numVars)
|
||||
{
|
||||
if (m_vars != NULL)
|
||||
if (m_vars != nullptr)
|
||||
{
|
||||
m_vars->ReserveNumVariables(numVars);
|
||||
}
|
||||
@@ -482,7 +482,7 @@ void CVarObject::CopyVariableValues(CVarObject* sourceObject)
|
||||
{
|
||||
// Check if compatible types.
|
||||
assert(metaObject() == sourceObject->metaObject());
|
||||
if (m_vars != NULL && sourceObject->m_vars != NULL)
|
||||
if (m_vars != nullptr && sourceObject->m_vars != nullptr)
|
||||
{
|
||||
m_vars->CopyValues(sourceObject->m_vars);
|
||||
}
|
||||
|
||||
@@ -1411,7 +1411,7 @@ protected:
|
||||
struct IVarEnumList
|
||||
: public CRefCountBase
|
||||
{
|
||||
//! Get the name of specified value in enumeration, or NULL if out of range.
|
||||
//! Get the name of specified value in enumeration, or empty string if out of range.
|
||||
virtual QString GetItemName(uint index) = 0;
|
||||
};
|
||||
typedef _smart_ptr<IVarEnumList> IVarEnumListPtr;
|
||||
@@ -1498,7 +1498,7 @@ public:
|
||||
{
|
||||
if (index >= m_items.size())
|
||||
{
|
||||
return NULL;
|
||||
return QString();
|
||||
}
|
||||
return m_items[index].name;
|
||||
};
|
||||
@@ -1869,9 +1869,9 @@ public:
|
||||
void Serialize(XmlNodeRef node, bool load);
|
||||
CVarBlock* GetVarBlock() const { return m_vars; };
|
||||
|
||||
void AddVariable(CVariableBase& var, const QString& varName, VarOnSetCallback* cb = NULL, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void AddVariable(CVariableBase& var, const QString& varName, const QString& varHumanName, VarOnSetCallback* cb = NULL, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void AddVariable(CVariableArray& table, CVariableBase& var, const QString& varName, const QString& varHumanName, VarOnSetCallback* cb = NULL, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void AddVariable(CVariableBase& var, const QString& varName, VarOnSetCallback* cb = nullptr, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void AddVariable(CVariableBase& var, const QString& varName, const QString& varHumanName, VarOnSetCallback* cb = nullptr, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void AddVariable(CVariableArray& table, CVariableBase& var, const QString& varName, const QString& varHumanName, VarOnSetCallback* cb = nullptr, unsigned char dataType = IVariable::DT_SIMPLE);
|
||||
void ReserveNumVariables(int numVars);
|
||||
void RemoveVariable(IVariable* var);
|
||||
|
||||
|
||||
@@ -71,28 +71,28 @@ namespace Prop
|
||||
Description::Description()
|
||||
: m_type(ePropertyInvalid)
|
||||
, m_numImages(-1)
|
||||
, m_enumList(NULL)
|
||||
, m_enumList(nullptr)
|
||||
, m_rangeMin(0)
|
||||
, m_rangeMax(100)
|
||||
, m_step(0)
|
||||
, m_bHardMin(false)
|
||||
, m_bHardMax(false)
|
||||
, m_valueMultiplier(1)
|
||||
, m_pEnumDBItem(NULL)
|
||||
, m_pEnumDBItem(nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
Description::Description(IVariable* pVar)
|
||||
: m_type(ePropertyInvalid)
|
||||
, m_numImages(-1)
|
||||
, m_enumList(NULL)
|
||||
, m_enumList(nullptr)
|
||||
, m_rangeMin(0)
|
||||
, m_rangeMax(100)
|
||||
, m_step(0)
|
||||
, m_bHardMin(false)
|
||||
, m_bHardMax(false)
|
||||
, m_valueMultiplier(1)
|
||||
, m_pEnumDBItem(NULL)
|
||||
, m_pEnumDBItem(nullptr)
|
||||
{
|
||||
if (!pVar)
|
||||
{
|
||||
@@ -110,7 +110,7 @@ namespace Prop
|
||||
m_name = pVar->GetHumanName();
|
||||
m_enumList = pVar->GetEnumList();
|
||||
|
||||
if (m_enumList != NULL)
|
||||
if (m_enumList != nullptr)
|
||||
{
|
||||
m_type = ePropertySelection;
|
||||
}
|
||||
@@ -325,7 +325,7 @@ namespace Prop
|
||||
case ePropertyAudioPreloadRequest:
|
||||
return "AudioPreloadRequest";
|
||||
default:
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ const XmlNodeRef& SXmlHistory::GetCurrentVersion(bool* bVersionExist, int* iVers
|
||||
bool SXmlHistory::IsModified() const
|
||||
{
|
||||
int currVersion;
|
||||
GetCurrentVersion(NULL, &currVersion);
|
||||
GetCurrentVersion(nullptr, &currVersion);
|
||||
return m_SavedVersion != currVersion;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ void SXmlHistory::FlagAsSaved()
|
||||
if (Exist())
|
||||
{
|
||||
int currVersion;
|
||||
GetCurrentVersion(NULL, &currVersion);
|
||||
GetCurrentVersion(nullptr, &currVersion);
|
||||
m_SavedVersion = currVersion;
|
||||
}
|
||||
}
|
||||
@@ -167,7 +167,7 @@ SXmlHistory* SXmlHistoryGroup::GetHistory(int index) const
|
||||
--index;
|
||||
}
|
||||
}
|
||||
return it != m_List.end() ? *it : NULL;
|
||||
return it != m_List.end() ? *it : nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -199,7 +199,7 @@ SXmlHistory* SXmlHistoryGroup::GetHistoryByTypeId(uint32 typeId, int index /*= 0
|
||||
return pHistory;
|
||||
}
|
||||
}
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////
|
||||
@@ -246,9 +246,9 @@ int SXmlHistoryGroup::GetHistoryIndex(const SXmlHistory* pHistory) const
|
||||
CXmlHistoryManager::CXmlHistoryManager()
|
||||
: m_CurrentVersion(0)
|
||||
, m_LatestVersion(0)
|
||||
, m_pExclusiveListener(NULL)
|
||||
, m_pExclusiveListener(nullptr)
|
||||
, m_RecordNextVersion(false)
|
||||
, m_pExActiveGroup(NULL)
|
||||
, m_pExActiveGroup(nullptr)
|
||||
, m_bIsActiveGroupEx(false)
|
||||
{
|
||||
m_pNullGroup = new SXmlHistoryGroup(this, (uint32) - 1);
|
||||
@@ -376,7 +376,7 @@ void CXmlHistoryManager::PrepareForNextVersion()
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CXmlHistoryManager::RecordNextVersion(SXmlHistory* pHistory, XmlNodeRef newData, const char* undoDesc /*= NULL*/)
|
||||
void CXmlHistoryManager::RecordNextVersion(SXmlHistory* pHistory, XmlNodeRef newData, const char* undoDesc /*= nullptr*/)
|
||||
{
|
||||
assert(m_RecordNextVersion);
|
||||
RegisterUndoEventHandler(this, pHistory);
|
||||
@@ -405,7 +405,7 @@ void CXmlHistoryManager::ClearHistory(bool flagAsSaved)
|
||||
it->ClearHistory(flagAsSaved);
|
||||
}
|
||||
|
||||
SetActiveGroup(NULL);
|
||||
SetActiveGroup(nullptr);
|
||||
|
||||
m_CurrentVersion = 0;
|
||||
m_LatestVersion = 0;
|
||||
@@ -451,14 +451,14 @@ SXmlHistoryGroup* CXmlHistoryManager::CreateXmlGroup(uint32 typeId)
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CXmlHistoryManager::AddXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc /*= NULL*/)
|
||||
void CXmlHistoryManager::AddXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc /*= nullptr*/)
|
||||
{
|
||||
RecordUndoInternal(undoDesc ? undoDesc : "New XML Group added");
|
||||
m_HistoryInfoMap[ m_CurrentVersion ].ActiveGroups.push_back(pGroup);
|
||||
NotifyUndoEventListener(IXmlHistoryEventListener::eHET_HistoryGroupAdded, (void*)pGroup);
|
||||
}
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CXmlHistoryManager::RemoveXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc /*= NULL*/)
|
||||
void CXmlHistoryManager::RemoveXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc /*= nullptr*/)
|
||||
{
|
||||
bool unload = m_HistoryInfoMap[ m_CurrentVersion ].CurrGroup == pGroup;
|
||||
RecordUndoInternal(undoDesc ? undoDesc : "XML Group deleted");
|
||||
@@ -466,14 +466,14 @@ void CXmlHistoryManager::RemoveXmlGroup(const SXmlHistoryGroup* pGroup, const ch
|
||||
stl::find_and_erase(list, pGroup);
|
||||
if (unload)
|
||||
{
|
||||
SetActiveGroupInt(NULL);
|
||||
SetActiveGroupInt(nullptr);
|
||||
}
|
||||
m_HistoryInfoMap[ m_CurrentVersion ].CurrGroup = m_pNullGroup;
|
||||
NotifyUndoEventListener(IXmlHistoryEventListener::eHET_HistoryGroupRemoved, (void*)pGroup);
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
void CXmlHistoryManager::SetActiveGroup(const SXmlHistoryGroup* pGroup, const char* displayName /*= NULL*/, const TGroupIndexMap& groupIndex /*= TGroupIndexMap()*/, bool setExternal /*= false*/)
|
||||
void CXmlHistoryManager::SetActiveGroup(const SXmlHistoryGroup* pGroup, const char* displayName /*= nullptr*/, const TGroupIndexMap& groupIndex /*= TGroupIndexMap()*/, bool setExternal /*= false*/)
|
||||
{
|
||||
TGroupIndexMap userIndex;
|
||||
const SXmlHistoryGroup* pActiveGroup = GetActiveGroup(userIndex);
|
||||
@@ -488,7 +488,7 @@ void CXmlHistoryManager::SetActiveGroup(const SXmlHistoryGroup* pGroup, const ch
|
||||
}
|
||||
}
|
||||
|
||||
void CXmlHistoryManager::SetActiveGroupInt(const SXmlHistoryGroup* pGroup, const char* displayName /*= NULL*/, bool bRecordNullUndo /*= false*/, const TGroupIndexMap& groupIndex /*= TGroupIndexMap()*/)
|
||||
void CXmlHistoryManager::SetActiveGroupInt(const SXmlHistoryGroup* pGroup, const char* displayName /*= nullptr*/, bool bRecordNullUndo /*= false*/, const TGroupIndexMap& groupIndex /*= TGroupIndexMap()*/)
|
||||
{
|
||||
UnloadInt();
|
||||
|
||||
@@ -511,7 +511,7 @@ void CXmlHistoryManager::SetActiveGroupInt(const SXmlHistoryGroup* pGroup, const
|
||||
userIndexCount[ (*history)->GetTypeId() ] = 0;
|
||||
}
|
||||
uint32 userindex = userIndexCount[ (*history)->GetTypeId() ];
|
||||
IXmlUndoEventHandler* pEventHandler = NULL;
|
||||
IXmlUndoEventHandler* pEventHandler = nullptr;
|
||||
TGroupIndexMap::const_iterator indexIter = groupIndex.find((*history)->GetTypeId());
|
||||
if (indexIter == groupIndex.end() || indexIter->second == userindex)
|
||||
{
|
||||
@@ -581,12 +581,12 @@ const SXmlHistoryGroup* CXmlHistoryManager::GetActiveGroup(TGroupIndexMap& currU
|
||||
if (it != m_HistoryInfoMap.end() && pGroup)
|
||||
{
|
||||
currUserIndex = it->second.CurrUserIndex;
|
||||
return pGroup == m_pNullGroup ? NULL : pGroup;
|
||||
return pGroup == m_pNullGroup ? nullptr : pGroup;
|
||||
}
|
||||
}
|
||||
currVersion--;
|
||||
} while (currVersion >= 0);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
@@ -796,7 +796,7 @@ SXmlHistory* CXmlHistoryManager::GetLatestHistory(SUndoEventHandlerData& eventHa
|
||||
}
|
||||
currVersion--;
|
||||
} while (currVersion >= 0);
|
||||
return NULL;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ public:
|
||||
|
||||
void AddToHistory(const XmlNodeRef& newXmlVersion);
|
||||
|
||||
const XmlNodeRef& Undo(bool* bVersionExist = NULL);
|
||||
const XmlNodeRef& Undo(bool* bVersionExist = nullptr);
|
||||
const XmlNodeRef& Redo();
|
||||
const XmlNodeRef& GetCurrentVersion(bool* bVersionExist = NULL, int* iVersionNumber = NULL) const;
|
||||
const XmlNodeRef& GetCurrentVersion(bool* bVersionExist = nullptr, int* iVersionNumber = nullptr) const;
|
||||
bool IsModified() const;
|
||||
uint32 GetTypeId() const {return m_typeId; }
|
||||
void FlagAsDeleted();
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
void RestoreUndoEventHandler(IXmlUndoEventHandler* pEventHandler, uint32 typeId);
|
||||
|
||||
void PrepareForNextVersion();
|
||||
void RecordNextVersion(SXmlHistory* pHistory, XmlNodeRef newData, const char* undoDesc = NULL);
|
||||
void RecordNextVersion(SXmlHistory* pHistory, XmlNodeRef newData, const char* undoDesc = nullptr);
|
||||
bool IsPreparedForNextVersion() const {return m_RecordNextVersion; }
|
||||
|
||||
void RegisterEventListener(IXmlHistoryEventListener* pEventListener);
|
||||
@@ -112,11 +112,11 @@ public:
|
||||
|
||||
// Xml History Groups
|
||||
SXmlHistoryGroup* CreateXmlGroup(uint32 typeId);
|
||||
void SetActiveGroup(const SXmlHistoryGroup* pGroup, const char* displayName = NULL, const TGroupIndexMap& groupIndex = TGroupIndexMap(), bool setExternal = false);
|
||||
void SetActiveGroup(const SXmlHistoryGroup* pGroup, const char* displayName = nullptr, const TGroupIndexMap& groupIndex = TGroupIndexMap(), bool setExternal = false);
|
||||
const SXmlHistoryGroup* GetActiveGroup() const;
|
||||
const SXmlHistoryGroup* GetActiveGroup(TGroupIndexMap& currUserIndex /*out*/) const;
|
||||
void AddXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc = NULL);
|
||||
void RemoveXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc = NULL);
|
||||
void AddXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc = nullptr);
|
||||
void RemoveXmlGroup(const SXmlHistoryGroup* pGroup, const char* undoDesc = nullptr);
|
||||
|
||||
void DeleteAll();
|
||||
|
||||
@@ -156,7 +156,7 @@ private:
|
||||
{
|
||||
SHistoryInfo()
|
||||
: IsNullUndo(false)
|
||||
, CurrGroup(NULL)
|
||||
, CurrGroup(nullptr)
|
||||
, HistoryInvalidated(false) {}
|
||||
|
||||
const SXmlHistoryGroup* CurrGroup;
|
||||
@@ -174,7 +174,7 @@ private:
|
||||
struct SUndoEventHandlerData
|
||||
{
|
||||
SUndoEventHandlerData()
|
||||
: CurrentData(NULL) {}
|
||||
: CurrentData(nullptr) {}
|
||||
|
||||
SXmlHistory* CurrentData;
|
||||
THistoryVersionMap HistoryData;
|
||||
@@ -203,9 +203,9 @@ private:
|
||||
void RecordNullUndo(const TEventHandlerList& eventHandler, const char* desc, bool isNull = true);
|
||||
void ReloadCurrentVersion(const SXmlHistoryGroup* pPrevGroup, int prevVersion);
|
||||
SXmlHistory* GetLatestHistory(SUndoEventHandlerData& eventHandlerData);
|
||||
void NotifyUndoEventListener(IXmlHistoryEventListener::EHistoryEventType event, void* pData = NULL);
|
||||
void NotifyUndoEventListener(IXmlHistoryEventListener::EHistoryEventType event, void* pData = nullptr);
|
||||
|
||||
void SetActiveGroupInt(const SXmlHistoryGroup* pGroup, const char* displayName = NULL, bool bRecordNullUndo = false, const TGroupIndexMap& groupIndex = TGroupIndexMap());
|
||||
void SetActiveGroupInt(const SXmlHistoryGroup* pGroup, const char* displayName = nullptr, bool bRecordNullUndo = false, const TGroupIndexMap& groupIndex = TGroupIndexMap());
|
||||
void UnloadInt();
|
||||
void ClearRedo();
|
||||
|
||||
|
||||
@@ -89,7 +89,7 @@ void CXmlTemplate::SetValues(const XmlNodeRef& node, XmlNodeRef& toNode)
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(!"NULL returned from node->GetChild()");
|
||||
assert(!"nullptr returned from node->GetChild()");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -125,7 +125,7 @@ bool CXmlTemplate::SetValues(const XmlNodeRef& node, XmlNodeRef& toNode, const X
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(!"NULL returned from node->GetChild()");
|
||||
assert(!"nullptr returned from node->GetChild()");
|
||||
}
|
||||
}
|
||||
return false;
|
||||
@@ -193,7 +193,7 @@ void CXmlTemplateRegistry::LoadTemplates(const QString& path)
|
||||
XmlNodeRef child;
|
||||
// Construct the full filepath of the current file
|
||||
XmlNodeRef node = XmlHelpers::LoadXmlFromFile((dir + files[k].filename).toUtf8().data());
|
||||
if (node != 0 && node->isTag("Templates"))
|
||||
if (node != nullptr && node->isTag("Templates"))
|
||||
{
|
||||
QString name;
|
||||
for (int i = 0; i < node->getChildCount(); i++)
|
||||
@@ -220,5 +220,5 @@ XmlNodeRef CXmlTemplateRegistry::FindTemplate(const QString& name)
|
||||
{
|
||||
return node;
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
void flip() {* p ^= mask; }
|
||||
};
|
||||
|
||||
CBitArray() { m_base = NULL; m_bits = NULL; m_size = 0; m_numBits = 0; };
|
||||
CBitArray() { m_base = nullptr; m_bits = nullptr; m_size = 0; m_numBits = 0; };
|
||||
CBitArray(int numBits) { resize(numBits); };
|
||||
~CBitArray()
|
||||
{
|
||||
|
||||
@@ -55,7 +55,7 @@ CViewManager::CViewManager()
|
||||
m_updateRegion.min = Vec3(-100000, -100000, -100000);
|
||||
m_updateRegion.max = Vec3(100000, 100000, 100000);
|
||||
|
||||
m_pSelectedView = NULL;
|
||||
m_pSelectedView = nullptr;
|
||||
|
||||
m_nGameViewports = 0;
|
||||
m_bGameViewportsUpdated = false;
|
||||
@@ -117,7 +117,7 @@ void CViewManager::UnregisterViewport(CViewport* pViewport)
|
||||
{
|
||||
if (m_pSelectedView == pViewport)
|
||||
{
|
||||
m_pSelectedView = NULL;
|
||||
m_pSelectedView = nullptr;
|
||||
}
|
||||
stl::find_and_erase(m_viewports, pViewport);
|
||||
m_bGameViewportsUpdated = false;
|
||||
@@ -137,7 +137,7 @@ CViewport* CViewManager::GetViewport(EViewportType type) const
|
||||
return m_viewports[i];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -150,7 +150,7 @@ CViewport* CViewManager::GetViewport(const QString& name) const
|
||||
return m_viewports[i];
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -234,7 +234,7 @@ void CViewManager::SelectViewport(CViewport* pViewport)
|
||||
{
|
||||
// Audio: Handle viewport change for listeners
|
||||
|
||||
if (m_pSelectedView != NULL && m_pSelectedView != pViewport)
|
||||
if (m_pSelectedView != nullptr && m_pSelectedView != pViewport)
|
||||
{
|
||||
m_pSelectedView->SetSelected(false);
|
||||
|
||||
@@ -242,7 +242,7 @@ void CViewManager::SelectViewport(CViewport* pViewport)
|
||||
|
||||
m_pSelectedView = pViewport;
|
||||
|
||||
if (m_pSelectedView != NULL)
|
||||
if (m_pSelectedView != nullptr)
|
||||
{
|
||||
m_pSelectedView->SetSelected(true);
|
||||
}
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
//! Get current layout window.
|
||||
//! @return Pointer to the layout window, can be NULL.
|
||||
//! @return Pointer to the layout window, can be nullptr.
|
||||
virtual CLayoutWnd* GetLayout() const;
|
||||
|
||||
//! Cycle between different 2D viewports type on same view pane.
|
||||
|
||||
@@ -159,8 +159,8 @@ CLayoutViewPane::CLayoutViewPane(QWidget* parent)
|
||||
, m_viewportTitleDlg(this)
|
||||
, m_expanderWatcher(new ViewportTitleExpanderWatcher(this, &m_viewportTitleDlg))
|
||||
{
|
||||
m_viewport = 0;
|
||||
m_active = 0;
|
||||
m_viewport = nullptr;
|
||||
m_active = false;
|
||||
m_nBorder = VIEW_BORDER;
|
||||
|
||||
m_bFullscreen = false;
|
||||
@@ -338,7 +338,7 @@ void CLayoutViewPane::DetachViewport()
|
||||
{
|
||||
DisconnectRenderViewportInteractionRequestBus();
|
||||
OnFOVChanged(gSettings.viewports.fDefaultFov);
|
||||
m_viewport = 0;
|
||||
m_viewport = nullptr;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -348,7 +348,7 @@ void CLayoutViewPane::ReleaseViewport()
|
||||
{
|
||||
DisconnectRenderViewportInteractionRequestBus();
|
||||
m_viewport->deleteLater();
|
||||
m_viewport = 0;
|
||||
m_viewport = nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -192,7 +192,7 @@ QtViewport::QtViewport(QWidget* parent)
|
||||
m_viewTM.SetIdentity();
|
||||
m_screenTM.SetIdentity();
|
||||
|
||||
m_pMouseOverObject = 0;
|
||||
m_pMouseOverObject = nullptr;
|
||||
|
||||
m_bAdvancedSelectMode = false;
|
||||
|
||||
@@ -398,7 +398,7 @@ void QtViewport::OnDeactivate()
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
void QtViewport::ResetContent()
|
||||
{
|
||||
m_pMouseOverObject = 0;
|
||||
m_pMouseOverObject = nullptr;
|
||||
|
||||
// Need to clear visual object cache.
|
||||
// Right after loading new level, some code(e.g. OnMouseMove) access invalid
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
virtual void AddPostRenderer(IPostRenderer* pPostRenderer) = 0;
|
||||
virtual bool RemovePostRenderer(IPostRenderer* pPostRenderer) = 0;
|
||||
|
||||
virtual BOOL DestroyWindow() { return FALSE; }
|
||||
virtual bool DestroyWindow() { return false; }
|
||||
|
||||
/** Get type of this viewport.
|
||||
*/
|
||||
@@ -252,7 +252,7 @@ public:
|
||||
virtual void SetCursorString(const QString& str) = 0;
|
||||
|
||||
virtual void SetFocus() = 0;
|
||||
virtual void Invalidate(BOOL bErase = 1) = 0;
|
||||
virtual void Invalidate(bool bErase = 1) = 0;
|
||||
|
||||
// Is overridden by RenderViewport
|
||||
virtual void SetFOV([[maybe_unused]] float fov) {}
|
||||
@@ -266,8 +266,8 @@ public:
|
||||
void SetViewPane(CLayoutViewPane* viewPane) { m_viewPane = viewPane; }
|
||||
|
||||
//Child classes can override these to provide extra logic that wraps
|
||||
//widget rendering. Needed by the RenderViewport to handle raycasts
|
||||
//from screen-space to world-space.
|
||||
//widget rendering. Needed by the RenderViewport to handle raycasts
|
||||
//from screen-space to world-space.
|
||||
virtual void PreWidgetRendering() {}
|
||||
virtual void PostWidgetRendering() {}
|
||||
|
||||
@@ -346,7 +346,7 @@ public:
|
||||
QString GetName() const;
|
||||
|
||||
virtual void SetFocus() { setFocus(); }
|
||||
virtual void Invalidate([[maybe_unused]] BOOL bErase = 1) { update(); }
|
||||
virtual void Invalidate([[maybe_unused]] bool bErase = 1) { update(); }
|
||||
|
||||
// Is overridden by RenderViewport
|
||||
virtual void SetFOV([[maybe_unused]] float fov) {}
|
||||
|
||||
@@ -91,7 +91,7 @@ namespace
|
||||
void ViewportInfoStatusUpdated(int newIndex);
|
||||
|
||||
private:
|
||||
void OnViewportInfoDisplayStateChanged(AZ::AtomBridge::ViewportInfoDisplayState state)
|
||||
void OnViewportInfoDisplayStateChanged(AZ::AtomBridge::ViewportInfoDisplayState state) override
|
||||
{
|
||||
emit ViewportInfoStatusUpdated(static_cast<int>(state));
|
||||
}
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user