Oh, you mean when in my code? Well, the whole script is used to that purpose only, so all of it should execute, actually.
I'm not painting, that would be incredibly difficult and probably slow to do with GDScript. I just place meshes on other meshes, because placing grass in a huge map is imposible with Godot's 3D preview.
I posted a video on YouTube to demonstrate how it works. I want to release it later as a tool to populate maps with vegetation, but if I can't add them to the editor that's kind of a problem.
Here's the video. It has a lot of potential because you can spawn things in a ring around the player to create all sorts of effects with billboards and particles. If you want the project to see if you can make it work, that would be awesome.
I want to create those nodes into the editor tree so later it can be used to spawn other things with the same script, just changing the target and some parameters. So with 3 executions you can have grass, bushes and trees in no time.
Now that I think about it, it doesn't need to run in the editor. All I need is that the nodes created at runtime get to be stored with the scene. That would be preferable, so the user can roam around to see if the map looks good, then when the game is stopped the nodes should be there to save with the rest of the scene.