Commit Graph

477 Commits

Author SHA1 Message Date
Aaron Franke
ac870ab1c8
Move editor paths into the EditorPaths class 2022-07-29 11:07:30 -05:00
Tomasz Chabora
44cf3c22ac Keep property values when extending script 2022-07-29 16:57:50 +02:00
Juan Linietsky
d4433ae6d3 Remove Signal connect binds
Remove the optional argument p_binds from `Object::connect` since it was deprecated by Callable.bind().
Changed all uses of it to Callable.bind()
2022-07-29 16:26:13 +02:00
Silc Renew
063f66d738 fix unmarked unique when make local
Co-authored-by: Juan Linietsky reduzio@gmail.com
2022-07-26 20:56:35 +09:00
kobewi
b42bbca266 Fix node dragging not working when dock is moved 2022-07-21 23:57:52 +02:00
FireForge
97dfbea6ad Rename Control PRESET_WIDE to PRESET_FULL_RECT 2022-07-18 20:08:11 -05:00
Rémi Verschelde
b942c1ffe3
Merge pull request #62827 from fire-forge/ok-cancel
Add `ok_button_text` to AcceptDialog and `cancel_button_text` to ConfirmationDialog
2022-07-13 14:10:38 +02:00
FireForge
af19501cc7 Seperate filter and description in FileDialog.add_filter() 2022-07-09 10:51:45 -05:00
FireForge
e4067064ce Add ok_button_text to AcceptDialog and cancel_button_text to ConfirmationDialog 2022-07-09 10:47:08 -05:00
Rémi Verschelde
91b984a507
Merge pull request #61966 from Rindbee/fix-internal-nodes-owned
Fix setting owner on internal nodes when save branch as scene
2022-06-23 14:08:12 +02:00
FireForge
f85eb4164a Expose PopupMenu set/get_item_horizontal_offset()
- Renames setter from set_item_h_offset()
- Adds getter
2022-06-15 02:08:44 -05:00
Rindbee
472d16be4f Fix setting owner on internal nodes when save brach as scene 2022-06-12 13:57:42 +08:00
kobewi
ec6bbd486f Don't handle pending clicks outside scene tree 2022-06-10 15:14:31 +02:00
FireForge
7f7244f04a Use consistent casing in editor filter/search bars 2022-05-28 18:43:16 -05: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
kobewi
1dc7bcc83c Cleanup metadata usage 2022-05-06 00:27:10 +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
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
9381acb6a4
Make FileAccess and DirAccess classes reference counted. 2022-04-11 13:28:51 +03:00
bruvzg
f851c4aa33
Fix some issues found by cppcheck. 2022-04-06 14:34:37 +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
Hendrik Brucker
314430b868 Cleanup EditorNode and EditorData
Co-authored-by: Eric M <itsjusteza@gmail.com>
2022-03-30 20:12:26 +02:00
Haoyu Qiu
ccde2bf66f Add property name style toggle to Inspector 2022-03-28 18:52:09 +08:00
Vitika9
46ca4737f1 Removed extra separator in absence of ChangeType and Rename 2022-03-18 14:42:48 +05:30
Aaron Franke
918b09cabc
Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
kobewi
42078dec9f Allow negative indexes in ItemList and PopupMenu 2022-03-12 01:14:03 +01:00
kobewi
2057ea2883 Remove duplicate editor settings definitions 2022-03-06 22:05:49 +01:00
Jakob Bouchard
6553f5c242
Convert _notification methods to switch - Chunk C 2022-02-16 13:03:05 -05: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
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +01:00
Francois Belair
13a0d9177d Implement drawing and editing all anim beziers
* Move bezier edit from track to button in toolbar
* Draw, edit all bezier curves simultaneously
* Add click on curve to select tracks
* Tie track editor's filter view to bezier editor
* Implement visibility and locking
* Fix editor spacing issues
* Fix track buttons spacing
* Add keyframe focus and (de)select all key handling
2022-02-09 19:48:22 -05:00
Rémi Verschelde
561fbe2175
Merge pull request #56923 from fire-forge/fix-create-root-node-scrolling 2022-02-08 13:17:35 +01:00
Rémi Verschelde
fc076ece3d
Revert "Add missing SNAME macro optimization to all theme methods call"
This reverts commit a988fad9a0.

