Description

When using the transform widget in the editor, the Property value of a PostEditChangeProperty() call will be NULL.

The transform widget that is being moved in this case is the widget attached to the Test1 property. When this widget is moved from within the viewport, the PropertyChangedEvent.Property is NULL. However, when the position of the widget is set within the details panel, the PropertyChangedEvent.Property value is valid. This is seen when simulating the project within the Editor viewport.

Steps to Reproduce
  1. Open UE4 Editor (any project)
  2. Add a new code class to project based on Actor
  3. In header file add the following:
    UPROPERTY(EditAnywhere, Category = Test, BlueprintReadWrite, meta = (MakeEditWidget = ""))
    		FVector Test1;
    
    	virtual void PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent) override;
    
  4. In the source file add the following:
    void AMyActor::PostEditChangeProperty(FPropertyChangedEvent& PropertyChangedEvent)
    {
    	if (PropertyChangedEvent.Property != NULL)
    	{
    		UE_LOG(LogTemp, Warning, TEXT("Its a me! Mario!"));
    	}
    	else
    	{
    		UE_LOG(LogTemp, Warning, TEXT("King of Second Bananas - Luigi"));
    	}
    
    	Super::PostEditChangeProperty(PropertyChangedEvent);
    }
    
  5. Compile the project
  6. In the Editor, create a Blueprint of the new Actor class.
  7. Add an instance of the new Blueprint to the scene.
  8. Start Simulate mode.
  9. Select the widget diamond in the center of the actor and move it.
    • Note: The position of the object itself should not change, only the diamond widget representing the position of the Test1 FVector property should move.

Result:
The "else" portion of the above code will be printed to the Output Log while moving the widget. Clicking the yellow arrow next to Test1 in the detail panel to reset the widget position will trigger correctly and print the "if" portion.

Have Comments or More Details?

Head over to the existing Questions & Answers thread and let us know what's up.

0
Login to Vote

Cannot Reproduce
ComponentUE - Gameplay
Affects Versions4.7.34.8
Target Fix4.12
Fix Commit2853930
Main Commit2855709
CreatedMar 17, 2015
ResolvedMar 24, 2016
UpdatedApr 27, 2018