You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#jira UE-139657 #rb JeanLuc.Conrenthin #preflight 61eadf80e4313f36f01f184f #ROBOMERGE-AUTHOR: benoit.deschenes #ROBOMERGE-SOURCE: CL 18690570 in //UE5/Release-5.0/... via CL 18690588 via CL 18690597 #ROBOMERGE-BOT: UE5 (Release-Engine-Test -> Main) (v903-18687472) [CL 18690625 by benoit deschenes in ue5-main branch]
46 lines
1.8 KiB
C++
46 lines
1.8 KiB
C++
// Copyright Epic Games, Inc. All Rights Reserved.
|
|
|
|
#include "DatasmithSceneDetails.h"
|
|
|
|
#include "DatasmithAssetImportData.h"
|
|
#include "DatasmithContentEditorModule.h"
|
|
#include "DatasmithScene.h"
|
|
|
|
#include "DetailCategoryBuilder.h"
|
|
#include "DetailLayoutBuilder.h"
|
|
#include "DetailWidgetRow.h"
|
|
#include "PropertyHandle.h"
|
|
#include "Widgets/SBoxPanel.h"
|
|
#include "Widgets/SWidget.h"
|
|
#include "Widgets/Input/SEditableText.h"
|
|
#include "Widgets/Text/STextBlock.h"
|
|
|
|
#define LOCTEXT_NAMESPACE "DatasmithSceneDetails"
|
|
|
|
void FDatasmithSceneDetails::CustomizeDetails(IDetailLayoutBuilder& DetailBuilder)
|
|
{
|
|
TArray< TWeakObjectPtr< UObject > > Objects;
|
|
DetailBuilder.GetObjectsBeingCustomized( Objects );
|
|
check( Objects.Num() > 0 );
|
|
UDatasmithScene* DatasmithScene = Cast< UDatasmithScene >( Objects[0].Get() );
|
|
check( DatasmithScene );
|
|
|
|
static_assert( TIsSame< typename TRemovePointer< typename TRemoveObjectPointer<decltype( UDatasmithScene::AssetImportData )>::Type >::Type, UDatasmithSceneImportData >::Value, "Please update this details customization" );
|
|
static_assert( TIsDerivedFrom < UDatasmithSceneImportData, UAssetImportData >::IsDerived, "Please update this details customization" );
|
|
|
|
TSharedRef< IPropertyHandle > AssetImportDataPropertyHandle = DetailBuilder.GetProperty( GET_MEMBER_NAME_CHECKED( UDatasmithScene, AssetImportData ) );
|
|
TSharedPtr< IPropertyHandle > SourceDataHandle = AssetImportDataPropertyHandle->GetChildHandle(GET_MEMBER_NAME_CHECKED(UAssetImportData, SourceData));
|
|
if (SourceDataHandle)
|
|
{
|
|
// We don't want the default editable file selection UI, user should use the Source URI.
|
|
SourceDataHandle->MarkHiddenByCustomization();
|
|
}
|
|
}
|
|
|
|
void FDatasmithSceneDetails::CustomizeDetails(const TSharedPtr<IDetailLayoutBuilder>& DetailBuilder)
|
|
{
|
|
CustomizeDetails( *DetailBuilder );
|
|
}
|
|
|
|
#undef LOCTEXT_NAMESPACE
|