Skip to content

Another scene tree dock menu cleanup

Rafał Mikrut requested to merge github/fork/KoBeWi/scene_tree_dusting into master

Created by: KoBeWi

This is similar to #28011

SceneTreeDock used get_selected_node_list(), which only returned nodes with common parent, which caused some issues. The PR introduces a method that returns full node list and they are both used to make sure that only usable options appear in the context menu.

List of changes. To make listing easier, "node" is for single node and "family" is for single node with or without its children (what original get_selected_node_list() returns)

  • "Make Scene Root" only appears if one family is selected
  • "Rename" only appears if one node is selected
  • "Clear Script" when multiple nodes are selected only appears if any of them has a script
  • "Copy Node Path" only appears if one node is selected
  • "Attach/Extend Script" only appears if one node is selected

Resolves #18787 (closed) (see my comment there)

Merge request reports