Godot version:
3.1.2.stable.custom_build
OS/device including version:
Linux 5.4.6-arch1-1 GNU/Linux
Issue description:
When a tool script adds a child to a node, you can see the node in the 3D view, but not in the scene tree.
Steps to reproduce:
Spatial rootMeshInstance and add a Meshextends Spatial
export(PackedScene) var scene: PackedScene setget set_scene,get_scene
func set_scene(val: PackedScene):
scene = val
add_child(scene.instance())
func get_scene():
return scene
PackedScene from step 2 in the scene field via the editorMinimal reproduction project:
example.zip

Wasn't this done by design to prevent persisting the added nodes to the scene file? I'm not sure.
That actually makes sense, and in my case I wouldn't want it persisted. Feel free to close if this is intentional.
Duplicate of #12456? Perhaps add_child's documentation should have a note mentioning set_owner added to it.
Duplicate of #12456? Perhaps
add_child's documentation should have a note mentioningset_owneradded to it.
good idea! Especially for beginners it's quite confusing when they start working on tools
Most helpful comment
Duplicate of #12456? Perhaps
add_child's documentation should have a note mentioningset_owneradded to it.