Commit graph

170 commits

Author SHA1 Message Date
trollodel
307427af89 Add the button pressed to some signals in Tree 2022-05-21 17:16:52 +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
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
379ebe304a Show list of groups in node tooltip 2022-05-12 15:46:16 +02:00
kobewi
1dc7bcc83c Cleanup metadata usage 2022-05-06 00:27:10 +02:00
Rémi Verschelde
0f8ee1d256
Merge pull request #60161 from V-Sekai/instanced_children_color
Make editable children use warning color instead of disabled color
2022-05-05 01:41:27 +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
SaracenOne
e7e4f41004 Make instance's editable children use warning color instead of disabled color 2022-04-11 02:36:20 +01:00
Michael Alexsander
c331a3a614 Fix errors when locking nodes 2022-03-27 16:10:57 -03:00
Aaron Franke
918b09cabc
Initialize bools in the headers in editor 2022-03-12 13:34:06 -06:00
Michael Alexsander
917dac78e7 Replace some bits of code left to work with the new TabContainer 2022-03-04 19:16:33 -03: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
Hendrik Brucker
b396fd4eef Improve compilation speed (forward declarations/includes cleanup) 2022-02-12 02:46:22 +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
jmb462
1ce81dc5f2 Add missing SNAME macro optimization in some function calls 2022-02-06 15:54:04 +01:00
kobewi
189dab2d76 Add visibility to CanvasLayer 2022-02-05 14:02:21 +01:00
Wilson E. Alvarez
3eb5e0ac50
Rename String::is_subsequence_ofi to String::is_subsequence_ofn 2022-01-26 18:03:56 -05:00
trollodel
aa1102fc53 Store panels and docks singletons in their own classes 2022-01-20 20:13:26 +01:00
Yuri Roubinsky
5003d4351e Fix theming update in several editor classes 2022-01-16 14:49:03 +03: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
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
jmb462
81efebb3a1
Fix bad popups offset in editor with single window off
Co-authored-by: Gil Arasa Verge <gilarasaverge@gmail.com>
Co-authored-by: Tomasz Chabora <kobewi4e@gmail.com>
2021-12-06 14:29:48 +01:00
Rémi Verschelde
f0b26a6160
Merge pull request #52962 from mujpao/fix-right-click-sub-nodes 2021-10-07 23:14:07 +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
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
88b347dc27
Merge pull request #51920 from jmb462/missing-sname-macro-optimization-in-some-functions 2021-09-23 13:14:20 +02:00
mujpao
f25a698f80 Fix right clicking sub nodes after renaming parent 2021-09-23 00:19:21 -07:00
Hugo Locurcio
c673aea124
Display the node name in scene tree dock tooltips
This makes long node names previewable without having to rename them.
2021-09-01 15:02:42 +02:00
jmb462
54de7114c5 Add missing SNAME macro optimization for StringName in some functions 2021-08-20 14:50:24 +02:00
developer
fd9267fd8d fixed the node not renaming when clicking elsewhere on the scene tree. 2021-08-17 09:07:12 +02:00
kobewi
e401cd58f1 Add option to not expand tree on node select 2021-08-12 00:36:56 +02:00
Aaron Franke
4e6efd1b07
Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
Silc 'Tokage' Renew
b7bc609782 Remove extra signal firing in SELECT_MULTI mode 2021-07-23 17:53:16 +09:00
Silc 'Tokage' Renew
32640edac7 Revert "Fix duplicate selection in SceneTree"
This reverts commit 7d20d78847.

# Conflicts:
#	editor/scene_tree_editor.cpp
2021-07-23 17:34:21 +09: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
reduz
7d20d78847 Fix duplicate selection in SceneTree
* It seems both cell_selected and multi_selected were being triggered,
* This caused inspector updating twice.
* cell_selected connection and callback were removed.

This may be a bug in Godot 3.x too, recommend checking.
2021-07-17 13:35:28 -03:00
Nathan Franke
022a061571
Do not update scene tree dock when node edited outside of it 2021-07-15 05:42:34 -05: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
Lightning_A
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
Eric M
83cb48e69e Fixes for multi-node editing interactions.
1. When having 2 nodes selected, deselecting one in the ScemeTreeDock would keep the inspector in MultiNodeEdit rather than editing the one remaining node directly. This is now fixed. Closes #49451
2. In the Node3D editor, Shift-Selecting a region (drag selecting) would *deselect* nodes which were already selected, and select ones which were not, essentially inverting the selection. This is now fixed - shift-drag-selecting will only add nodes to the selection. To deselect, individual nodes can be clicked on. I am not sure if there is an issue open for this - it was a bug I found while testing other changes.
3. Other minor code cleanup.
2021-06-19 13:07:42 +10:00
kobewi
7ff135b015 Consistently prefix bound virtual methods with _ 2021-06-12 00:55:52 +02:00
trollodel
bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
Rémi Verschelde
605e33cf39
Merge pull request #44831 from gongpha/dont-update-tree-if-selected
Blocking updating in SceneTreeEditor when an item was selected
2021-05-06 08:45:41 +02:00