Description

The SplineComponentVisualizer allows users to alt+drag on a spline point to duplicate it. When this is done on the last point of a spline marked as "closed-loop", the new point is correctly added at the end of the array inside the spline itself, but its associated metadata is incorrectly inserted at position 0 instead, which means that all of the existing metadata becomes offset by one and no longer matches up to the spline points.

This bug affects UCineSplineComponent from plugin "CineCameraRigs", UWaterSplineComponent from plugin "Water", and any other licensee-defined classes deriving from USplineComponent that attempt to use spline metadata with closed-loop splines.

As detected by the UDN member in the linked case, the cause of the problem seems to be a simple mistake in file [Engine\Source\Editor\ComponentVisualizers\Private\SplineComponentVisualizer.cpp], method FSplineComponentVisualizer::SplitSegment(). Please see the linked case for the relevant code snippet.

Steps to Reproduce
  • Using plugin "Water"
  • Enable plugin
  • Create a "Water Body Lake" actor
  • This actor contains a "Water Spline Component" that is always closed-loop. Select it.
  • On the details panel, under category "Selected Points":
  • Click on the icon "Select First Spline Point"
  • Change "Water – Velocity" to something different, like 1000.0
  • Click on the icon "Select Last Spline Point"
  • On the level editor viewport:
  • If the translation gizmo is not at the selected point (shown in orange), click on it to place the gizmo there (this is another bug)
  • Alt+translate this last point to duplicate it
  • On the details panel, under category "Selected Points":
  • Select the first spline point again and note that "Velocity" is not at the previously set value
  • Select the next (second) spline point and note that "Velocity" has the value that was previously set on the first point
  • Using plugin "CineCameraRigs"
  • Enable plugin
  • Create a "Cine Camera Rig Rail" actor
  • This actor contains a "Cine Spline Component". Select it and enable "Closed Loop" in the details panel.
  • On the details panel, under category "Selected Points":
  • Click on the icon "Select First Spline Point"
  • Change "CineSplinePointData – Focal Length" to something different, like 100.0
  • Click on the icon "Select Last Spline Point"
  • On the level editor viewport:
  • If the translation gizmo is not at the selected point (shown in orange), click on it to place the gizmo there (this is another bug)
  • Alt+translate this last point to duplicate it
  • On the details panel, under category "Selected Points":
  • Select the first spline point again and note that "Focal Length" is not at the previously set value
  • Select the next (second) spline point and note that "Focal Length" has the value that was previously set on the first point

Have Comments or More Details?

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

1
Login to Vote

Backlogged
ComponentUE - Editor - Workflow Systems
Affects Versions5.3
CreatedNov 1, 2023
UpdatedJan 20, 2024
View Jira Issue