From dd5bffe8d7ba598bf5c86cd54637718c740c7a7c Mon Sep 17 00:00:00 2001 From: JoseMartinez <44341347+JoseM98@users.noreply.github.com> Date: Mon, 19 Feb 2024 16:34:48 +0100 Subject: [PATCH] Fixing commandlet argument values. --- .../Python/set_proper_position_for_world_partition.py | 4 ++-- .../SetProperPositionForWorldPartitionCommandlet.cpp | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Unreal/CarlaUE4/Plugins/CarlaTools/Content/Python/set_proper_position_for_world_partition.py b/Unreal/CarlaUE4/Plugins/CarlaTools/Content/Python/set_proper_position_for_world_partition.py index 5fdc1f54a..8472d474f 100644 --- a/Unreal/CarlaUE4/Plugins/CarlaTools/Content/Python/set_proper_position_for_world_partition.py +++ b/Unreal/CarlaUE4/Plugins/CarlaTools/Content/Python/set_proper_position_for_world_partition.py @@ -23,13 +23,13 @@ argparser.add_argument( help='String to put as arguments') args = argparser.parse_args() -arguments = args.paramstring +arguments = args.paramstring.split() if os.name == "nt": sys_name = "Win64" editor_path = "%s/Engine/Binaries/%s/UnrealEditor" % (ue4_path, sys_name) command = [editor_path, uproject_path, run] - command.extend(arguments) + command = command + arguments print("Commandlet:", command) print("Arguments:", arguments) subprocess.check_call(command, shell=True) diff --git a/Unreal/CarlaUE4/Plugins/CarlaTools/Source/CarlaTools/Private/Commandlet/SetProperPositionForWorldPartitionCommandlet.cpp b/Unreal/CarlaUE4/Plugins/CarlaTools/Source/CarlaTools/Private/Commandlet/SetProperPositionForWorldPartitionCommandlet.cpp index 0a771190f..0fd29c4be 100644 --- a/Unreal/CarlaUE4/Plugins/CarlaTools/Source/CarlaTools/Private/Commandlet/SetProperPositionForWorldPartitionCommandlet.cpp +++ b/Unreal/CarlaUE4/Plugins/CarlaTools/Source/CarlaTools/Private/Commandlet/SetProperPositionForWorldPartitionCommandlet.cpp @@ -6,6 +6,9 @@ #include "Commandlet/SetProperPositionForWorldPartitionCommandlet.h" +#include +#include + #if WITH_EDITOR #include "FileHelpers.h" #endif @@ -79,7 +82,7 @@ int32 USetProperPositionForWorldPartitionCommandlet::Main(const FString &Params) UE_LOG(LogCarlaToolsMapSetProperPositionForWorldPartitionCommandlet, Error, TEXT("Largemapmanager not found ")); } - UEditorLoadingAndSavingUtils::SaveDirtyPackages(true, true); + //UEditorLoadingAndSavingUtils::SaveDirtyPackages(true, true); UEditorLevelLibrary::SaveCurrentLevel(); return 0;