Moving Components in Editor Instances Has No Callback
We are running Unreal 4.11 and I have run into a bug where if you move a scene component that is not the root component of an actor that none of the expected callbacks are called.
In the blueprint editor, moving a non root scene component (You obviously cannot move the root component), causes the component to have PostEditComponentMove called on it. You can see this in FSCSEditorViewportClient::InputWidgetDelta.
However this function is only called in other place, on the root component when the actor itself moves. So doing the same action (moving a sub component) in the actual editor viewport does not trigger this code.
When you edit the actual transform values in the property window (via the numbers), both the blueprint editor and the main editor scene both call FComponentTransformDetails::OnSetLocation which in turn call PostEditChangeProperty on the component.
When you drag the sub component in the level editor window on an instance the equivalent InputWidgetDelta function is FLevelEditorViewportClient::InputWidgetDelta. To do its work, it then calls ApplyDeltaToActors which hits an if part way to do, which splits its functionality between if you have components selected or actors selected :
In the ApplyDeltaToActor case it calls the GEditor->ApplyDeltaToActor function which in turn calls PostEditMove on that actor at the end.
In ApplyDeltaToComponent is calls GEditor->ApplyDeltaToComponent. This function does not call PostEditComponentMove (and this function is also used as part of FSCSEditorViewportClient::InputWidgetDelta).
I am not sure if the fix is to simply add a PostEditComponentMove callback to FLevelEditorViewportClient::ApplyDeltaToComponent or a bigger change. But it would be nice to have consistent behaviour or at least a way to catch changes to the transform of a sub component.
Has this been resolved? I'm still experiencing the same issue where MyCustomComponent::PostEditComponentMove is not firing when manipulating it in editor viewport.
The owning Actor's PostEditMove is being called, but unfortunately that doesn't provide me with the information I'm looking for ie. which component has just been moved.
answered May 15 '18 at 05:41 PM
Thank you for the clarification. I was able to reproduce the issue and have submitted the bug report UE-30945 for investigation.
answered May 18 '16 at 02:20 PM
Follow this question
Once you sign in you will be able to subscribe for any updates here