Merge branch 'development' of https://github.com/o3de/o3de into TerrainMaterialsFix
This commit is contained in:
@@ -143,7 +143,8 @@ bool CImageUtil::LoadPGM(const QString& fileName, CImageEx& image)
|
||||
fseek(file, 0, SEEK_SET);
|
||||
|
||||
char* str = new char[fileSize];
|
||||
fread(str, fileSize, 1, file);
|
||||
|
||||
[[maybe_unused]] auto bytesRead = fread(str, fileSize, 1, file);
|
||||
|
||||
[[maybe_unused]] char* nextToken = nullptr;
|
||||
token = azstrtok(str, 0, seps, &nextToken);
|
||||
|
||||
@@ -69,9 +69,11 @@ namespace UnitTest
|
||||
// Note that ConvertToAbsolutePath will perform a realpath on the result. The result of AZ::Utils::GetExecutableDirectory
|
||||
// uses AZ::Android::AndroidEnv::Get()->GetAppPrivateStoragePath() which will retrieve the storage path, but that path could
|
||||
// be symlinked, so we need to perform a real path on it before comparison
|
||||
char realExecutableDirectory[AZ::IO::MaxPathLength];
|
||||
ASSERT_TRUE(realpath(executableDirectory, realExecutableDirectory));
|
||||
|
||||
char* realExecutableDirectory = realpath(executableDirectory, nullptr);
|
||||
ASSERT_NE(realExecutableDirectory, nullptr);
|
||||
|
||||
EXPECT_STRCASEEQ(realExecutableDirectory, absolutePath->c_str());
|
||||
|
||||
free(realExecutableDirectory);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -383,7 +383,7 @@ namespace AZ::IO::ZipDir
|
||||
if (!AZ::IO::FileIOBase::GetDirectInstance()->Write(m_fileHandle, ptr, sizeToWrite))
|
||||
{
|
||||
char error[1024];
|
||||
azstrerror_s(error, AZ_ARRAY_SIZE(error), errno);
|
||||
[[maybe_unused]] auto azStrErrorResult = azstrerror_s(error, AZ_ARRAY_SIZE(error), errno);
|
||||
AZ_Warning("Archive", false, "Cannot write to zip file!! error = (%d): %s", errno, error);
|
||||
return ZD_ERROR_IO_FAILED;
|
||||
}
|
||||
@@ -531,7 +531,7 @@ namespace AZ::IO::ZipDir
|
||||
if (!WriteCompressedData((uint8_t*)pUncompressed, nSegmentSize, encrypt))
|
||||
{
|
||||
char error[1024];
|
||||
azstrerror_s(error, AZ_ARRAY_SIZE(error), errno);
|
||||
[[maybe_unused]] auto azStrErrorResult = azstrerror_s(error, AZ_ARRAY_SIZE(error), errno);
|
||||
AZ_Warning("Archive", false, "Cannot write to zip file!! error = (%d): %s", errno, error);
|
||||
return ZD_ERROR_IO_FAILED;
|
||||
}
|
||||
|
||||
@@ -29,6 +29,19 @@ namespace AzFramework::SurfaceData
|
||||
{
|
||||
}
|
||||
|
||||
//! Equality comparison operator for SurfaceTagWeight.
|
||||
bool operator==(const SurfaceTagWeight& rhs) const
|
||||
{
|
||||
return (m_surfaceType == rhs.m_surfaceType) && (m_weight == rhs.m_weight);
|
||||
}
|
||||
|
||||
//! Inequality comparison operator for SurfaceTagWeight.
|
||||
bool operator!=(const SurfaceTagWeight& rhs) const
|
||||
{
|
||||
return !(*this == rhs);
|
||||
}
|
||||
|
||||
|
||||
AZ::Crc32 m_surfaceType = AZ::Crc32(Constants::s_unassignedTagName);
|
||||
float m_weight = 0.0f; //! A Value in the range [0.0f .. 1.0f]
|
||||
|
||||
|
||||
+9
-5
@@ -120,7 +120,7 @@ namespace AzFramework
|
||||
int res = chdir(processLaunchInfo.m_workingDirectory.c_str());
|
||||
if (res != 0)
|
||||
{
|
||||
write(errorPipe[1], &errno, sizeof(int));
|
||||
[[maybe_unused]] auto writeResult = write(errorPipe[1], &errno, sizeof(int));
|
||||
// We *have* to _exit as we are the child process and simply
|
||||
// returning at this point would mean we would start running
|
||||
// the code from our parent process and that will just wreck
|
||||
@@ -132,15 +132,19 @@ namespace AzFramework
|
||||
switch (processLaunchInfo.m_processPriority)
|
||||
{
|
||||
case PROCESSPRIORITY_BELOWNORMAL:
|
||||
nice(1);
|
||||
{
|
||||
[[maybe_unused]] auto niceResult = nice(1);
|
||||
// also reduce disk impact:
|
||||
// setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_UTILITY);
|
||||
break;
|
||||
}
|
||||
case PROCESSPRIORITY_IDLE:
|
||||
nice(20);
|
||||
{
|
||||
[[maybe_unused]] auto niceResult = nice(20);
|
||||
// also reduce disk impact:
|
||||
// setiopolicy_np(IOPOL_TYPE_DISK, IOPOL_SCOPE_PROCESS, IOPOL_THROTTLE);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
startupInfo.SetupHandlesForChildProcess();
|
||||
@@ -153,7 +157,7 @@ namespace AzFramework
|
||||
// to stop it from continuing to run as a clone of the parent.
|
||||
// Communicate the error code back to the parent via a pipe for the
|
||||
// parent to read.
|
||||
write(errorPipe[1], &errval, sizeof(errval));
|
||||
[[maybe_unused]] auto writeResult = write(errorPipe[1], &errval, sizeof(errval));
|
||||
|
||||
_exit(0);
|
||||
}
|
||||
@@ -317,7 +321,7 @@ namespace AzFramework
|
||||
|
||||
// Set up a pipe to communicate the error code from the subprocess's execvpe call
|
||||
AZStd::array<int, 2> childErrorPipeFds{};
|
||||
pipe(childErrorPipeFds.data());
|
||||
[[maybe_unused]] auto pipeResult = pipe(childErrorPipeFds.data());
|
||||
|
||||
// This configures the write end of the pipe to close on calls to `exec`
|
||||
fcntl(childErrorPipeFds[1], F_SETFD, fcntl(childErrorPipeFds[1], F_GETFD) | FD_CLOEXEC);
|
||||
|
||||
@@ -117,11 +117,7 @@ namespace UnitTest
|
||||
EXPECT_EQ(param2[0], "param2val");
|
||||
}
|
||||
|
||||
#if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithCommas_Success)
|
||||
#else
|
||||
TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithCommas_Success)
|
||||
#endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
{
|
||||
ProcessLaunchParseTests::ParsedArgMap argMap;
|
||||
AzFramework::ProcessOutput processOutput;
|
||||
@@ -155,11 +151,7 @@ namespace UnitTest
|
||||
EXPECT_EQ(param2[1], "al");
|
||||
}
|
||||
|
||||
#if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithSpaces_Success)
|
||||
#else
|
||||
TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithSpaces_Success)
|
||||
#endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
{
|
||||
ProcessLaunchParseTests::ParsedArgMap argMap;
|
||||
AzFramework::ProcessOutput processOutput;
|
||||
@@ -191,11 +183,7 @@ namespace UnitTest
|
||||
EXPECT_EQ(param2[0], "param2v al");
|
||||
}
|
||||
|
||||
#if AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
TEST_F(ProcessLaunchParseTests, DISABLED_ProcessLauncher_StringsWithSpacesAndComma_Success)
|
||||
#else
|
||||
TEST_F(ProcessLaunchParseTests, ProcessLauncher_WithSpacesAndComma_Success)
|
||||
#endif // AZ_TRAIT_DISABLE_FAILED_PROCESS_LAUNCHER_TESTS
|
||||
{
|
||||
ProcessLaunchParseTests::ParsedArgMap argMap;
|
||||
AzFramework::ProcessOutput processOutput;
|
||||
|
||||
+1
-1
@@ -71,7 +71,7 @@ namespace AzNetworking
|
||||
const char* GetNetworkErrorDesc(int32_t errorCode)
|
||||
{
|
||||
static AZ_THREAD_LOCAL char buffer[1024];
|
||||
strerror_r(errorCode, buffer, sizeof(buffer));
|
||||
[[maybe_unused]] auto strErrorResult = strerror_r(errorCode, buffer, sizeof(buffer));
|
||||
return buffer;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ namespace AzToolsFramework
|
||||
settings.m_keepDefaults = true;
|
||||
}
|
||||
|
||||
if ((flags & StoreFlags::StoreLinkIds) != StoreFlags::None)
|
||||
if ((flags & StoreFlags::StripLinkIds) != StoreFlags::StripLinkIds)
|
||||
{
|
||||
settings.m_metadata.Create<LinkIdMetadata>();
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace AzToolsFramework
|
||||
|
||||
//! We do not save linkIds to file. However when loading a level we want to temporarily save
|
||||
//! linkIds to instance dom so any nested prefabs will have linkIds correctly set.
|
||||
StoreLinkIds = 1 << 1
|
||||
StripLinkIds = 1 << 1
|
||||
};
|
||||
AZ_DEFINE_ENUM_BITWISE_OPERATORS(StoreFlags);
|
||||
|
||||
|
||||
@@ -222,7 +222,7 @@ namespace AzToolsFramework::Prefab
|
||||
SetInstanceContainersOpenState(m_rootAliasFocusPath, false);
|
||||
|
||||
const RootAliasPath previousContainerRootAliasPath = m_rootAliasFocusPath;
|
||||
const InstanceOptionalConstReference previousFocusedInstance = GetInstanceReference(previousContainerRootAliasPath);
|
||||
const InstanceOptionalReference previousFocusedInstance = GetInstanceReference(previousContainerRootAliasPath);
|
||||
|
||||
m_rootAliasFocusPath = focusedInstance->get().GetAbsoluteInstanceAliasPath();
|
||||
m_focusedTemplateId = focusedInstance->get().GetTemplateId();
|
||||
@@ -277,7 +277,7 @@ namespace AzToolsFramework::Prefab
|
||||
|
||||
AZ::EntityId PrefabFocusHandler::GetFocusedPrefabContainerEntityId([[maybe_unused]] AzFramework::EntityContextId entityContextId) const
|
||||
{
|
||||
if (const InstanceOptionalConstReference instance = GetInstanceReference(m_rootAliasFocusPath); instance.has_value())
|
||||
if (const InstanceOptionalReference instance = GetInstanceReference(m_rootAliasFocusPath); instance.has_value())
|
||||
{
|
||||
return instance->get().GetContainerEntityId();
|
||||
}
|
||||
|
||||
@@ -331,7 +331,7 @@ namespace AzToolsFramework
|
||||
}
|
||||
|
||||
PrefabDom storedPrefabDom(&loadedTemplateDom->get().GetAllocator());
|
||||
if (!PrefabDomUtils::StoreInstanceInPrefabDom(loadedPrefabInstance, storedPrefabDom, PrefabDomUtils::StoreFlags::StoreLinkIds))
|
||||
if (!PrefabDomUtils::StoreInstanceInPrefabDom(loadedPrefabInstance, storedPrefabDom))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
@@ -359,7 +359,7 @@ namespace AzToolsFramework
|
||||
|
||||
PrefabDom storedPrefabDom(&savingTemplateDom->get().GetAllocator());
|
||||
if (!PrefabDomUtils::StoreInstanceInPrefabDom(savingPrefabInstance, storedPrefabDom,
|
||||
PrefabDomUtils::StoreFlags::StripDefaultValues))
|
||||
PrefabDomUtils::StoreFlags::StripDefaultValues | PrefabDomUtils::StoreFlags::StripLinkIds))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -197,7 +197,7 @@ namespace AzToolsFramework
|
||||
|
||||
// Update the template of the instance since the entities are modified since the template creation.
|
||||
Prefab::PrefabDom serializedInstance;
|
||||
if (Prefab::PrefabDomUtils::StoreInstanceInPrefabDom(instanceToCreate->get(), serializedInstance))
|
||||
if (m_instanceToTemplateInterface->GenerateDomForInstance(serializedInstance, instanceToCreate->get()))
|
||||
{
|
||||
m_prefabSystemComponentInterface->UpdatePrefabTemplate(instanceToCreate->get().GetTemplateId(), serializedInstance);
|
||||
}
|
||||
|
||||
@@ -163,17 +163,21 @@ namespace AzToolsFramework
|
||||
|
||||
void PrefabSystemComponent::PropagateTemplateChanges(TemplateId templateId, InstanceOptionalConstReference instanceToExclude)
|
||||
{
|
||||
auto templateIdToLinkIdsIterator = m_templateToLinkIdsMap.find(templateId);
|
||||
if (templateIdToLinkIdsIterator != m_templateToLinkIdsMap.end())
|
||||
TemplateReference findTemplateResult = FindTemplate(templateId);
|
||||
if (findTemplateResult.has_value())
|
||||
{
|
||||
// We need to initialize a queue here because once all linked instances of a template are updated,
|
||||
// we will find all the linkIds corresponding to the updated template and add them to this queue again.
|
||||
AZStd::queue<LinkIds> linkIdsToUpdateQueue;
|
||||
linkIdsToUpdateQueue.push(LinkIds(templateIdToLinkIdsIterator->second.begin(),
|
||||
templateIdToLinkIdsIterator->second.end()));
|
||||
UpdateLinkedInstances(linkIdsToUpdateQueue);
|
||||
auto templateIdToLinkIdsIterator = m_templateToLinkIdsMap.find(templateId);
|
||||
if (templateIdToLinkIdsIterator != m_templateToLinkIdsMap.end())
|
||||
{
|
||||
// We need to initialize a queue here because once all linked instances of a template are updated,
|
||||
// we will find all the linkIds corresponding to the updated template and add them to this queue again.
|
||||
AZStd::queue<LinkIds> linkIdsToUpdateQueue;
|
||||
linkIdsToUpdateQueue.push(
|
||||
LinkIds(templateIdToLinkIdsIterator->second.begin(), templateIdToLinkIdsIterator->second.end()));
|
||||
UpdateLinkedInstances(linkIdsToUpdateQueue);
|
||||
}
|
||||
UpdatePrefabInstances(templateId, instanceToExclude);
|
||||
}
|
||||
UpdatePrefabInstances(templateId, instanceToExclude);
|
||||
}
|
||||
|
||||
void PrefabSystemComponent::UpdatePrefabTemplate(TemplateId templateId, const PrefabDom& updatedDom)
|
||||
|
||||
@@ -256,7 +256,7 @@ namespace AzToolsFramework
|
||||
return;
|
||||
}
|
||||
|
||||
PrefabDomReference sourceDom = sourceTemplate->get().GetPrefabDom();
|
||||
PrefabDom& sourceDom = sourceTemplate->get().GetPrefabDom();
|
||||
|
||||
//use instance pointer to reach position
|
||||
PrefabDomValueReference instanceDomRef = link->get().GetLinkedInstanceDom();
|
||||
@@ -274,16 +274,14 @@ namespace AzToolsFramework
|
||||
(result.GetOutcome() != AZ::JsonSerializationResult::Outcomes::PartialSkip),
|
||||
"Some of the patches are not successfully applied.");
|
||||
|
||||
//remove the link id placed into the instance
|
||||
auto linkIdIter = instanceDom.FindMember(PrefabDomUtils::LinkIdName);
|
||||
if (linkIdIter != instanceDom.MemberEnd())
|
||||
{
|
||||
instanceDom.RemoveMember(PrefabDomUtils::LinkIdName);
|
||||
}
|
||||
// Remove the link ids if present in the doms. We don't want any overrides to be created on top of linkIds because
|
||||
// linkIds are not persistent and will be created dynamically when prefabs are loaded into the editor.
|
||||
instanceDom.RemoveMember(PrefabDomUtils::LinkIdName);
|
||||
sourceDom.RemoveMember(PrefabDomUtils::LinkIdName);
|
||||
|
||||
//we use this to diff our copy against the vanilla template (source template)
|
||||
PrefabDom patchLink;
|
||||
m_instanceToTemplateInterface->GeneratePatch(patchLink, sourceDom->get(), instanceDom);
|
||||
m_instanceToTemplateInterface->GeneratePatch(patchLink, sourceDom, instanceDom);
|
||||
|
||||
// Create a copy of patchLink by providing the allocator of m_linkDomNext so that the patch doesn't become invalid when
|
||||
// the patch goes out of scope in this function.
|
||||
|
||||
+9
-5
@@ -29,7 +29,7 @@
|
||||
#include <AzToolsFramework/ContainerEntity/ContainerEntityInterface.h>
|
||||
#include <AzToolsFramework/Entity/EditorEntityContextBus.h>
|
||||
#include <AzToolsFramework/Entity/ReadOnly/ReadOnlyEntityInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabPublicInterface.h>
|
||||
#include <AzToolsFramework/Prefab/PrefabFocusPublicInterface.h>
|
||||
#include <AzToolsFramework/ToolsComponents/TransformComponentBus.h>
|
||||
#include <AzToolsFramework/ToolsComponents/TransformComponentSerializer.h>
|
||||
#include <AzToolsFramework/ToolsComponents/EditorInspectorComponentBus.h>
|
||||
@@ -963,18 +963,22 @@ namespace AzToolsFramework
|
||||
|
||||
if (!m_parentEntityId.IsValid())
|
||||
{
|
||||
// If Prefabs are enabled, reroute the invalid id to the level root
|
||||
// If Prefabs are enabled, reroute the invalid id to the focused prefab container entity id
|
||||
bool isPrefabSystemEnabled = false;
|
||||
AzFramework::ApplicationRequests::Bus::BroadcastResult(
|
||||
isPrefabSystemEnabled, &AzFramework::ApplicationRequests::IsPrefabSystemEnabled);
|
||||
|
||||
if (isPrefabSystemEnabled)
|
||||
{
|
||||
auto prefabPublicInterface = AZ::Interface<Prefab::PrefabPublicInterface>::Get();
|
||||
auto prefabFocusPublicInterface = AZ::Interface<Prefab::PrefabFocusPublicInterface>::Get();
|
||||
|
||||
if (prefabPublicInterface)
|
||||
if (prefabFocusPublicInterface)
|
||||
{
|
||||
m_parentEntityId = prefabPublicInterface->GetLevelInstanceContainerEntityId();
|
||||
auto editorEntityContextId = AzFramework::EntityContextId::CreateNull();
|
||||
EditorEntityContextRequestBus::BroadcastResult(
|
||||
editorEntityContextId, &EditorEntityContextRequests::GetEditorEntityContextId);
|
||||
|
||||
m_parentEntityId = prefabFocusPublicInterface->GetFocusedPrefabContainerEntityId(editorEntityContextId);
|
||||
refreshLevel = AZ::Edit::PropertyRefreshLevels::ValuesOnly;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1280,48 +1280,72 @@ namespace Detail
|
||||
|
||||
#endif
|
||||
|
||||
#define ASSERT_CONSOLE_EXISTS 0
|
||||
|
||||
// the following macros allow the help text to be easily stripped out
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a CVar
|
||||
#define REGISTER_CVAR(_var, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_CVAR(_var, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a CVar with a callback
|
||||
#define REGISTER_CVAR_CB(_var, _def_val, _flags, _comment, _onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
#define REGISTER_CVAR_CB(_var, _def_val, _flags, _comment, _onchangefunction) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register((#_var), &(_var), (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a string CVar
|
||||
#define REGISTER_STRING(_name, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_STRING(_name, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a string CVar with a callback
|
||||
#define REGISTER_STRING_CB(_name, _def_val, _flags, _comment, _onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
#define REGISTER_STRING_CB(_name, _def_val, _flags, _comment, _onchangefunction) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterString(_name, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register an int CVar
|
||||
#define REGISTER_INT(_name, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_INT(_name, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register an int CVar with a callback
|
||||
#define REGISTER_INT_CB(_name, _def_val, _flags, _comment, _onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
#define REGISTER_INT_CB(_name, _def_val, _flags, _comment, _onchangefunction) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterInt(_name, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a float CVar
|
||||
#define REGISTER_FLOAT(_name, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterFloat(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_FLOAT(_name, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->RegisterFloat(_name, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Offers more flexibility but more code is required
|
||||
#define REGISTER_CVAR2(_name, _var, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_CVAR2(_name, _var, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Offers more flexibility but more code is required
|
||||
#define REGISTER_CVAR2_CB(_name, _var, _def_val, _flags, _comment, _onchangefunction) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
#define REGISTER_CVAR2_CB(_name, _var, _def_val, _flags, _comment, _onchangefunction) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, _var, (_def_val), (_flags), CVARHELP(_comment), _onchangefunction))
|
||||
|
||||
// Summary:
|
||||
// Offers more flexibility but more code is required, explicit address taking of destination variable
|
||||
#define REGISTER_CVAR3(_name, _var, _def_val, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, &(_var), (_def_val), (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_CVAR3(_name, _var, _def_val, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? 0 : gEnv->pConsole->Register(_name, &(_var), (_def_val), (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to register a console command
|
||||
#define REGISTER_COMMAND(_name, _func, _flags, _comment) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? false : gEnv->pConsole->AddCommand(_name, _func, (_flags), CVARHELP(_comment)))
|
||||
#define REGISTER_COMMAND(_name, _func, _flags, _comment) \
|
||||
(gEnv->pConsole == 0 ? false : gEnv->pConsole->AddCommand(_name, _func, (_flags), CVARHELP(_comment)))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to unregister a CVar
|
||||
#define UNREGISTER_CVAR(_name) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->UnregisterVariable(_name))
|
||||
#define UNREGISTER_CVAR(_name) \
|
||||
(gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->UnregisterVariable(_name))
|
||||
|
||||
// Summary:
|
||||
// Preferred way to unregister a console command
|
||||
#define UNREGISTER_COMMAND(_name) (ASSERT_CONSOLE_EXISTS, gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->RemoveCommand(_name))
|
||||
#define UNREGISTER_COMMAND(_name) \
|
||||
(gEnv->pConsole == 0 ? (void)0 : gEnv->pConsole->RemoveCommand(_name))
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
|
||||
@@ -106,7 +106,7 @@ typedef uint8 byte;
|
||||
#ifdef _RELEASE
|
||||
#define __debugbreak()
|
||||
#else
|
||||
#define __debugbreak() "_asm int 3"
|
||||
#define __debugbreak() asm("int3")
|
||||
#endif
|
||||
|
||||
#define __assume(x)
|
||||
|
||||
@@ -13,7 +13,7 @@ namespace AzTestRunner
|
||||
{
|
||||
void set_quiet_mode()
|
||||
{
|
||||
freopen("/dev/null", "a", stdout);
|
||||
[[maybe_unused]] auto freopenResult = freopen("/dev/null", "a", stdout);
|
||||
}
|
||||
|
||||
const char* get_current_working_directory()
|
||||
@@ -24,7 +24,7 @@ namespace AzTestRunner
|
||||
|
||||
void pause_on_completion()
|
||||
{
|
||||
system("pause");
|
||||
[[maybe_unused]] auto systemResult = system("pause");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -115,22 +115,22 @@ namespace AZ
|
||||
const aiMesh* mesh = scene->mMeshes[currentNode->mMeshes[sdkMeshIndex]];
|
||||
if(mesh->mTextureCoords[texCoordIndex])
|
||||
{
|
||||
if (mesh->mTextureCoordsNames[texCoordIndex].length > 0)
|
||||
if (mesh->HasTextureCoordsName(texCoordIndex))
|
||||
{
|
||||
if (!customNameFound)
|
||||
{
|
||||
name = mesh->mTextureCoordsNames[texCoordIndex].C_Str();
|
||||
name = mesh->GetTextureCoordsName(texCoordIndex)->C_Str();
|
||||
customNameFound = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
AZ_Warning(Utilities::WarningWindow,
|
||||
strcmp(name.c_str(), mesh->mTextureCoordsNames[texCoordIndex].C_Str()) == 0,
|
||||
strcmp(name.c_str(), mesh->GetTextureCoordsName(texCoordIndex)->C_Str()) == 0,
|
||||
"Node %s has conflicting mesh coordinate names at index %d, %s and %s. Using %s.",
|
||||
currentNode->mName.C_Str(),
|
||||
texCoordIndex,
|
||||
name.c_str(),
|
||||
mesh->mTextureCoordsNames[texCoordIndex].C_Str(),
|
||||
mesh->GetTextureCoordsName(texCoordIndex)->C_Str(),
|
||||
name.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user