From b9964bbb5a3c360b4ead64939b445c0ed698102e Mon Sep 17 00:00:00 2001 From: Twolewis Date: Wed, 7 Jul 2021 17:16:09 -0500 Subject: [PATCH] Fixed Material Editor not launching (#1920) * Fixed Material Editor not launching Explicitly providing project-path as part of launch parameters. Signed-off-by: Lloyd Tullues * Update Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> Signed-off-by: Lloyd Tullues * Minor - adding whitespace for consistency Signed-off-by: Lloyd Tullues Co-authored-by: Lloyd Tullues Co-authored-by: lumberyard-employee-dm <56135373+lumberyard-employee-dm@users.noreply.github.com> --- .../Code/Source/Material/EditorMaterialSystemComponent.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp index a8d6270c7e..efb79bb06c 100644 --- a/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp +++ b/Gems/AtomLyIntegration/CommonFeatures/Code/Source/Material/EditorMaterialSystemComponent.cpp @@ -130,6 +130,12 @@ namespace AZ arguments.append(QString("--rhi=%1").arg(apiName.GetCStr())); } + AZ::IO::FixedMaxPathString projectPath(AZ::Utils::GetProjectPath()); + if (!projectPath.empty()) + { + arguments.append(QString("--project-path=%1").arg(projectPath.c_str())); + } + AtomToolsFramework::LaunchTool("MaterialEditor", ".exe", arguments); }