Commit Graph

137 Commits

Author SHA1 Message Date
Haoyu Qiu e5c321448e Create AudioStreamPlayer when dropping AudioStream
- Create AudioStreamPlayer if dropped in between nodes in the Scene dock
- Create AudioStreamPlayer2D if dropped into 2D editor
- Create AudioStreamPlayer3D if dropped into 3D editor
2024-05-19 20:26:04 +08:00
ajreckof 48a6476861 Fix going forward backward in editor selection history. 2024-04-14 17:21:11 +02:00
AeioMuch 0ba1adfaf9 Inspect hovered node while dragging 2024-04-10 17:15:13 +02:00
Muller-Castro 1638c1b28f Add const lvalue ref to editor/* container parameters 2024-02-26 15:28:15 -03:00
Bitlytic f9e03459e8
Add an option to center children around the new parent when reparenting 2024-02-14 13:46:04 +01:00
passivestar 97a77c5193 Add support for search shortcut to all docks 2024-01-22 22:37:59 +04:00
SaracenOne cb8a743e18
Fix behavior of 'Editable Children' toggle.
Prevents losing nodes owned by the edited scene when
toggling editable_children off on an instanced scene,
and makes the toggle compatible with undo-redo.
2024-01-09 13:34:38 +01:00
Rémi Verschelde df8b7fee81
Merge pull request #82802 from marcinn/fix-82756-prevent-saving-children-without-owner
Fix saving branch as scene saves children without owner set
2024-01-03 15:40:37 +01:00
Invertex 59787683a9 Added "Show In FileSystem" right-click option to Scene hierarchy nodes.
-Implemented shared function for focusing FileSystem tab and highlighting the node path.
-Created right-click option that shows up in the Scene-Hierarchy on Nodes that have a file-system source path.
-Created custom icon for this right-click option
-Implemented the shared function and icon for other places that already had this features (Open Node tab, Inspector Resource)

Co-authored-by: MewPurPur <mew.pur.pur@gmail.com>
2023-12-13 07:43:39 -08:00
Marcin Nowak 561fcf54a4 Fix #82756: Save branch as scene saves children without owner set 2023-11-16 01:14:04 +01:00
Yuri Sizov 8b11ae9cf5 Merge pull request #83596 from SaracenOne/node_copy_paste_fix
Fix ownership bugs in node copy and pasting.
2023-11-06 13:23:03 +01:00
Saracen 26576cc210 Fix ownership bugs in node copy and pasting. 2023-11-04 20:14:09 +00:00
Rémi Verschelde f41e07bfe6
Merge pull request #81737 from Mickeon/fix-connection-inherited-packed-scene
Fix internal `CONNECT_INHERITED` being saved in PackedScene & Make Local
2023-10-24 10:53:37 +02:00
kobewi a5c984412c Don't try updating wrong NodePaths in resources 2023-10-13 13:31:13 +02:00
Micky 021d92fece Fix internal CONNECT_INHERITED being saved in PackedScene & Make Local 2023-10-03 15:03:55 +02:00
Rémi Verschelde 016621f51d
Merge pull request #79467 from Calinou/editor-add-paste-as-sibling
Add a shortcut to paste nodes as sibling of the selected node
2023-08-07 14:47:27 +02:00
Yuri Sizov e4b8dc81b8 Merge pull request #78300 from ajreckof/fix-replace-node-destroying-Node-properties
Auto-update properties when replacing a node
2023-08-03 22:37:40 +02:00
ajreckof 4da9927faf Fix replace node deleting `Node` properties.
Update editor/scene_tree_dock.cpp

Co-Authored-By: Hugo Locurcio <hugo.locurcio@hugo.pro>
2023-08-03 18:38:24 +02:00
Chia-Hsiang Cheng e0cbbe4bbd Avoid duplicating the 'Filters' section 2023-07-23 12:14:28 +08:00
Hugo Locurcio c0e3dc55ba
Add a shortcut to paste nodes as sibling of the selected node
This makes quick pasting jobs easier when you don't want a heavily
nested structure, by pressing Ctrl + Shift + V (Cmd + Shift + V on macOS)
instead of Ctrl + V (Cmd + V on macOS).
2023-07-14 17:35:23 +02:00
kobewi 36b4ed4fa4 Prompt to confirm anim track delete on node delete 2023-04-25 17:55:05 +02:00
Yuri Sizov 49d7041d34 Decouple EditorInterface from EditorPlugin
- Simplify some includes in the process.
- Also exposes EditorInterface.movie_maker_enabled as a property.
2023-04-17 21:59:09 +02:00
Yuri Sizov 4154039832 Improve includes of EditorNode (and everything else)
Also start organizing editor-specific GUI components
into a dedicated folder, `editor/gui`.
Also move `editor_file_server` next to the rest of debugger classes.
2023-04-07 18:59:49 +02:00
kobewi 5a99304251 Add a list of all sub-resources used in the scene 2023-04-05 21:01:49 +02:00
Rémi Verschelde d95794ec8a
One Copyright Update to rule them all
As many open source projects have started doing it, we're removing the
current year from the copyright notice, so that we don't need to bump
it every year.

It seems like only the first year of publication is technically
relevant for copyright notices, and even that seems to be something
that many companies stopped listing altogether (in a version controlled
codebase, the commits are a much better source of date of publication
than a hardcoded copyright statement).

We also now list Godot Engine contributors first as we're collectively
the current maintainers of the project, and we clarify that the
"exclusive" copyright of the co-founders covers the timespan before
opensourcing (their further contributions are included as part of Godot
Engine contributors).

Also fixed "cf." Frenchism - it's meant as "refer to / see".
2023-01-05 13:25:55 +01:00
trollodel c90d0bd84f Use forward-declarations in big editor classes 2022-11-29 09:59:43 +01:00
trollodel ba9e619b51 Use forward-declarations in EditorPlugin where possible 2022-11-11 20:25:51 +01:00
Micky 33092b6f45 Expose and warn about Node Filters in Scene Tree Dock
Adds "Filter by Type" and "Filter by Group" in the Scene Tree Dock's MenuButton.
Hovering on them displays an useful tooltip.
When selecting these items, the matching parameter is appended to the terms, and the caret is automatically brought to the end.

When typing a filter that cannot be identified, a warning icon is displayed. The reason is explained as a tooltip.

The same options are also quickly available by right-clicking or middle-clicking in the text field.
2022-10-06 13:36:40 +02:00
Rémi Verschelde f37143b20a Merge pull request #65933 from Mickeon/remove-scene-tree-dock-unused
Remove unused `import_subscene()` in Scene Tree Dock
2022-09-21 18:55:39 +02:00
Ninni Pipping df9eaf5f47 Tree recursive folding 2022-09-21 13:28:29 +02:00
Micky 976ec5f94a Remove unused `import_subscene()` in Scene Tree Dock 2022-09-16 22:30:39 +02:00
kobewi 80c78387a2 Remove pathed get_node() use from scene tree dock 2022-09-03 23:10:07 +02:00
Rémi Verschelde 90019676b0 Code quality: Fix header guards consistency
Adds `header_guards.sh` bash script, used in CI to validate future
changes. Can be run locally to fix invalid header guards.
2022-07-25 11:17:40 +02:00
kobewi ec6bbd486f Don't handle pending clicks outside scene tree 2022-06-10 15:14:31 +02:00
Rémi Verschelde 3c9cc7914a
Merge pull request #61162 from KoBeWi/drag_nodes_like_a_boss 2022-05-23 22:08:03 +02:00
reduz 45af29da80 Add a new HashSet template
* Intended to replace RBSet in most cases.
* Optimized for iteration speed
2022-05-20 22:40:38 +02:00
kobewi 95bbffff48 Only switch to node when not dragging it 2022-05-18 23:25:32 +02:00
reduz 746dddc067 Replace most uses of Map by HashMap
* Map is unnecessary and inefficient in almost every case.
* Replaced by the new HashMap.
* Renamed Map to RBMap and Set to RBSet for cases that still make sense
  (order matters) but use is discouraged.

There were very few cases where replacing by HashMap was undesired because
keeping the key order was intended.
I tried to keep those (as RBMap) as much as possible, but might have missed
some. Review appreciated!
2022-05-16 10:37:48 +02:00
Hugo Locurcio 180e5d3028
Remove `RES` and `REF` typedefs in favor of spelled out `Ref<>`
These typedefs don't save much typing compared to the full `Ref<Resource>`
and `Ref<RefCounted>`, yet they sometimes introduce confusion among
new contributors.
2022-05-03 01:43:50 +02:00
Rémi Verschelde c273ddc3ee Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct
with `{}`. Should be reviewed in a separate PR.

Option `IgnoreArrays` enabled for now to be conservative, can be
disabled to see if it proposes more useful changes.

Also fixed manually a handful of other missing initializations / moved
some from constructors.
2022-05-02 16:28:25 +02:00
Rémi Verschelde 8dfa12cae7
Merge pull request #59979 from bruvzg/cpp_check2 2022-04-27 10:08:26 +02:00
reduz 8580f377a3 Implement Scene Unique Nodes
Implements https://github.com/godotengine/godot-proposals/issues/4096

* Nodes can be marked unique to the scene in the editor (or via code).
* Unique nodes can be accessed via the **%** prefix at any point in the path. From that point in the path (depending on whether the scene of the path is), the unique node will be fetched.
* Implementation is very optimal, as these nodes are cached.
2022-04-25 12:19:17 +02:00
bruvzg de4c97758a
Fix more issues found by cppcheck. 2022-04-20 10:34:00 +03:00
bruvzg d1207a0504
[Input] Add extra `shortcut_input` input processing step to process Unicode character input with Alt / Ctrl modifiers, after processing of shortcuts. 2022-04-05 13:46:45 +03:00
Rémi Verschelde f8ab79e68a Zero initialize all pointer class and struct members
This prevents the pitfall of UB when checking if they have been
assigned something valid by comparing to nullptr.
2022-04-04 19:49:50 +02:00
Aaron Franke 918b09cabc
Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
Rémi Verschelde 11572c6e30
Editor: Cleanup some includes dependencies
Removes some unnecessary includes from `editor_node.h`, and instead add
those where they're used.

Removes unnecessary `editor_node.h` includes in various editor classes.

Renames `dynamicfont` to `dynamic_font` in a couple files.

Misc cleanup while jumping through that rabbit hole.
2022-02-15 14:54:15 +01:00
trollodel 05b56f316d Remove most EditorNode constructor parameters and fields 2022-02-14 14:16:24 +01:00
kobewi 2cd0c3f8be Improve 2D editor's right-click menu 2022-01-27 03:02:45 +01:00
trollodel aa1102fc53 Store panels and docks singletons in their own classes 2022-01-20 20:13:26 +01:00