You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A plugin (gdscript) that copies signals connections #3775
Describe the problem or limitation you are having in your project
When I create signals connections using a plugin, the SceneTreeDock connection icon/button isn't updated.
It's updated only when I switch to another scene and then go back or reload the saved scene.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A method to update SceneTreeDock would solve the problem.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
void EditorInterface.update_scene_tree_dock()
If this enhancement will not be used often, can it be worked around with a few lines of script?
A workaround would be to manually reload the scene (see above).
I also have an idea (from the plugin) to create a new empty scene then switch to it then close it, but this looks very hacky (ugly), and also I can't find an easy way how to close a scene from a plugin.
Upd:
I found a workaround to update node connections buttons (thanks to Zylann
suggested using update_tree()):
But I still think a similar method could be added/exposed and documented.
Also there are cases when the node added using a plugin/tool script is not displayed (but displayed when switching scenes).
In this case you can try EditorInterface.edit_node() or select the added node (EditorSelection.add_node())
Is there a reason why this should be core and not an add-on in the asset library?
Should be core to be able to update the SceneTreeDock controls from a plugin without hacks
The text was updated successfully, but these errors were encountered:
I recently found that changing the owner of a node that's already in the scene tree, will not update the scene tree either. That's the case whether the node already has an owner, or no owner. One workaround is to switch to another scene tab and back.
So having a way to tell the scene tree to update would help work around this. But...
Which does update the scene tree specifically.
Unfortunately, my use case is automatically generated NavigationRegion3D nodes, which I can't preview without them being visible in the scene tree. This is why I change the owner temporarily, to see them in the editor.
When I use that workaround, while they show in the tree, they STILL DONT show their navmesh. I have to click on them to see it. And when I set the owner back to null, the navmesh preview does not go away. I have to tab in and out of the scene for that to update.
Maybe this could be considered a bug and should be fixed, because in my case the owner change occurs within the custom node I'm making, so creating a plugin just to do that is quite tedious, and fixing the scene tree is not enough.
Does property_list_changed_notify() not affect the sceneTreeDock?
If I'm not mistaken, property changes have little to do with the scene tree, because the scene tree doesn't show properties? The documentation doesn't indicate much.
Describe the project you are working on
A plugin (gdscript) that copies signals connections
#3775
Describe the problem or limitation you are having in your project
When I create signals connections using a plugin, the SceneTreeDock connection icon/button isn't updated.
It's updated only when I switch to another scene and then go back or reload the saved scene.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
A method to update SceneTreeDock would solve the problem.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
void EditorInterface.update_scene_tree_dock()
If this enhancement will not be used often, can it be worked around with a few lines of script?
A workaround would be to manually reload the scene (see above).
I also have an idea (from the plugin) to create a new empty scene then switch to it then close it, but this looks very hacky (ugly), and also I can't find an easy way how to close a scene from a plugin.
Upd:
I found a workaround to update node connections buttons (thanks to Zylann
suggested using
update_tree()
):But I still think a similar method could be added/exposed and documented.
Also there are cases when the node added using a plugin/tool script is not displayed (but displayed when switching scenes).
In this case you can try
EditorInterface.edit_node()
or select the added node (EditorSelection.add_node()
)Is there a reason why this should be core and not an add-on in the asset library?
Should be core to be able to update the SceneTreeDock controls from a plugin without hacks
The text was updated successfully, but these errors were encountered: