Component visualisation resets when not selected

Ungalyant
Fri, 22 Jul 2016 12:15:43 +0000
Rendering

I’ve created a custom form of spline, that simply inherits from spline component and adds a handful of variables. I’ve made an editor module and a component visualiser for this custom component and it all seems to work fine. However, the issue comes when I DON’T have the component selected, the visualiser seems to revert or reset to a default state when it’s not selected. Regardless of how many keys I have on the spline and where I position them, when not selected, it simply shows 2 keys 100 units away from each other as splines are when they are first put in.

Obviously this issue doesn’t happen with normal splines, but the odd thing is my custom spline inherits from spline, and my visualiser is literally a copy paste (exactly) of the spline visualiser, again adding 3 commands for the right click menu; changing the GetEditedSpline() to return the type of my custom spline; and 3 lines in the visualiser:

if ((KeyIdx == 0 && SplineComp->bDeadStart) ||
     (KeyIdx == NumSegments && SplineComp->bDeadEnd))
{
	KeyColor = (KeyColor.ReinterpretAsLinear() * FLinearColor(1, 0.5f, 0.5f, 1)).ToFColor(true);
}

Here’s a gif of the issue:

Does anyone have any ideas why this might be? I’ve tried searching the source code for any references to the spline visualisation that might be getting added/changed that I haven’t done with my own, but to no avail.

3 posts - 1 participant