As discussed in #57725 and clarified in #57788, `SNAME` is not meant to be used
everywhere but only in critical code paths. For theme methods specifically, it
was by design that only getters use `SNAME` and not setters.
2022-02-08 10:17:25 +01:00
jmb462
a988fad9a0 Add missing SNAME macro optimization to all theme methods call 2022-02-06 23:06:11 +01:00
Gilles Roudière
73e784de1e Remove get_focus_owner() from Control, replaced by get_viewport()->gui_get_focus_owner() 2022-02-03 11:59:32 +01:00
Anilforextra
fc27636999 Vectors: Use clear() and has().
Use clear() instead of resize(0).

Use has() instead of "find(p_val) != -1".
2022-02-02 00:11:09 +05:45
kobewi
2cd0c3f8be Improve 2D editor's right-click menu 2022-01-27 03:02:45 +01:00
Rémi Verschelde
e6170aae39
Merge pull request #55066 from trollodel/less_singletons_in_editornode 2022-01-20 22:29:17 +01:00
Rémi Verschelde
d681d99e12
Merge pull request #52134 from RandomShaper/fix_naming 2022-01-20 22:01:37 +01:00
trollodel
aa1102fc53 Store panels and docks singletons in their own classes 2022-01-20 20:13:26 +01:00
Pedro J. Estébanez
7b0ed2aa5e Rename Variant::is_ref() to is_ref_counted() 2022-01-20 18:46:25 +01:00
Michael Alexsander
b3a82f8310 Make Scene dock menu button an actual MenuButton 2022-01-20 08:54:36 -03:00
fire540
f8dde5871c Fix Create Root Node dialog expanding in favorites tab 2022-01-19 16:05:02 -06:00
kobewi
6630eb3b5a Improve node pasting 2022-01-18 16:54:53 +01:00
Rémi Verschelde
5bc87025f4
Merge pull request #55809 from cdemirer/fix-reparenting-inherited-nodes 2022-01-18 10:54:59 +01:00
cdemirer
31a6ad83fd Editor: Disallow reparenting inherited nodes 2022-01-18 00:37:17 +08:00
Rémi Verschelde
ae06511bf6
Merge pull request #55569 from KoBeWi/expand_all_was_a_mistake 2022-01-13 12:42:28 +01:00
kobewi
9e095bb68b Fix some more wrong node names 2022-01-07 00:27:20 +01:00
SaracenOne
941ea38b9a Prevent saving branches in foreign scenes 2022-01-06 15:04:12 +00:00
Rémi Verschelde
fe52458154
Update copyright statements to 2022
Happy new year to the wonderful Godot community!
2022-01-03 21:27:34 +01:00
kobewi
fe71a91de9 Move and rename Collapse/Expand All button 2021-12-23 22:19:56 +01:00
Rémi Verschelde
c972948c21
Merge pull request #55761 from KoBeWi/alt_hack 2021-12-21 11:35:14 +01:00
kobewi
bd6e9e0d6e Allow to copy foreign nodes 2021-12-13 13:33:06 +01:00
Pedro J. Estébanez
18663aa305 Stop asuming a default value of NIL means there's no default 2021-12-11 14:03:48 +01:00
kobewi
acf563e59f Add drag and drop for NodePaths 2021-12-09 18:50:57 +01:00
Nathan Franke
49403cbfa0
Replace String comparisons with "", String() to is_empty()
Also:
- Adds two stress tests to test_string.h
- Changes to .empty() on std::strings
2021-12-09 04:48:38 -06:00
Yuri Roubinsky
771491d358 Add New Shader option to the FileSystemDock popup menu. 2021-12-03 19:42:58 +03:00
Andreas Raddau
2b7eab7c87 Fix editor crash when expanding/collapsing empty scene tree 2021-12-01 20:18:20 +01:00
Hugo Locurcio
9c6032b46a
Fix scene tree dock icon not switching colors on theme change
This fixes the "three vertical dots" button at the right of the
scene tree dock when switching from a dark theme to a light theme
or vice versa.
2021-11-29 19:42:06 +01:00
Yuri Roubinsky
eabf8f5edf Added reset_size method to Control and Window classes 2021-11-22 16:55:21 +03:00
Aaron Franke
3c0fdcc8ac
Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
Hugo Locurcio
7cc33b14c9
Use Enter instead of F2 as an editor renaming shortcut on macOS 2021-11-12 20:50:23 +01:00
Rémi Verschelde
88c4380737
Modules: Make sure to include modules_enabled.gen.h where needed 2021-11-12 13:42:58 +01:00
kobewi
688f42c691 Fix node naming in scene tree dock 2021-11-11 22:30:41 +01:00
Pedro J. Estébanez
1806ec7c14 Unify determination of default property values 2021-11-07 15:27:47 +01:00
kobewi
e393c2a734 Add is_built_in() method to Resource 2021-11-04 12:45:58 +01:00
Rémi Verschelde
a2803f3d86
Merge pull request #54072 from KoBeWi/hrcr_is_ded 2021-11-03 17:31:48 +01:00
kobewi
07065d67e1 Infer shader type based on edited node 2021-11-03 15:27:38 +01:00
kobewi
de4f29f458 Remove node_hrcr hack 2021-10-28 01:43:34 +02:00
Rémi Verschelde
164dc11e04
Merge pull request #45699 from TokageItLab/implement-skeleton-editor-gizmo
Implement Skeleton Editor Gizmo
2021-10-06 21:11:20 +02:00
Silc Renew
f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
Rémi Verschelde
8f227e9da3
Merge pull request #51413 from KoBeWi/🚗 2021-10-04 20:31:47 +02:00
Lightning_A
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
Hugo Locurcio
570cdc128f
Rename Node's filename property to scene_file_path for clarity 2021-09-30 16:50:25 +02:00
Rémi Verschelde
f410852f9c
Merge pull request #52172 from kleonc/scene-tree-dock-ensure-single-select 2021-09-29 09:15:43 +02:00
Aaron Franke
4fc639916c
Allow disabling the RegEx module in the editor 2021-09-15 12:08:53 -05:00
kobewi
d4f4cfbb40 Save branch as scene by dropping to filesystem 2021-09-09 00:59:10 +02:00
kleonc
5d25115e80 SceneTreeDock Ensure to deactivate multi edit when selection changes to a single node 2021-08-28 01:55:06 +02:00
reduz
5cecdfa8af Entirely removes BIND_VMETHOD in favor of GDVIRTUAL
* `_gui_input`, `_input`, `_unhandled_input` and `_unhandled_key_input` are now regular C++ virutal functions.
* Everything else converted to GDVIRTUAL
* BIND_VMETHOD is gone, always use the new syntax from now on.

