# How can I get spline points selected in editor

**URL:** <https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443>\
**Category:** Mobile\
**Tags:** unreal-engine, editor, CPP, question\
**Created:** [June 5, 2017, 2:26am UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443 "2017-06-05T02:26:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jgibbs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jgibbs](https://forums.unrealengine.com/u/Jgibbs)\
**Post date:** [June 5, 2017, 2:26am UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443/1 "2017-06-05T02:26:28Z")

</div>

I’m working on a plugin that alters splines in the editor, and I need to be able to adjust the points on the spline that the user has selected.

I have a ptr to the USplineComponent and can adjust all of the points, and now just need to know which ones the user has highlighted with multi-select to modify only those elements.

It seems that the FSplineComponentVisualizer has the functionality I need, but I can’t figure out a) if that’s really what I need, and b) how to get it compiled and access the visualizer that’s attached to the spline that’s being used.

Thanks

---

<div class="post-metadata">

**Author:** ![Teiwaz](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Teiwaz](https://forums.unrealengine.com/u/Teiwaz)\
**Post date:** [June 5, 2017, 10:22pm UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443/2 "2017-06-05T22:22:53Z")

</div>

You’re going to need to do that inside the component visualizer. The selected spline points aren’t “real” objects, they’re hit proxies which will be intercepting user input in the editor and interpreting that data to manipulate the spline’s array of spline points directly.

Give this a read for how they work:

> **[A new, community-hosted Unreal Engine Wiki](https://forums.unrealengine.com/t/a-new-community-hosted-unreal-engine-wiki/141494)**
>
> After over a year in maintenance mode, the official Unreal Engine Wiki is now permanently offline. These resources now live on a new community-run Unreal Engine Community Wiki — ue4community.wiki! You will be able to find content from the official...

I assume your plugin already has an editor module. What you’re going to need to do is create a new FSplineComponentVisualizer, unbind the default visualizer for the spline via GUnrealEd-\>UnregisterComponentVisualizer in your module’s startup code and then bind your new version with the additional functionality. You might also need to tweak your plugin load order to ensure that this happens after the normal binding, but I’d expect that to probably be okay by default.

---

<div class="post-metadata">

**Author:** ![Jgibbs](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jgibbs](https://forums.unrealengine.com/u/Jgibbs)\
**Post date:** [June 6, 2017, 7:58am UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443/3 "2017-06-06T07:58:23Z")

</div>

Thanks for the info. I don’t already have an editor module, but your comments helped me derive the solution that I was hoping to end up with.

For the benefit of others, I just needed to get access to the current spline visualizer to access its info. That was achieved with the following code:

TSharedPtr\< FSplineComponentVisualizer \> SplineVisualiser = StaticCastSharedPtr\< FSplineComponentVisualizer \>( GUnrealEd-\>FindComponentVisualizer( USplineComponent::StaticClass() ) );

---

<div class="post-metadata">

**Author:** ![Scylardor4242](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Scylardor4242](https://forums.unrealengine.com/u/Scylardor4242)\
**Post date:** [June 5, 2019, 10:15pm UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443/4 "2019-06-05T22:15:32Z")

</div>

Thanks a ton for this answer !  
As a side note : to be able to compile this answer, I had to :

- Add “ComponentVisualizers” to my editor PublicDependencyModuleNames in the project’s Build.cs
- Add some includes for the compiler to know all types and variables it’s using:  
#include “Editor/UnrealEdEngine.h”  
#include “UnrealEdGlobals.h”  
#include “SplineComponentVisualizer.h”

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [February 8, 2024, 9:58pm UTC](https://forums.unrealengine.com/t/how-can-i-get-spline-points-selected-in-editor/395443/5 "2024-02-08T21:58:52Z")

</div>

in case someone is looking for this  
[https://www.sondreutheim.com/post/ue4\_component\_visualizers](https://www.sondreutheim.com/post/ue4_component_visualizers)

> **[Component Visualizers | Unreal Engine Community Wiki](https://unrealcommunity.wiki/component-visualizers-xaa1qsng)**
>
> Component visualizers allow you to visualize and edit otherwise non-rendering component data in the editor viewport.
