Source code for adding points on a Line2D in editor

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By MangoTree

Hi,

I’ve tried looking for the source code which allows the adding of points to a Line2D node in the editor (and not the add_point() function). I have found this https://github.com/godotengine/godot/blob/master/scene/2d/line_2d.cpp but I don’t think that contains any code relating to what I’m looking for. Does anyone happen to know a link for the relevant source code page?

Thanks.

:bust_in_silhouette: Reply From: omggomb

It’s here:
https://github.com/godotengine/godot/blob/master/editor/plugins/line_2d_editor_plugin.cpp

Note that it inherits from an abstract class which seems to do all the UI stuff. It sets points directly instead of calling add_point

Thanks for the link!

MangoTree | 2019-05-14 18:13