In PostEditChangeProperty function, when I update my FVector propery (with metadata MakeEditWidget) the PropertyChangedEvent.Property is Null.
The function is called properly, but the Property is always null.
Could you please fix this ?
As a workaround I’m doing the stuff I need when “any” of the property are called but this is not efficient at all.
Could you post a screenshot of how you’re making the call to PostEditChangeProperty? Do you have the same null return on 4.7.2 as well? Any additional information that would help me reproduce this on my end would also be helpful.
edit: I was able to get around this by just checking when Property is invalid and manually checking if my properties have been changed. It’s hacky, but works.
Could you post a screenshot of how you’re making the call to PostEditChangeProperty? Any additional information on the setup you’re using or how you’re using the result from the call or that would help me reproduce this on my end would also be helpful.
Build
Go in the editor, drop your actor in the map.
you will see the diamond to change the value. Drag and Drop it. The postEditChangeProperty will be called and the property name will be null.
I was able to reproduce the NULL property and have entered a bug report (UE-12015) for further investigation. For the time being I would encourage continuing to use the current workaround you mentioned in your original post.
According to the PostEditMove() signature, which is declared in AActor class
virtual void PostEditMove
(
bool bFinished
)
it’s not supposed to notify which property was changed (or which widget was moved) and I think the problem of is that he wants to fire a time consuming procedure when the special property has changed.
By the way, I’m experiencing the same problem with NULL pointer. I have UE4.7.2 built from sources.
I took another look at this issue, and there does appear to be something unusual happening. When I dragged the Test1 widget around in the viewport, the PropertyChangedEvent.Property was NULL, but if I entered new X, Y, or Z values for Test1 directly into the Details panel, then PropertyChangedEvent.Property appeared to have a valid value. This was also only occurring when I was simulating in the viewport. I have updated the report that submitted with the new information I observed that should help with the investigation.
Also, just to provide some additional clarification, PostEditMove won’t work in this case because that is only called when the entire object is moved in the scene. PostEditChangeProperty is called when only the values for Test1 are changed. I am guessing that when the suggestion to try PostEditMove was given to , it was based on a misunderstanding of what was being moved.
I ran into this myself today! (On UE 4.11)
The editor is running FEdMode::InputDelta and in there it calls the post edit change commands with null as the property:
EDIT: This is fixed in 4.12 as of preview 4.
The epic code change is similar to the below but requires a few other changes. To get you through until then you can try the below.
If you have full source code, you can make a change to make this work.
The first caveat I will add is I have no idea what side effects this might have, but hopefully someone from Epic can chime in to see what they think and if all is fine apply the fix as well.
Note the if (bEditedPropertyIsTransform) in the middle has not changed. What Ive done is before the if get the Property and then called the PreEditChange like before but with the property and after the if passed the property to the PostEditChange.
Do you still see this occurring in 4.12 Preview 4 (released earlier today)? I just tested our test case there and it appears to be working correctly. I also checked 4.11.2, and it was not working in that version. It looks like 4.12 should have this corrected for you.