Preparation for the submission of the plugin to marketplace, fixed a bug with the cmdlet path not being valid.

This commit is contained in:
Joseff 2023-04-26 18:28:24 +02:00
parent 52c3f01f5d
commit 668fc9f10f
17 changed files with 22 additions and 12 deletions

View file

@ -107,6 +107,9 @@ class UnrealPrelaunchHook(PreLaunchHook):
f"project [ {unreal_project_name} ]"
))
import openpype.hosts.unreal.lib as ue_lib
path = ue_lib.get_path_to_cmdlet_project(engine_version)
q_thread = QtCore.QThread()
ue_project_worker = UEProjectGenerationWorker()
ue_project_worker.setup(

View file

@ -0,0 +1,10 @@
# Building the plugin
In order to successfully build the plugin, make sure that the path to the UnrealBuildTool.exe is specified correctly.
After the UBT path specify for which platform it will be compiled. in the -Project parameter, specify the path to the
CommandletProject.uproject file. Next the build type has to be specified (DebugGame, Development, Package, etc.) and then the -TargetType (Editor, Runtime, etc.)
`BuildPlugin_[Ver].bat` runs the building process in the background. If you want to show the progress inside the
command prompt, use the `BuildPlugin_[Ver]_Window.bat` file.

View file

@ -3,7 +3,6 @@
#include "AyonAssetContainer.h"
#include "AssetRegistryModule.h"
#include "Misc/PackageName.h"
#include "Engine.h"
#include "Containers/UnrealString.h"
UAyonAssetContainer::UAyonAssetContainer(const FObjectInitializer& ObjectInitializer)

View file

@ -2,8 +2,6 @@
#pragma once
#include "Engine.h"
class FAyonModule : public IModuleInterface
{

View file

@ -1,7 +1,6 @@
// Copyright 2023, Ayon, All rights reserved.
#pragma once
#include "Engine.h"
#include "AyonLib.generated.h"

View file

@ -1,6 +1,5 @@
// Copyright 2023, Ayon, All rights reserved.
#pragma once
#include "Engine.h"
#include "AyonPythonBridge.generated.h"
UCLASS(Blueprintable)

View file

@ -3,7 +3,6 @@
// and will be removed in next versions of Ayon.
#pragma once
#include "Engine.h"
#include "OpenPypePublishInstance.generated.h"

View file

@ -0,0 +1 @@
D:\UE4\UE_4.27\Engine\Build\BatchFiles\RunUAT.bat BuildPlugin -plugin="D:\OpenPype\openpype\hosts\unreal\integration\UE_4.27\Ayon\Ayon.uplugin" -Package="D:\BuiltPlugins\4.27"

View file

@ -0,0 +1 @@
cmd /k "BuildPlugin_4-27.bat"

View file

@ -3,7 +3,6 @@
// and will be removed in next versions of Ayon.
#pragma once
#include "Engine.h"
#include "OpenPypePublishInstance.generated.h"

View file

@ -0,0 +1 @@
"C:\Program Files\Epic Games\UE_5.0\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -plugin="D:\OpenPype\openpype\hosts\unreal\integration\UE_5.0\Ayon\Ayon.uplugin" -Package="D:\BuiltPlugins\5.0"

View file

@ -0,0 +1 @@
cmd /k "BuildPlugin_5-0.bat"

View file

@ -58,7 +58,7 @@ void UOpenPypePublishInstance::OnAssetCreated(const FAssetData& InAssetData)
if (!IsValid(Asset))
{
UE_LOG(LogAssetData, Warning, TEXT("Asset \"%s\" is not valid! Skipping the addition."),
*InAssetData.ObjectPath.ToString());
*InAssetData.GetSoftObjectPath().ToString());
return;
}

View file

@ -3,7 +3,6 @@
// and will be removed in next versions of Ayon.
#pragma once
#include "Engine.h"
#include "OpenPypePublishInstance.generated.h"

View file

@ -0,0 +1 @@
"D:\UE_5.1\Engine\Build\BatchFiles\RunUAT.bat" BuildPlugin -plugin="D:\OpenPype\openpype\hosts\unreal\integration\UE_5.1\Ayon\Ayon.uplugin" -Package="D:\BuiltPlugins\5.1"

View file

@ -0,0 +1 @@
cmd /k "BuildPlugin_5-1.bat"

View file

@ -323,12 +323,11 @@ def get_path_to_uat(engine_path: Path) -> Path:
def get_path_to_cmdlet_project(ue_version: str) -> Path:
cmd_project = Path(os.path.dirname(
os.path.abspath(os.getenv("OPENPYPE_ROOT"))))
cmd_project = Path(os.getenv("OPENPYPE_ROOT"))
# For now, only tested on Windows (For Linux and Mac
# it has to be implemented)
cmd_project /= f"hosts/unreal/integration/UE_{ue_version}"
cmd_project /= f"openpype/hosts/unreal/integration/UE_{ue_version}"
return cmd_project / "CommandletProject/CommandletProject.uproject"