Merge branch 'main' into SpawnableIndexQuery
This commit is contained in:
@@ -679,8 +679,6 @@ namespace AzFramework
|
||||
{
|
||||
auto fileIoBase = m_archiveFileIO.get();
|
||||
// Set up the default file aliases based on the settings registry
|
||||
fileIoBase->SetAlias("@assets@", "");
|
||||
fileIoBase->SetAlias("@root@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@engroot@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@projectroot@", GetEngineRoot());
|
||||
fileIoBase->SetAlias("@exefolder@", GetExecutableFolder());
|
||||
@@ -694,8 +692,8 @@ namespace AzFramework
|
||||
pathAliases.clear();
|
||||
if (m_settingsRegistry->Get(pathAliases.Native(), AZ::SettingsRegistryMergeUtils::FilePathKey_CacheRootFolder))
|
||||
{
|
||||
fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@assets@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@projectplatformcache@", pathAliases.c_str());
|
||||
fileIoBase->SetAlias("@root@", pathAliases.c_str()); // Deprecated Use @projectplatformcache@
|
||||
}
|
||||
pathAliases.clear();
|
||||
|
||||
@@ -432,46 +432,26 @@ namespace AzFramework
|
||||
|
||||
void TransformComponent::SetLocalRotation(const AZ::Vector3& eulerRadianAngles)
|
||||
{
|
||||
AZ::Transform newLocalTM = AZ::ConvertEulerRadiansToTransform(eulerRadianAngles);
|
||||
newLocalTM.SetScale(m_localTM.GetScale());
|
||||
newLocalTM.SetTranslation(m_localTM.GetTranslation());
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
newLocalTM.SetRotation(AZ::Quaternion::CreateFromEulerAnglesRadians(eulerRadianAngles));
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalRotationQuaternion(const AZ::Quaternion& quaternion)
|
||||
{
|
||||
AZ::Transform newLocalTM;
|
||||
newLocalTM.SetScale(m_localTM.GetScale());
|
||||
newLocalTM.SetTranslation(m_localTM.GetTranslation());
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
newLocalTM.SetRotation(quaternion);
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
static AZ::Transform RotateAroundLocalHelper(float eulerAngleRadian, const AZ::Transform& localTM, AZ::Vector3 axis)
|
||||
{
|
||||
//get the existing translation and scale
|
||||
AZ::Vector3 translation = localTM.GetTranslation();
|
||||
AZ::Vector3 scale = localTM.GetScale();
|
||||
|
||||
//normalize the axis before creating rotation
|
||||
axis.Normalize();
|
||||
AZ::Quaternion rotate = AZ::Quaternion::CreateFromAxisAngle(axis, eulerAngleRadian);
|
||||
|
||||
//create new rotation transform
|
||||
AZ::Quaternion currentRotate = localTM.GetRotation();
|
||||
AZ::Quaternion newRotate = rotate * currentRotate;
|
||||
newRotate.Normalize();
|
||||
|
||||
//scale
|
||||
AZ::Transform newLocalTM = AZ::Transform::CreateScale(scale);
|
||||
|
||||
//rotate
|
||||
AZ::Transform rotateLocalTM = AZ::Transform::CreateFromQuaternion(newRotate);
|
||||
newLocalTM = rotateLocalTM * newLocalTM;
|
||||
|
||||
//translate
|
||||
newLocalTM.SetTranslation(translation);
|
||||
|
||||
AZ::Transform newLocalTM = localTM;
|
||||
newLocalTM.SetRotation((rotate * localTM.GetRotation()).GetNormalized());
|
||||
return newLocalTM;
|
||||
}
|
||||
|
||||
@@ -512,75 +492,6 @@ namespace AzFramework
|
||||
return m_localTM.GetRotation();
|
||||
}
|
||||
|
||||
void TransformComponent::SetScale(const AZ::Vector3& scale)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetScale is deprecated, please use SetLocalScale");
|
||||
|
||||
if (!m_worldTM.GetScale().IsClose(scale))
|
||||
{
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetScale(scale);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
}
|
||||
|
||||
void TransformComponent::SetScaleX(float scaleX)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetScaleX is deprecated, please use SetLocalScaleX");
|
||||
|
||||
AZ::Vector3 newScale = m_worldTM.GetScale();
|
||||
newScale.SetX(scaleX);
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetScale(newScale);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetScaleY(float scaleY)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetScaleY is deprecated, please use SetLocalScaleY");
|
||||
|
||||
AZ::Vector3 newScale = m_worldTM.GetScale();
|
||||
newScale.SetY(scaleY);
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetScale(newScale);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
void TransformComponent::SetScaleZ(float scaleZ)
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "SetScaleZ is deprecated, please use SetLocalScaleZ");
|
||||
|
||||
AZ::Vector3 newScale = m_worldTM.GetScale();
|
||||
newScale.SetZ(scaleZ);
|
||||
AZ::Transform newWorldTransform = m_worldTM;
|
||||
newWorldTransform.SetScale(newScale);
|
||||
SetWorldTM(newWorldTransform);
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetScale()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetScale is deprecated, please use GetLocalScale");
|
||||
return m_worldTM.GetScale();
|
||||
}
|
||||
|
||||
float TransformComponent::GetScaleX()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetScaleX is deprecated, please use GetLocalScale");
|
||||
return m_worldTM.GetScale().GetX();
|
||||
}
|
||||
|
||||
float TransformComponent::GetScaleY()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetScaleY is deprecated, please use GetLocalScale");
|
||||
return m_worldTM.GetScale().GetY();
|
||||
}
|
||||
|
||||
float TransformComponent::GetScaleZ()
|
||||
{
|
||||
AZ_Warning("TransformComponent", false, "GetScaleZ is deprecated, please use GetLocalScale");
|
||||
return m_worldTM.GetScale().GetZ();
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalScale(const AZ::Vector3& scale)
|
||||
{
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
@@ -588,33 +499,6 @@ namespace AzFramework
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalScaleX(float scaleX)
|
||||
{
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
AZ::Vector3 newScale = newLocalTM.GetScale();
|
||||
newScale.SetX(scaleX);
|
||||
newLocalTM.SetScale(newScale);
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalScaleY(float scaleY)
|
||||
{
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
AZ::Vector3 newScale = newLocalTM.GetScale();
|
||||
newScale.SetY(scaleY);
|
||||
newLocalTM.SetScale(newScale);
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalScaleZ(float scaleZ)
|
||||
{
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
AZ::Vector3 newScale = newLocalTM.GetScale();
|
||||
newScale.SetZ(scaleZ);
|
||||
newLocalTM.SetScale(newScale);
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
AZ::Vector3 TransformComponent::GetLocalScale()
|
||||
{
|
||||
return m_localTM.GetScale();
|
||||
@@ -625,6 +509,23 @@ namespace AzFramework
|
||||
return m_worldTM.GetScale();
|
||||
}
|
||||
|
||||
void TransformComponent::SetLocalUniformScale(float scale)
|
||||
{
|
||||
AZ::Transform newLocalTM = m_localTM;
|
||||
newLocalTM.SetUniformScale(scale);
|
||||
SetLocalTM(newLocalTM);
|
||||
}
|
||||
|
||||
float TransformComponent::GetLocalUniformScale()
|
||||
{
|
||||
return m_localTM.GetUniformScale();
|
||||
}
|
||||
|
||||
float TransformComponent::GetWorldUniformScale()
|
||||
{
|
||||
return m_worldTM.GetUniformScale();
|
||||
}
|
||||
|
||||
AZStd::vector<AZ::EntityId> TransformComponent::GetChildren()
|
||||
{
|
||||
AZStd::vector<AZ::EntityId> children;
|
||||
@@ -979,34 +880,7 @@ namespace AzFramework
|
||||
->Event("GetLocalRotationQuaternion", &AZ::TransformBus::Events::GetLocalRotationQuaternion)
|
||||
->Attribute("Rotation", AZ::Edit::Attributes::PropertyRotation)
|
||||
->VirtualProperty("Rotation", "GetLocalRotationQuaternion", "SetLocalRotationQuaternion")
|
||||
->Event("SetScale", &AZ::TransformBus::Events::SetScale)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetScaleX", &AZ::TransformBus::Events::SetScaleX)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetScaleY", &AZ::TransformBus::Events::SetScaleY)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetScaleZ", &AZ::TransformBus::Events::SetScaleZ)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetScale", &AZ::TransformBus::Events::GetScale)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetScaleX", &AZ::TransformBus::Events::GetScaleX)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetScaleY", &AZ::TransformBus::Events::GetScaleY)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("GetScaleZ", &AZ::TransformBus::Events::GetScaleZ)
|
||||
->Attribute(AZ::Script::Attributes::Deprecated, true)
|
||||
->Attribute(AZ::Script::Attributes::ExcludeFrom, AZ::Script::Attributes::ExcludeFlags::All)
|
||||
->Event("SetLocalScale", &AZ::TransformBus::Events::SetLocalScale)
|
||||
->Event("SetLocalScaleX", &AZ::TransformBus::Events::SetLocalScaleX)
|
||||
->Event("SetLocalScaleY", &AZ::TransformBus::Events::SetLocalScaleY)
|
||||
->Event("SetLocalScaleZ", &AZ::TransformBus::Events::SetLocalScaleZ)
|
||||
->Event("GetLocalScale", &AZ::TransformBus::Events::GetLocalScale)
|
||||
->Attribute("Scale", AZ::Edit::Attributes::PropertyScale)
|
||||
->VirtualProperty("Scale", "GetLocalScale", "SetLocalScale")
|
||||
|
||||
@@ -143,24 +143,14 @@ namespace AzFramework
|
||||
AZ::Quaternion GetLocalRotationQuaternion() override;
|
||||
|
||||
// Scale Modifiers
|
||||
void SetScale(const AZ::Vector3& scale) override;
|
||||
void SetScaleX(float scaleX) override;
|
||||
void SetScaleY(float scaleY) override;
|
||||
void SetScaleZ(float scaleZ) override;
|
||||
|
||||
AZ::Vector3 GetScale() override;
|
||||
float GetScaleX() override;
|
||||
float GetScaleY() override;
|
||||
float GetScaleZ() override;
|
||||
|
||||
void SetLocalScale(const AZ::Vector3& scale) override;
|
||||
void SetLocalScaleX(float scaleX) override;
|
||||
void SetLocalScaleY(float scaleY) override;
|
||||
void SetLocalScaleZ(float scaleZ) override;
|
||||
|
||||
AZ::Vector3 GetLocalScale() override;
|
||||
AZ::Vector3 GetWorldScale() override;
|
||||
|
||||
void SetLocalUniformScale(float scale) override;
|
||||
float GetLocalUniformScale() override;
|
||||
float GetWorldUniformScale() override;
|
||||
|
||||
// Transform hierarchy
|
||||
AZStd::vector<AZ::EntityId> GetChildren() override;
|
||||
AZStd::vector<AZ::EntityId> GetAllDescendants() override;
|
||||
|
||||
@@ -60,6 +60,7 @@ namespace AzFramework
|
||||
virtual void DrawTrianglesIndexed(const AZStd::vector<AZ::Vector3>& vertices, const AZStd::vector<AZ::u32>& indices, const AZ::Color& color) { (void)vertices; (void)indices, (void)color; }
|
||||
virtual void DrawWireBox(const AZ::Vector3& min, const AZ::Vector3& max) { (void)min; (void)max; }
|
||||
virtual void DrawSolidBox(const AZ::Vector3& min, const AZ::Vector3& max) { (void)min; (void)max; }
|
||||
virtual void DrawWireOBB(const AZ::Vector3& center, const AZ::Vector3& axisX, const AZ::Vector3& axisY, const AZ::Vector3& axisZ, const AZ::Vector3& halfExtents) { (void)center; (void)axisX; (void)axisY; (void)axisZ; (void)halfExtents; }
|
||||
virtual void DrawSolidOBB(const AZ::Vector3& center, const AZ::Vector3& axisX, const AZ::Vector3& axisY, const AZ::Vector3& axisZ, const AZ::Vector3& halfExtents) { (void)center; (void)axisX; (void)axisY; (void)axisZ; (void)halfExtents; }
|
||||
virtual void DrawPoint(const AZ::Vector3& p, int nSize = 1) { (void)p; (void)nSize; }
|
||||
virtual void DrawLine(const AZ::Vector3& p1, const AZ::Vector3& p2) { (void)p1; (void)p2; }
|
||||
@@ -70,18 +71,15 @@ namespace AzFramework
|
||||
virtual void DrawLine2d(const AZ::Vector2& p1, const AZ::Vector2& p2, float z) { (void)p1; (void)p2; (void)z; }
|
||||
virtual void DrawLine2dGradient(const AZ::Vector2& p1, const AZ::Vector2& p2, float z, const AZ::Vector4& firstColor, const AZ::Vector4& secondColor) { (void)p1; (void)p2; (void)z; (void)firstColor; (void)secondColor; }
|
||||
virtual void DrawWireCircle2d(const AZ::Vector2& center, float radius, float z) { (void)center; (void)radius; (void)z; }
|
||||
virtual void DrawTerrainCircle(const AZ::Vector3& worldPos, float radius, float height) { (void)worldPos; (void)radius; (void)height; }
|
||||
virtual void DrawTerrainCircle(const AZ::Vector3& center, float radius, float angle1, float angle2, float height) { (void)center; (void)radius; (void)angle1; (void)angle2; (void)height; }
|
||||
virtual void DrawArc(const AZ::Vector3& pos, float radius, float startAngleDegrees, float sweepAngleDegrees, float angularStepDegrees, int referenceAxis = 2) { (void)pos; (void)radius; (void)startAngleDegrees; (void)sweepAngleDegrees; (void)angularStepDegrees; (void)referenceAxis; }
|
||||
virtual void DrawArc(const AZ::Vector3& pos, float radius, float startAngleDegrees, float sweepAngleDegrees, float angularStepDegrees, const AZ::Vector3& fixedAxis) { (void)pos; (void)radius; (void)startAngleDegrees; (void)sweepAngleDegrees; (void)angularStepDegrees; (void)fixedAxis; }
|
||||
virtual void DrawCircle(const AZ::Vector3& pos, float radius, int nUnchangedAxis = 2 /*z axis*/) { (void)pos; (void)radius; (void)nUnchangedAxis; }
|
||||
virtual void DrawHalfDottedCircle(const AZ::Vector3& pos, float radius, const AZ::Vector3& viewPos, int nUnchangedAxis = 2 /*z axis*/) { (void)pos; (void)radius; (void)viewPos; (void)nUnchangedAxis; }
|
||||
virtual void DrawCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded = true) { (void)pos; (void)dir; (void)radius; (void)height; (void)drawShaded; }
|
||||
virtual void DrawWireCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height) { (void)pos; (void)dir; (void)radius; (void)height; }
|
||||
virtual void DrawSolidCone(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius, float height, bool drawShaded = true) { (void)pos; (void)dir; (void)radius; (void)height; (void)drawShaded; }
|
||||
virtual void DrawWireCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height) { (void)center; (void)axis; (void)radius; (void)height; }
|
||||
virtual void DrawSolidCylinder(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float height, bool drawShaded = true) { (void)center; (void)axis; (void)radius; (void)height; (void)drawShaded; }
|
||||
virtual void DrawWireCapsule(const AZ::Vector3& center, const AZ::Vector3& axis, float radius, float heightStraightSection) { (void)center; (void)axis; (void)radius; (void)heightStraightSection; }
|
||||
virtual void DrawTerrainRect(float x1, float y1, float x2, float y2, float height) { (void)x1; (void)y1; (void)x2; (void)y2; (void)height; }
|
||||
virtual void DrawTerrainLine(AZ::Vector3 worldPos1, AZ::Vector3 worldPos2) { (void)worldPos1; (void)worldPos2; }
|
||||
virtual void DrawWireSphere(const AZ::Vector3& pos, float radius) { (void)pos; (void)radius; }
|
||||
virtual void DrawWireSphere(const AZ::Vector3& pos, const AZ::Vector3 radius) { (void)pos; (void)radius; }
|
||||
virtual void DrawWireDisk(const AZ::Vector3& pos, const AZ::Vector3& dir, float radius) { (void)pos; (void)dir; (void)radius; }
|
||||
@@ -91,11 +89,8 @@ namespace AzFramework
|
||||
virtual void DrawTextLabel(const AZ::Vector3& pos, float size, const char* text, const bool bCenter = false, int srcOffsetX = 0, int srcOffsetY = 0) { (void)pos; (void)size; (void)text; (void)bCenter; (void)srcOffsetX; (void)srcOffsetY; }
|
||||
virtual void Draw2dTextLabel(float x, float y, float size, const char* text, bool bCenter = false) { (void)x; (void)y; (void)size; (void)text; (void)bCenter; }
|
||||
virtual void DrawTextOn2DBox(const AZ::Vector3& pos, const char* text, float textScale, const AZ::Vector4& TextColor, const AZ::Vector4& TextBackColor) { (void)pos; (void)text; (void)textScale; (void)TextColor; (void)TextBackColor; }
|
||||
virtual void DrawTextureLabel(ITexture* texture, const AZ::Vector3& pos, float sizeX, float sizeY, int texIconFlags) { (void)texture; (void)pos; (void)sizeX; (void)sizeY; (void)texIconFlags; }
|
||||
virtual void DrawTextureLabel(int textureId, const AZ::Vector3& pos, float sizeX, float sizeY, int texIconFlags) { (void)textureId; (void)pos; (void)sizeX; (void)sizeY; (void)texIconFlags; }
|
||||
virtual void SetLineWidth(float width) { (void)width; }
|
||||
virtual bool IsVisible(const AZ::Aabb& bounds) { (void)bounds; return false; }
|
||||
virtual int SetFillMode(int nFillMode) { (void)nFillMode; return 0; }
|
||||
virtual float GetLineWidth() { return 0.0f; }
|
||||
virtual float GetAspectRatio() { return 0.0f; }
|
||||
virtual void DepthTestOff() {}
|
||||
|
||||
@@ -46,7 +46,6 @@ namespace AzFramework::ProjectManager
|
||||
// Store the Command line to the Setting Registry
|
||||
AZ::SettingsRegistryImpl settingsRegistry;
|
||||
AZ::SettingsRegistryMergeUtils::StoreCommandLineToRegistry(settingsRegistry, commandLine);
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_Bootstrap(settingsRegistry);
|
||||
AZ::SettingsRegistryMergeUtils::MergeSettingsToRegistry_O3deUserRegistry(settingsRegistry, AZ_TRAIT_OS_PLATFORM_CODENAME, {});
|
||||
// Retrieve Command Line from Settings Registry, it may have been updated by the call to FindEngineRoot()
|
||||
// in MergeSettingstoRegistry_ConfigFile
|
||||
@@ -99,51 +98,18 @@ namespace AzFramework::ProjectManager
|
||||
AZ::AllocatorInstance<AZ::SystemAllocator>::Create();
|
||||
}
|
||||
{
|
||||
const char projectsScript[] = "projects.py";
|
||||
AZStd::string filename = "o3de";
|
||||
AZ::IO::FixedMaxPath executablePath = AZ::Utils::GetExecutableDirectory();
|
||||
executablePath /= filename + AZ_TRAIT_OS_EXECUTABLE_EXTENSION;
|
||||
|
||||
AZ_Warning("ProjectManager", false, "No project provided - launching project selector.");
|
||||
|
||||
if (engineRootPath.empty())
|
||||
if (!AZ::IO::SystemFile::Exists(executablePath.c_str()))
|
||||
{
|
||||
AZ_Error("ProjectManager", false, "Couldn't find engine root");
|
||||
AZ_Error("ProjectManager", false, "%s not found", executablePath.c_str());
|
||||
return false;
|
||||
}
|
||||
auto projectManagerPath = engineRootPath / "scripts" / "project_manager";
|
||||
|
||||
if (!AZ::IO::SystemFile::Exists((projectManagerPath / projectsScript).c_str()))
|
||||
{
|
||||
AZ_Error("ProjectManager", false, "%s not found at %s!", projectsScript, projectManagerPath.c_str());
|
||||
return false;
|
||||
}
|
||||
AZ::IO::FixedMaxPathString executablePath;
|
||||
AZ::Utils::GetExecutablePathReturnType result = AZ::Utils::GetExecutablePath(executablePath.data(), executablePath.capacity());
|
||||
if (result.m_pathStored != AZ::Utils::ExecutablePathResult::Success)
|
||||
{
|
||||
AZ_Error("ProjectManager", false, "Could not determine executable path!");
|
||||
return false;
|
||||
}
|
||||
AZ::IO::FixedMaxPath parentPath(executablePath.c_str());
|
||||
auto exeFolder = parentPath.ParentPath();
|
||||
AZStd::fixed_string<8> debugOption;
|
||||
auto lastSep = exeFolder.Native().find_last_of(AZ_CORRECT_FILESYSTEM_SEPARATOR);
|
||||
if (lastSep != AZStd::string_view::npos)
|
||||
{
|
||||
exeFolder = exeFolder.Native().substr(lastSep + 1);
|
||||
}
|
||||
if (exeFolder == "debug")
|
||||
{
|
||||
// We need to use the debug version of the python interpreter to load up our debug version of our libraries which work with the debug version of QT living in this folder
|
||||
debugOption = "debug ";
|
||||
}
|
||||
AZ::IO::FixedMaxPath pythonPath = engineRootPath / "python";
|
||||
pythonPath /= AZ_TRAIT_AZFRAMEWORK_PYTHON_SHELL;
|
||||
auto cmdPath = AZ::IO::FixedMaxPathString::format("%s %s%s --executable_path=%s --parent_pid=%" PRIu32, pythonPath.Native().c_str(),
|
||||
debugOption.c_str(), (projectManagerPath / projectsScript).c_str(), executablePath.c_str(), AZ::Platform::GetCurrentProcessId());
|
||||
|
||||
AzFramework::ProcessLauncher::ProcessLaunchInfo processLaunchInfo;
|
||||
|
||||
processLaunchInfo.m_commandlineParameters = cmdPath;
|
||||
processLaunchInfo.m_showWindow = false;
|
||||
processLaunchInfo.m_commandlineParameters = executablePath.String();
|
||||
launchSuccess = AzFramework::ProcessLauncher::LaunchUnwatchedProcess(processLaunchInfo);
|
||||
}
|
||||
if (ownsSystemAllocator)
|
||||
|
||||
@@ -123,8 +123,9 @@ namespace AzFramework
|
||||
OctreeNode* insertCheck = this;
|
||||
while (insertCheck != nullptr)
|
||||
{
|
||||
if (AZ::ShapeIntersection::Contains(insertCheck->m_bounds, boundingVolume))
|
||||
if (AZ::ShapeIntersection::Contains(insertCheck->m_bounds, boundingVolume) || !insertCheck->m_parent)
|
||||
{
|
||||
// Insert here if the entry is fully contained or if we've reached the root node
|
||||
return insertCheck->Insert(octreeScene, entry);
|
||||
}
|
||||
insertCheck = insertCheck->m_parent;
|
||||
|
||||
Reference in New Issue
Block a user