Hide BlueprintInternalUseOnly and CustomThunk functions from Python

BlueprintInternalUseOnly functions are usually designed to be called via a K2 node wrapper, which may provide additional sanitization or data transformation (which Python is unaware of, so cannot mimic).

CustomThunk functions rely on popping Bytecode data off the stack, but Python calls functions natively so there is no Bytecode available and these functions will crash. We hope to address CustomThunk support in the future by synthesizing the correct Bytecode.

#jira UE-69818
#rb none

#ROBOMERGE-OWNER: ryan.vance
#ROBOMERGE-AUTHOR: jamie.dale
#ROBOMERGE-SOURCE: CL 4951261 in //UE4/Release-4.22/... via CL 4951262
#ROBOMERGE-BOT: DEVVR (Main -> Dev-VR)

[CL 5026799 by jamie dale in Dev-VR branch]
This commit is contained in:
jamie dale
2019-02-16 03:51:38 -05:00
parent a05f3d114b
commit 8724eeae7f
2 changed files with 6 additions and 3 deletions

View File

@@ -57,10 +57,11 @@ const FName NotBlueprintTypeMetaDataKey = TEXT("NotBlueprintType");
const FName BlueprintSpawnableComponentMetaDataKey = TEXT("BlueprintSpawnableComponent");
const FName BlueprintGetterMetaDataKey = TEXT("BlueprintGetter");
const FName BlueprintSetterMetaDataKey = TEXT("BlueprintSetter");
const FName BlueprintInternalUseOnlyMetaDataKey = TEXT("BlueprintInternalUseOnly");
const FName CustomThunkMetaDataKey = TEXT("CustomThunk");
const FName DeprecatedPropertyMetaDataKey = TEXT("DeprecatedProperty");
const FName DeprecatedFunctionMetaDataKey = TEXT("DeprecatedFunction");
const FName DeprecationMessageMetaDataKey = TEXT("DeprecationMessage");
const FName CustomStructureParamMetaDataKey = TEXT("CustomStructureParam");
const FName HasNativeMakeMetaDataKey = TEXT("HasNativeMake");
const FName HasNativeBreakMetaDataKey = TEXT("HasNativeBreak");
const FName NativeBreakFuncMetaDataKey = TEXT("NativeBreakFunc");
@@ -1198,7 +1199,8 @@ bool IsScriptExposedFunction(const UFunction* InFunc)
&& InFunc->HasAnyFunctionFlags(FUNC_BlueprintCallable | FUNC_BlueprintEvent)
&& !InFunc->HasMetaData(BlueprintGetterMetaDataKey)
&& !InFunc->HasMetaData(BlueprintSetterMetaDataKey)
&& !InFunc->HasMetaData(CustomStructureParamMetaDataKey)
&& !InFunc->HasMetaData(BlueprintInternalUseOnlyMetaDataKey)
&& !InFunc->HasMetaData(CustomThunkMetaDataKey)
&& !InFunc->HasMetaData(NativeBreakFuncMetaDataKey)
&& !InFunc->HasMetaData(NativeMakeFuncMetaDataKey);
}

View File

@@ -46,7 +46,8 @@ namespace PyGenUtil
extern const FName BlueprintSpawnableComponentMetaDataKey;
extern const FName BlueprintGetterMetaDataKey;
extern const FName BlueprintSetterMetaDataKey;
extern const FName CustomStructureParamMetaDataKey;
extern const FName BlueprintInternalUseOnlyMetaDataKey;
extern const FName CustomThunkMetaDataKey;
extern const FName HasNativeMakeMetaDataKey;
extern const FName HasNativeBreakMetaDataKey;
extern const FName NativeBreakFuncMetaDataKey;