FDetailPropertyRow::FDetailPropertyRow(TSharedPtr<FPropertyNode> InPropertyNode, TSharedRef<FDetailCategoryImpl> InParentCategory, TSharedPtr<FPropertyNode> InExternalRootNode ) : CustomIsEnabledAttrib( true ) , PropertyNode( InPropertyNode ) , ParentCategory( InParentCategory ) , ExternalRootNode( InExternalRootNode ) , bShowPropertyButtons( true ) , bShowCustomPropertyChildren( true ) , bForceAutoExpansion( false ) { if( InPropertyNode.IsValid() ) { TSharedRef<FPropertyNode> PropertyNodeRef = PropertyNode.ToSharedRef(); UProperty* Property = PropertyNodeRef->GetProperty(); PropertyHandle = InParentCategory->GetParentLayoutImpl().GetPropertyHandle(PropertyNodeRef); const TSharedRef<IPropertyUtilities> Utilities = InParentCategory->GetParentLayoutImpl().GetPropertyUtilities(); if (PropertyNode->AsCategoryNode() == NULL) { MakePropertyEditor(PropertyNodeRef, Utilities, PropertyEditor); } if (PropertyNode->GetPropertyKeyNode().IsValid()) { MakePropertyEditor(PropertyNode->GetPropertyKeyNode().ToSharedRef(), Utilities, PropertyKeyEditor); } // Check if the property is valid for type customization. Note: Static arrays of types will be a UProperty with array elements as children if (!PropertyEditorHelpers::IsStaticArray(*PropertyNodeRef)) { static FName NAME_PropertyEditor("PropertyEditor"); FPropertyEditorModule& PropertyEditorModule = FModuleManager::GetModuleChecked<FPropertyEditorModule>(NAME_PropertyEditor); IDetailsViewPrivate& DetailsView = InParentCategory->GetDetailsView(); TSharedRef<IDetailsView> DetailsViewPtr = StaticCastSharedRef<IDetailsView>( DetailsView.AsShared() ); FPropertyTypeLayoutCallback LayoutCallback = PropertyEditorModule.GetPropertyTypeCustomization(Property,*PropertyHandle, DetailsViewPtr ); if (LayoutCallback.IsValid()) { if (PropertyHandle->IsValidHandle()) { CustomTypeInterface = LayoutCallback.GetCustomizationInstance(); } } } } }
FDetailCategoryImpl::FDetailCategoryImpl( FName InCategoryName, TSharedRef<FDetailLayoutBuilderImpl> InDetailLayout ) : DetailLayoutBuilder( InDetailLayout ) , CategoryName( InCategoryName ) , HeaderContentWidget( NULL ) , SortOrder( 0 ) , bRestoreExpansionState( true ) , bShouldBeInitiallyCollapsed( false ) , bUserShowAdvanced( false ) , bForceAdvanced( false ) , bHasFilterStrings( false ) , bHasVisibleDetails( true ) { const UClass* BaseClass = InDetailLayout->GetDetailsView().GetBaseClass(); // Use the base class name if there is one otherwise this is a generic category not specific to a class FName BaseClassName = BaseClass ? BaseClass->GetFName() : FName("Generic"); CategoryPathName = BaseClassName.ToString() + TEXT(".") + CategoryName.ToString(); GConfig->GetBool( TEXT("DetailCategoriesAdvanced"), *CategoryPathName, bUserShowAdvanced, GEditorUserSettingsIni ); }