Commit Graph

514 Commits

Author SHA1 Message Date
2b7eab7c87 Fix editor crash when expanding/collapsing empty scene tree 2021-12-01 20:18:20 +01:00
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
eabf8f5edf Added reset_size method to Control and Window classes 2021-11-22 16:55:21 +03:00
3c0fdcc8ac Use "enum class" for input enums 2021-11-12 15:37:54 -06:00
7cc33b14c9 Use Enter instead of F2 as an editor renaming shortcut on macOS 2021-11-12 20:50:23 +01:00
88c4380737 Modules: Make sure to include modules_enabled.gen.h where needed 2021-11-12 13:42:58 +01:00
688f42c691 Fix node naming in scene tree dock 2021-11-11 22:30:41 +01:00
1806ec7c14 Unify determination of default property values 2021-11-07 15:27:47 +01:00
e393c2a734 Add is_built_in() method to Resource 2021-11-04 12:45:58 +01:00
a2803f3d86 Merge pull request #54072 from KoBeWi/hrcr_is_ded 2021-11-03 17:31:48 +01:00
07065d67e1 Infer shader type based on edited node 2021-11-03 15:27:38 +01:00
de4f29f458 Remove node_hrcr hack 2021-10-28 01:43:34 +02:00
164dc11e04 Merge pull request #45699 from TokageItLab/implement-skeleton-editor-gizmo
Implement Skeleton Editor Gizmo
2021-10-06 21:11:20 +02:00
f2e9867e9f Implemented SkeletonEditorGizmo
Co-authored-by: Lyuma <xn.lyuma@gmail.com>
2021-10-07 01:07:46 +09:00
8f227e9da3 Merge pull request #51413 from KoBeWi/🚗 2021-10-04 20:31:47 +02:00
c63b18507d Use range iterators for Map 2021-09-30 15:09:12 -06:00
570cdc128f Rename Node's filename property to scene_file_path for clarity 2021-09-30 16:50:25 +02:00
f410852f9c Merge pull request #52172 from kleonc/scene-tree-dock-ensure-single-select 2021-09-29 09:15:43 +02:00
4fc639916c Allow disabling the RegEx module in the editor 2021-09-15 12:08:53 -05:00
d4f4cfbb40 Save branch as scene by dropping to filesystem 2021-09-09 00:59:10 +02:00
5d25115e80 SceneTreeDock Ensure to deactivate multi edit when selection changes to a single node 2021-08-28 01:55:06 +02:00
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
285024e806 Focus the scene tree dock after hitting one of the "Create Root Node:" buttons 2021-08-11 18:15:24 -06:00
6098403f07 Move the option to new menu 2021-08-12 01:34:52 +02:00
e401cd58f1 Add option to not expand tree on node select 2021-08-12 00:36:56 +02:00
5e5cd2495d Added editor dialog for easily creating shaders. 2021-08-07 21:02:13 +03:00
ac3322b0af Use const references where possible for List range iterators 2021-07-25 12:22:25 +02:00
4e6efd1b07 Use C++ iterators for Lists in many situations 2021-07-23 17:38:28 -04:00
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
31a81562a8 Fix Change Node Type after Add Node Here 2021-07-20 16:47:57 +02:00
b1eee24e26 Merge pull request #50517 from KoBeWi/🌳💣
Assign value to property by dropping to scene tree
2021-07-19 18:08:47 +02:00
5faf51a5aa Assign value to property by dropping to scene tree 2021-07-19 16:16:50 +02:00
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
f4b361dd15 Add header theme type variations to labels 2021-07-13 15:42:09 +02:00
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
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
36434cb2e6 Fix node list with Add Node Here 2021-07-08 00:52:49 +02:00
99909cb4f7 Add a root Node3D automatically if absent when adding preview sun and sky
This makes for a smoother prototyping process compared to displaying
an error message.
2021-07-07 01:59:46 +02:00
62ce81ec15 Coding style fix in editor NodePath update
Added r_ prefix for reference arguments that can be modified.
2021-06-30 11:50:40 -07:00
dfdde2c598 Merge pull request #49812 from nekomatata/node-path-editor-update
NodePath properly updated in the editor in more cases when nodes are moved or renamed
2021-06-29 12:51:38 +02:00
3e4e530523 NodePath properly updated in the editor in more cases
Fix more cases of node path needing an update when nodes are renamed or
moved in the editor.

Built-in node properties:
Before, node paths were checked only for script export variables. Now
all properties are checked from the node, which includes built-in node
properties.
Allows proper node path updates for nodes like remote transform, physics
joints, etc.

Arrays and dictionaries:
Node paths nested in array and dictionary properties are now also
updated in the editor.

Also update the documentation to be clear about node path update in the
editor and at runtime.

Co-authored-by: latorril <latorril@gmail.com>
2021-06-28 09:28:29 -07:00
e28fd07b2b Rename instance()->instantiate() when it's a verb 2021-06-19 20:49:18 -06:00
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
80d057269f Revert "Fix SceneTreeDock::_selection_changed to handle to single selection from Multiple Selection" 2021-06-16 02:12:01 +02:00
1ef9b8645c [49451] fix: Control _selection_changed from Multiple Selection 2021-06-10 12:04:07 +02:00
8e8398209e Don't remap resources belonging to instance 2021-06-07 12:52:05 +02:00
bca0d36fe6 Improve TreeItem API and allow to move nodes 2021-05-17 22:06:46 +02:00
0ec809462e Merge pull request #47530 from likeich/add_instance_child_shortcut
Adds command+shift+a shortcut to instance a scene
2021-05-07 01:43:41 +02:00
e168baf433 Remove extra separator
Removes an extra separator when Scene Tree Editing is disabled. Discussed in #48518
2021-05-06 17:37:12 -04:00
10d5d4d3cd Fixed cut/copy/paste visibility
Fixes #48514 by moving the visibility of these buttons into their own if statement that depends on if scene tree editing is allowed. Previously it was under the script editing setting which is unexpected as it works with nodes and the scene tree.
2021-05-06 16:01:36 -04:00