Description

Since UE5.0, cannot edit double variables in property matrix. In UE4.27, it worked correctly and could be edited from the property matrix. This is because double variables are not supported in SPropertyEditorTableRow::ConstructPropertyEditorWidget. Until UE4.27, the float of Blueprint Variable was treated as a "float", but since UE5.0, it is treated as a "double" internally. Therefore, "float variable parameter" cannot be edited. It is allowed by applying the following workaround. 

 

Workaround:

TSharedRef<SWidget> SPropertyEditorTableRow::ConstructPropertyEditorWidget()
{
		//...

		// ORDER MATTERS: first widget type to support the property node wins!
		if ( SPropertyEditorNumeric<float>::Supports(PropertyEditorRef) )
		{
			TSharedRef<SPropertyEditorNumeric<float>> TempWidget = SAssignNew(PropertyWidget, SPropertyEditorNumeric<float>, PropertyEditorRef );
			TempWidget->GetDesiredWidth(MinDesiredWidth, MaxDesiredWidth);
		}
		//add start
		else if (SPropertyEditorNumeric<double>::Supports(PropertyEditorRef))
		{
			TSharedRef<SPropertyEditorNumeric<double>> TempWidget = SAssignNew(PropertyWidget, SPropertyEditorNumeric<double>, PropertyEditorRef);
			TempWidget->GetDesiredWidth(MinDesiredWidth, MaxDesiredWidth);
		}
		//add end
}

TSharedRef<SWidget> FTextPropertyTableCellPresenter::ConstructEditModeCellWidget()
{
		// ...

		// ORDER MATTERS: first widget type to support the property node wins!
		if ( SPropertyEditorNumeric<float>::Supports(PropertyEditor) )
		{
			PropertyWidget = SNew( SPropertyEditorNumeric<float>, PropertyEditor )
				.Font( Font );
		}
// add start
		else if (SPropertyEditorNumeric<double>::Supports(PropertyEditor))
		{
			PropertyWidget = SNew(SPropertyEditorNumeric<double>, PropertyEditor)
				.Font(Font);
		}
// add end
}

bool FTextPropertyTableCellPresenter::CalculateIfUsingReadOnlyEditingWidget() const
{
		//...

		// ORDER MATTERS: first widget type to support the property node wins!
		if (SPropertyEditorNumeric<float>::Supports(PropertyEditor) || 
//add start
			SPropertyEditorNumeric<double>::Supports(PropertyEditor) ||
//add end
}

 

Steps to Reproduce
  1. Add float variable parameter in blueprint asset
  2. Open blueprint asset with property matrix

Then, can't allow to edit float variable parameter

 

Have Comments or More Details?

There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-196901 in the post.

3
Login to Vote

Backlogged
ComponentUE - Editor - Workflow Systems
Affects Versions5.15.25.3
CreatedOct 2, 2023
UpdatedJan 19, 2024
View Jira Issue