0.2.0-dev Download ZIP
61 lines ·2.4 KB Raw
| 1 | <?xml version="1.0" encoding="UTF-8" ?> |
| 2 | <class name="EditorSelection" inherits="Object" api_type="editor" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> |
| 3 | <brief_description> |
| 4 | Manages the SceneTree selection in the editor. |
| 5 | </brief_description> |
| 6 | <description> |
| 7 | This object manages the SceneTree selection in the editor. |
| 8 | [b]Note:[/b] This class shouldn't be instantiated directly. Instead, access the singleton using [method EditorInterface.get_selection]. |
| 9 | </description> |
| 10 | <tutorials> |
| 11 | </tutorials> |
| 12 | <methods> |
| 13 | <method name="add_node"> |
| 14 | <return type="void" /> |
| 15 | <param index="0" name="node" type="Node" /> |
| 16 | <description> |
| 17 | Adds a node to the selection. |
| 18 | [b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node]. |
| 19 | </description> |
| 20 | </method> |
| 21 | <method name="clear"> |
| 22 | <return type="void" /> |
| 23 | <description> |
| 24 | Clear the selection. |
| 25 | </description> |
| 26 | </method> |
| 27 | <method name="get_selected_nodes"> |
| 28 | <return type="Node[]" /> |
| 29 | <description> |
| 30 | Returns the list of selected nodes. |
| 31 | </description> |
| 32 | </method> |
| 33 | <method name="get_top_selected_nodes"> |
| 34 | <return type="Node[]" /> |
| 35 | <description> |
| 36 | Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). |
| 37 | For example, if there is a node A with a child B and a sibling C, then selecting all three will cause this method to return only A and C. Changing the global transform of A will affect the global transform of B, so there is no need to change B separately. |
| 38 | </description> |
| 39 | </method> |
| 40 | <method name="get_transformable_selected_nodes" deprecated="Use [method get_top_selected_nodes] instead."> |
| 41 | <return type="Node[]" /> |
| 42 | <description> |
| 43 | Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). See [method get_top_selected_nodes]. |
| 44 | </description> |
| 45 | </method> |
| 46 | <method name="remove_node"> |
| 47 | <return type="void" /> |
| 48 | <param index="0" name="node" type="Node" /> |
| 49 | <description> |
| 50 | Removes a node from the selection. |
| 51 | </description> |
| 52 | </method> |
| 53 | </methods> |
| 54 | <signals> |
| 55 | <signal name="selection_changed"> |
| 56 | <description> |
| 57 | Emitted when the selection changes. |
| 58 | </description> |
| 59 | </signal> |
| 60 | </signals> |
| 61 | </class> |