Hide some internal Python types from the class picker

#jira UE-90946
#rb Dan.OConnor
#rnx

#ROBOMERGE-SOURCE: CL 12320749 in //UE4/Release-4.25/... via CL 12320881
#ROBOMERGE-BOT: RELEASE (Release-4.25Plus -> Main) (v670-12295787)

[CL 12320977 by jamie dale in Main branch]
This commit is contained in:
jamie dale
2020-03-19 19:24:18 -04:00
parent 2256ac9ff0
commit 8818a60da4
3 changed files with 6 additions and 2 deletions

View File

@@ -12,7 +12,7 @@
* UObject proxy base used to wrap a callable Python object so that it can be used with an Unreal delegate
* @note This can't go inside the WITH_PYTHON block due to UHT parsing limitations (it doesn't understand that macro)
*/
UCLASS()
UCLASS(HideDropDown)
class UPythonCallableForDelegate : public UObject, public IPythonResourceOwner
{
GENERATED_BODY()

View File

@@ -2026,6 +2026,7 @@ PyTypeObject* FPyWrapperTypeRegistry::GenerateWrappedDelegateType(const UFunctio
PythonCallableForDelegateFunc->StaticLink(true);
PythonCallableForDelegateClass->AddFunctionToFunctionMap(PythonCallableForDelegateFunc, PythonCallableForDelegateFunc->GetFName());
PythonCallableForDelegateClass->SetSuperStruct(UPythonCallableForDelegate::StaticClass());
PythonCallableForDelegateClass->ClassFlags |= CLASS_HideDropDown;
PythonCallableForDelegateClass->Bind();
PythonCallableForDelegateClass->StaticLink(true);
PythonCallableForDelegateClass->AssembleReferenceTokenStream();

View File

@@ -67,6 +67,7 @@ public:
// Don't allow classes from a loaded map (e.g. LSBPs) unless we're already working inside that package context. Otherwise, choosing the class would lead to a GLEO at save time.
Result &= !ClassPackage->ContainsMap() || ClassPackage == GraphPinOutermostPackage;
Result &= !InClass->HasAnyClassFlags(CLASS_Hidden | CLASS_HideDropDown | CLASS_Deprecated);
Result &= bAllowAbstractClasses || !InClass->HasAnyClassFlags(CLASS_Abstract);
}
@@ -75,7 +76,9 @@ public:
virtual bool IsUnloadedClassAllowed(const FClassViewerInitializationOptions& InInitOptions, const TSharedRef< const IUnloadedBlueprintData > InUnloadedClassData, TSharedRef< FClassViewerFilterFuncs > InFilterFuncs) override
{
return (InFilterFuncs->IfInChildOfClassesSet( AllowedChildrenOfClasses, InUnloadedClassData) != EFilterReturn::Failed) && (bAllowAbstractClasses || !InUnloadedClassData->HasAnyClassFlags(CLASS_Abstract));
return (InFilterFuncs->IfInChildOfClassesSet( AllowedChildrenOfClasses, InUnloadedClassData) != EFilterReturn::Failed)
&& (!InUnloadedClassData->HasAnyClassFlags(CLASS_Hidden | CLASS_HideDropDown | CLASS_Deprecated))
&& (bAllowAbstractClasses || !InUnloadedClassData->HasAnyClassFlags(CLASS_Abstract));
}
};