Creating `_gui_input` method and using the binder to register events will no longer work, simply override the virtual function now.
2021-08-23 08:10:13 -03:00
Lightning_A
285024e806 Focus the scene tree dock after hitting one of the "Create Root Node:" buttons 2021-08-11 18:15:24 -06:00
kobewi
6098403f07 Move the option to new menu 2021-08-12 01:34:52 +02:00
kobewi
e401cd58f1 Add option to not expand tree on node select 2021-08-12 00:36:56 +02:00
Yuri Roubinsky
5e5cd2495d Added editor dialog for easily creating shaders. 2021-08-07 21:02:13 +03:00
Rémi Verschelde
ac3322b0af
Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Rémi Verschelde
6b1886f998
Merge pull request #50319 from nekomatata/optimize-node-path-check
Optimize NodePath update when renaming or deleting nodes in the editor
2021-07-22 12:13:10 +02:00
kobewi
31a81562a8 Fix Change Node Type after Add Node Here 2021-07-20 16:47:57 +02:00
Rémi Verschelde
b1eee24e26
Merge pull request #50517 from KoBeWi/🌳💣
Assign value to property by dropping to scene tree
2021-07-19 18:08:47 +02:00
kobewi
5faf51a5aa Assign value to property by dropping to scene tree 2021-07-19 16:16:50 +02:00
reduz
6631f66c2a Optimize StringName usage
* Added a new macro SNAME() that constructs and caches a local stringname.
* Subsequent usages use the cached version.
* Since these use a global static variable, a second refcounter of static usages need to be kept for cleanup time.
* Replaced all theme usages by this new macro.
* Replace all signal emission usages by this new macro.
* Replace all call_deferred usages by this new macro.

This is part of ongoing work to optimize GUI and the editor.
2021-07-18 21:20:02 -03:00
kobewi
f4b361dd15 Add header theme type variations to labels 2021-07-13 15:42:09 +02:00
Rémi Verschelde
3c0c202bf6
Merge pull request #49725 from EricEzaM/multi-node-picking-fixes
Fixes for multi-node editing interactions.
2021-07-12 19:23:13 +02:00
PouleyKetchoupp
ff40c3f3c8 Optimize NodePath update when renaming or deleting nodes in the editor
Now the process uses a Map to lookup node pointers instead of iterating
over all modified node paths in a list and comparing them for each
property to check.

The process also avoids checking properties with empty node paths and
does an early exit on deleted nodes to avoid checking the node and its
descendants.

Also made a minor change in NodePath::rel_path_to() to avoid resizing a
Vector many times for long paths (with copy-on-write each time). Now
it's down to 2 resize calls in any case.
2021-07-09 11:42:39 -07:00
kobewi
36434cb2e6 Fix node list with Add Node Here 2021-07-08 00:52:49 +02:00