Copying //UE4/Dev-Editor to Dev-Main (//UE4/Dev-Main) for 4.23 From CL 6837861

#rb none

[CL 6838042 by Chris Gagnon in Main branch]
This commit is contained in:
Chris Gagnon
2019-06-04 15:42:48 -04:00
1442 changed files with 166056 additions and 6434 deletions

View File

@@ -1687,6 +1687,7 @@ void UPythonGeneratedClass::PostInitInstance(UObject* InObj)
}
}
void UPythonGeneratedClass::ReleasePythonResources()
{
PyType.Reset();
@@ -1696,6 +1697,12 @@ void UPythonGeneratedClass::ReleasePythonResources()
PyMetaData = FPyWrapperObjectMetaData();
}
bool UPythonGeneratedClass::IsFunctionImplementedInScript(FName InFunctionName) const
{
UFunction* Function = FindFunctionByName(InFunctionName);
return Function && Function->GetOuter() && Function->GetOuter()->IsA(UPythonGeneratedClass::StaticClass());
}
UPythonGeneratedClass* UPythonGeneratedClass::GenerateClass(PyTypeObject* InPyType)
{
// Get the correct super class from the parent type in Python

View File

@@ -196,6 +196,8 @@ public:
//~ IPythonResourceOwner interface
virtual void ReleasePythonResources() override;
virtual bool IsFunctionImplementedInScript(FName InFunctionName) const override;
/** Generate an Unreal class from the given Python type */
static UPythonGeneratedClass* GenerateClass(PyTypeObject* InPyType);