Skip to content

Commit 37afc4c

Browse files
author
Roberto De Ioris
committed
fixed transactions in commandlets
1 parent 4c47cbc commit 37afc4c

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎Source/UnrealEnginePython/Private/PyCommandlet.cpp‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@
33
#include "PyCommandlet.h"
44

55
#include "UEPyModule.h"
6+
#if WITH_EDITOR
7+
#include "Editor.h"
8+
#endif
69

710
#include "Regex.h"
811

@@ -16,6 +19,11 @@ int32 UPyCommandlet::Main(const FString& CommandLine)
1619
{
1720
FScopePythonGIL gil;
1821

22+
#if WITH_EDITOR
23+
// this allows commandlet's to use factories
24+
GEditor->Trans = GEditor->CreateTrans();
25+
#endif
26+
1927
TArray<FString> Tokens, Switches;
2028
TMap<FString, FString> Params;
2129
ParseCommandLine(*CommandLine, Tokens, Switches, Params);

0 commit comments

Comments
 (0)