仿ue插件

This commit is contained in:
2026-10-03 06:39:17 +08:00
parent a0ba17d211
commit d5a0266ea5
10 changed files with 5548 additions and 1 deletions
+21
View File
@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Zalyto
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
+200
View File
@@ -0,0 +1,200 @@
# Asset Drawer
> An asset drawer inspired by **Unreal Engine's Content Drawer**, for Godot 4.
> Press **Ctrl+Space** and the drawer slides up from the bottom of the editor. Browse, search, drag and drop, then close it.
![Godot 4.2+](https://img.shields.io/badge/Godot-4.2%2B-478cbf?logo=godotengine&logoColor=white)
![Version](https://img.shields.io/badge/version-3.6-blue)
![Type](https://img.shields.io/badge/type-editor%20plugin-lightgrey)
<!-- Add a screenshot or GIF here:
![Asset Drawer](docs/screenshot.png)
-->
---
## Table of contents
- [Why](#why)
- [Installation](#installation)
- [Quick start](#quick-start)
- [Shortcuts](#shortcuts)
- [Features](#features)
- [Right-click menu](#right-click-menu)
- [Copy / paste a resource](#copy--paste-a-resource)
- [Export an image of the drawer](#export-an-image-of-the-drawer)
- [Customization](#customization)
- [Configuration files](#configuration-files)
- [Troubleshooting](#troubleshooting)
- [Contributing](#contributing)
---
## Why
Godot's FileSystem dock is handy, but it takes up space permanently. Asset Drawer brings the idea of Unreal's Content Drawer to Godot: a file browser that **appears on demand**, covers the bottom of the editor, then disappears when you no longer need it. It stays connected to the rest of Godot: folder colors, favorites, and drag and drop into the scene or the Inspector.
## Installation
1. Copy the `asset_drawer` folder into your project's `res://addons/` folder:
```
res://addons/asset_drawer/
├── plugin.cfg
├── plugin.gd
└── drawer.gd
```
2. Open **Project → Project Settings → Plugins** and enable **Asset Drawer**.
3. Open the drawer with **Ctrl+Space**, with the toolbar button, or from **Project → Tools → Asset Drawer**.
> Compatible with **Godot 4.2 and later**.
## Quick start
| I want to… | I do… |
|---|---|
| Open / close the drawer | `Ctrl+Space` |
| Keep the drawer open | Click the pin in the top bar |
| Resize the height | Drag the handle at the top of the drawer |
| Add an asset to the scene | Drag it from the drawer into the scene |
| Assign a resource in the Inspector | Drag it onto the matching field |
| Find a file | `Ctrl+F`, then type the name |
By default, clicking outside the drawer closes it, unless it is pinned.
## Shortcuts
| Shortcut | Action |
|---|---|
| `Ctrl+Space` | Open / close the drawer |
| `Esc` | Close the drawer (unless pinned) or the context menu |
| `Ctrl+F` | Focus the search box |
| `F2` | Rename |
| `Ctrl+D` | Duplicate |
| `Delete` | Move to trash (with confirmation) |
| `Backspace` | Parent folder |
| `Enter` | Open the selected item |
| Double-click | Open (scene, script, resource, folder) |
| `Ctrl` + mouse wheel | Thumbnail zoom |
| Mouse back / forward buttons | Back / forward history |
| `Alt+V` | Paste the copied resource onto the hovered Inspector field |
The open shortcut leaves script autocompletion alone when a `TextEdit` / `CodeEdit` has focus.
## Features
### Interface
- Floating drawer with **margins, rounded corners, an accent outline and a shadow** so it stands out from the editor
- Slide-up opening animation (slight bounce and glow on the outline), animated closing
- Resizable height, remembered between sessions
- **Pinned** mode: the drawer stays open
- **Details** panel with preview (type, size, date, UID), can be hidden
- Status bar (item count, selection, path)
- Animated notifications (green = success, red = error) to confirm actions
- Micro-animations on buttons, rounded selection and hover in the list
### Navigation
- **Folder tree** with parent folders pinned to the top as you go deeper, single click to open / expand, "Collapse all" and "Locate current folder" buttons
- Clickable **breadcrumb** and back / forward history
- Side tabs: **Folders**, **Favorites**, **Recents**, **Sets**
- Favorites synced with Godot's FileSystem dock
### Search and display
- Recursive search inside the current folder (debounced)
- Type filters: All, Scenes, Scripts, Models, Images, Audio, Shaders
- **Grid** or **list** view, with a separate zoom level remembered for each view
- HD thumbnails generated asynchronously by Godot, loaded only for visible items
- Cap on displayed items (`MAX_ITEMS`) to stay smooth in large folders
### Folder colors
- Uses the **custom colors from Godot's FileSystem dock** (the `file_customization/folder_colors` setting)
- Subfolders **inherit** their parent's color, like in the FileSystem dock
- Editable straight from the drawer: right-click a folder, then pick from the color swatches
### File management
- New folder, new scene, new script (unique default name, never overwrites)
- Rename: the matching `.import` / `.uid` files follow, along with favorites, sets and colors
- Duplicate files and folders, including recursively
- Delete to the OS **trash**, with confirmation
- Reimport
- Copy path, absolute path or UID
- Show in the FileSystem dock or in the OS file manager
### Sets
Named collections of assets, like Unreal's Collections: group files from different folders into one set and find them in the **Sets** tab. Right-click a set to delete it (the files are not touched).
### Drag and drop
Drag one or more assets into the scene, the scene tree or Inspector fields, just like from the FileSystem dock.
## Right-click menu
**On a file or folder**: open, show in dock / file manager, copy path / absolute path / UID, copy resource, new folder / scene / script, rename, duplicate, favorites, add to a set, reimport, folder color, delete.
**On empty space** (current folder options):
- Open the folder in the file manager
- Show in the FileSystem dock
- Copy the folder path / absolute path
- Add / remove the folder from favorites
- Refresh
- Switch to grid or list view
- Export an image of the drawer (transparent PNG or green background)
- New folder / scene / script
- Folder color
## Copy / paste a resource
1. Hover a resource in the drawer: a small green **Copy** button appears (or right-click → "Copy resource").
2. Hover a resource field in the Inspector (for example the `Mesh` of a `MeshInstance3D`): a **Paste** button appears.
3. Click it, or use `Alt+V`. The drawer does not need to be open to paste.
## Export an image of the drawer
Handy for posters, renders or your own README. Right-click on empty space in the drawer:
- **Export image (transparent PNG)**: the drawer is captured on black, then on white, and the opacity of each pixel is computed from the difference. Rounded corners and shadow come out clean, with no cutting out needed. It takes a few seconds to process.
- **Export image (green background)**: the drawer on pure green (0, 255, 0), to key out with a chroma key.
The image is saved to your Pictures folder and the file manager opens on it. Floating widgets (Copy / Paste buttons, notifications, hint pill) are hidden during the capture.
## Customization
Appearance settings are constants at the top of `drawer.gd`:
| Constant | Purpose | Default |
|---|---|---|
| `HEIGHT_RATIO` | Default height (share of the editor window) | `0.19` |
| `MIN_HEIGHT` | Minimum height (px) | `140` |
| `SIDE_GAP` | Space on each side (px) | `40` |
| `BOTTOM_GAP` | Space below the drawer (px) | `10` |
| `MAX_WIDTH` | Maximum width (px) | `2200` |
| `ANIM_TIME` | Animation duration (s) | `0.2` |
| `SHOW_HINT` | "Asset Drawer Ctrl+Space" pill at the bottom of the editor | `true` |
| `MAX_ITEMS` | Maximum displayed items | `3000` |
| `SEARCH_DELAY` | Search debounce (s) | `0.18` |
| `STICKY_MAX` | Maximum pinned parent folders in the tree | `3` |
Colors (`COLOR_*`, `TEXT_*`) and the folder palette (`FOLDER_COLORS`) are in the same file.
## Configuration files
- The drawer state (current folder, height, view, zoom, pinning, favorites, recents, sets) is saved in `res://.godot/asset_drawer.cfg`. The `.godot/` folder is ignored by Git by default.
- Folder colors are stored by Godot in `project.godot`, under `file_customization/folder_colors`.
## Troubleshooting
**Thumbnails don't show up**: wait for the project import to finish, then right-click on empty space → **Refresh**.
**Ctrl+Space does nothing**: check that the plugin is enabled and that the shortcut isn't already taken by your system (some operating systems use it to switch keyboard language). The toolbar button and the **Project → Tools** menu work in any case.
**A folder color doesn't show**: colors come from the FileSystem dock. Set it there, or through the drawer's right-click menu, and it will be visible everywhere.
**An error at startup**: disable then re-enable the plugin, and check that the three files are present in `res://addons/asset_drawer/`.
File diff suppressed because it is too large Load Diff
+1
View File
@@ -0,0 +1 @@
uid://ci1u46akkd1c
+201
View File
@@ -0,0 +1,201 @@
@tool
extends RefCounted
## Asset Drawer localization.
## The texts in the code are written in French (the key). If the Godot editor language is
## French, they are displayed as is; otherwise the English translation below is used
## (and, failing a translation, the original text). The language is read once per session:
## changing the editor language requires restarting it anyway.
const EN := {
"Scripts": "Scripts",
"Shader": "Shader",
"Fichiers texte": "Text files",
"Texte": "Text",
"Configuration": "Configuration",
"Personnalisé...": "Custom...",
"Créer": "Create",
"Langage": "Language",
"Extension": "Extension",
"Nom": "Name",
"Pas de solution C# dans ce projet : créez un premier script C# depuis le dock Fichiers de Godot (il générera le .csproj), puis réessayez ici": "No C# solution in this project: create a first C# script from Godot's FileSystem dock (it will generate the .csproj), then try again here",
"Déplacer ici": "Move here",
"Import avancé...": "Advanced import...",
"Import avancé indisponible pour ce fichier": "Advanced import unavailable for this file",
"Paramètres d'import": "Import settings",
"Nouvelle scène héritée": "New inherited scene",
"Échec du déplacement": "Move failed",
"%d élément(s) déplacé(s)": "%d item(s) moved",
"Élément déplacé": "Item moved",
"Dossiers": "Folders",
"Favoris": "Favorites",
"Récents": "Recents",
"Tout replier": "Collapse all",
"Localiser le dossier courant": "Locate current folder",
"+ Nouveau set": "+ New set",
"Nouveau set": "New set",
"mon_set": "my_set",
"Aucun asset": "No assets",
"Créer un dossier": "Create a folder",
"Réinitialiser les filtres": "Reset filters",
"Coller": "Paste",
"Coller la ressource copiée ici": "Paste the copied resource here",
"Copier": "Copy",
"Copier la ressource": "Copy resource",
"Ctrl+Espace": "Ctrl+Space",
"Précédent (bouton souris 4)": "Back (mouse button 4)",
"Suivant (bouton souris 5)": "Forward (mouse button 5)",
"Dossier parent (Retour arrière)": "Parent folder (Backspace)",
"Rechercher... (Ctrl+F)": "Search... (Ctrl+F)",
"Grille": "Grid",
"Vue grille": "Grid view",
"Liste": "List",
"Vue liste": "List view",
"Taille des miniatures (Ctrl+molette)": "Thumbnail size (Ctrl+wheel)",
"Détails": "Details",
"Panneau de détails": "Details panel",
"Épingler": "Pin",
"Épingler (reste ouvert)": "Pin (stays open)",
"Afficher ce dossier dans le dock Fichiers": "Show this folder in the FileSystem dock",
"Fermer (Échap)": "Close (Esc)",
"Tout": "All",
"Scènes": "Scenes",
"Modèles": "Models",
"Taille": "Size",
"Modifié": "Modified",
"Chemin": "Path",
"Ouvrir": "Open",
"Puis survolez un champ ressource de l'Inspecteur (ex. Mesh d'un MeshInstance3D) : un bouton « Coller » apparaît (ou Alt+V au clavier)": "Then hover a resource field in the Inspector (e.g. the Mesh of a MeshInstance3D): a “Paste” button appears (or press Alt+V)",
"Coller la ressource": "Paste resource",
"Copier le chemin": "Copy path",
"Chemin copié": "Path copied",
"Ajouter aux favoris": "Add to favorites",
"Retiré des favoris": "Removed from favorites",
"Ajouté aux favoris": "Added to favorites",
"+Dossier": "+Folder",
"Nouveau dossier": "New folder",
"+Scène": "+Scene",
"Clic droit : supprimer le set": "Right-click: delete set",
"\nClic droit : retirer": "\nRight-click: remove",
"Supprimer le set": "Delete set",
"Supprimer le set « %s » ? (les fichiers ne sont pas touchés)": "Delete set “%s”? (files are not touched)",
"Aucun résultat avec ce filtre": "No results with this filter",
"Set vide": "Empty set",
"Aucun résultat": "No results",
"Taille des icônes en liste (Ctrl+molette)": "Icon size in list view (Ctrl+wheel)",
"Taille des miniatures en grille (Ctrl+molette)": "Thumbnail size in grid view (Ctrl+wheel)",
"%d éléments sélectionnés": "%d items selected",
"Set : ": "Set: ",
"%d élément%s": "%d item%s",
" (limité à %d)": " (limited to %d)",
"à l'instant": "just now",
"il y a %d min": "%d min ago",
"il y a %d h": "%d h ago",
"hier": "yesterday",
"Dossier": "Folder",
"%d o": "%d B",
"%.1f Ko": "%.1f KB",
"%.1f Mo": "%.1f MB",
"Retirer des favoris": "Remove from favorites",
"Cliquer pour ouvrir le tiroir d'assets": "Click to open the asset drawer",
"Impossible de copier un dossier comme ressource": "Can't copy a folder as a resource",
"Ce fichier n'est pas une ressource Godot": "This file is not a Godot resource",
"Impossible de charger la ressource": "Can't load the resource",
"« %s » copiée — survolez un champ ressource de l'Inspecteur": "“%s” copied — hover a resource field in the Inspector",
"Aucune ressource copiée : clic droit sur un fichier → « Copier la ressource »": "No resource copied: right-click a file → “Copy resource”",
"Survolez un champ ressource de l'Inspecteur puis Alt+V": "Hover a resource field in the Inspector, then press Alt+V",
"Ce champ n'est pas modifiable": "This field is read-only",
"Type incompatible : ce champ attend « %s »": "Incompatible type: this field expects “%s”",
"« %s » collée dans l'Inspecteur": "“%s” pasted into the Inspector",
"COULEUR DU DOSSIER": "FOLDER COLOR",
"Couleur par défaut": "Default color",
"Afficher dans le dock Fichiers": "Show in FileSystem dock",
"Afficher dans l'explorateur": "Show in file manager",
"Copier le chemin absolu": "Copy absolute path",
"Chemin absolu copié": "Absolute path copied",
"Copier la ressource (bouton Coller au survol)": "Copy resource (Paste button on hover)",
"Copier l'UID": "Copy UID",
"UID copié": "UID copied",
"Ouvrir le dossier dans l'explorateur": "Open folder in file manager",
"Copier le chemin du dossier": "Copy folder path",
"Copier le chemin absolu du dossier": "Copy folder absolute path",
"Retirer le dossier des favoris": "Remove folder from favorites",
"Ajouter le dossier aux favoris": "Add folder to favorites",
"Actualiser": "Refresh",
"Actualisé": "Refreshed",
"Passer en vue grille": "Switch to grid view",
"Passer en vue liste": "Switch to list view",
"Nouvelle scène": "New scene",
"Nouveau script": "New script",
"Renommer (F2)": "Rename (F2)",
"Dupliquer (Ctrl+D)": "Duplicate (Ctrl+D)",
"Ajouter à un set...": "Add to a set...",
"Ajouter au set": "Add to set",
"Ajouté au set « %s »": "Added to set “%s”",
"Retirer de ce set": "Remove from this set",
"Réimporter": "Reimport",
"Supprimer (Suppr)": "Delete (Del)",
"Nom invalide : caractère « %s » interdit": "Invalid name: character “%s” not allowed",
"nouveau_dossier": "new_folder",
"« %s » existe déjà": "“%s” already exists",
"nouvelle_scene": "new_scene",
"nouveau_script": "new_script",
"Renommer": "Rename",
"Échec du renommage": "Rename failed",
"Renommé en « %s »": "Renamed to “%s”",
"_copie": "_copy",
"%d élément(s) dupliqué(s)": "%d item(s) duplicated",
"Élément dupliqué": "Item duplicated",
"Envoyer à la corbeille :\n": "Move to trash:\n",
"Supprimer": "Delete",
"Impossible de mettre « %s » à la corbeille": "Can't move “%s” to trash",
"%d élément(s) envoyé(s) à la corbeille": "%d item(s) moved to trash",
"Envoyé à la corbeille": "Moved to trash",
"Valider": "OK",
"Annuler": "Cancel",
"Confirmer": "Confirm",
" · %d sélectionné%s": " · %d selected%s",
"Asset Drawer (Ctrl+Espace)": "Asset Drawer (Ctrl+Space)",
"Projet": "Project",
"Rechercher dans tout le projet... (Ctrl+F)": "Search the whole project... (Ctrl+F)",
"Rechercher dans ce dossier... (Ctrl+F)": "Search this folder... (Ctrl+F)",
"Recherche : tout le projet (cliquer pour limiter au dossier courant)": "Search: whole project (click to limit to the current folder)",
"Recherche : dossier courant (cliquer pour chercher dans tout le projet)": "Search: current folder (click to search the whole project)",
"Masqué dans le tiroir": "Hidden in the drawer",
"Masqué dans le tiroir · clic droit → « Afficher les éléments masqués »": "Hidden in the drawer · right-click → “Show hidden items”",
"Réaffiché": "Unhidden",
"Afficher les éléments masqués": "Show hidden items",
"Masquer dans le tiroir": "Hide in the drawer",
"Ne plus masquer": "Unhide",
"Afficher dans son dossier": "Show in its folder",
"Impossible de créer « %s »": "Can't create “%s”",
}
static var _fr := -1
static func is_fr() -> bool:
if _fr < 0:
_fr = 1 if _detect_fr() else 0
return _fr == 1
static func t(fr: String) -> String:
if is_fr():
return fr
return str(EN.get(fr, fr))
## Marque du pluriel "s" (français uniquement) pour les mots comme "sélectionné(s)".
static func sel_s(plural: bool) -> String:
return "s" if plural and is_fr() else ""
static func _detect_fr() -> bool:
var loc := ""
if TranslationServer.has_method("get_tool_locale"):
loc = str(TranslationServer.call("get_tool_locale"))
else:
var lang := str(EditorInterface.get_editor_settings().get_setting("interface/editor/editor_language"))
loc = OS.get_locale() if lang == "" or lang == "auto" else lang
return loc.to_lower().begins_with("fr")
+1
View File
@@ -0,0 +1 @@
uid://0e4w5ydeh6np
+7
View File
@@ -0,0 +1,7 @@
[plugin]
name="Asset Drawer"
description="Tiroir d'assets façon Content Drawer d'Unreal Engine. Ouvrir avec Ctrl+Espace."
author="Asset Drawer"
version="3.7"
script="plugin.gd"
+128
View File
@@ -0,0 +1,128 @@
@tool
extends EditorPlugin
const Drawer := preload("res://addons/asset_drawer/drawer.gd")
const L := preload("res://addons/asset_drawer/lang.gd")
# true : Ctrl+Space opens the drawer even when the script editor has focus
# (Ctrl+Space autocompletion is then replaced by the drawer).
# false : in the script editor, Ctrl+Space stays autocompletion.
const OPEN_IN_CODE_EDITOR := true
# true : the open shortcut is ignored while the camera is in free look
# (right mouse button held in the 3D view, or free look toggled with Shift+F).
# This avoids opening the drawer when Ctrl (move down) + Space (move up)
# are pressed together to move around.
const BLOCK_IN_FREELOOK := true
var drawer: Control
var _toolbar_btn: Button
var _theme_check_queued := false
func _enter_tree() -> void:
_create_drawer()
_toolbar_btn = Button.new()
_toolbar_btn.flat = true
_toolbar_btn.tooltip_text = L.t("Asset Drawer (Ctrl+Espace)")
_toolbar_btn.focus_mode = Control.FOCUS_NONE
var base := EditorInterface.get_base_control()
var icon_name := "FolderBrowse" if base.has_theme_icon("FolderBrowse", "EditorIcons") else "Folder"
_toolbar_btn.icon = base.get_theme_icon(icon_name, "EditorIcons")
_toolbar_btn.pressed.connect(func() -> void:
if is_instance_valid(drawer):
drawer.toggle())
add_control_to_container(CONTAINER_TOOLBAR, _toolbar_btn)
add_tool_menu_item("Asset Drawer", Callable(self, "_on_menu_toggle"))
set_process_input(true)
# The drawer follows the editor theme (base color, contrast, accent).
var es := EditorInterface.get_editor_settings()
if not es.settings_changed.is_connected(_on_settings_changed):
es.settings_changed.connect(_on_settings_changed)
func _create_drawer() -> void:
drawer = Drawer.new()
drawer.name = "AssetDrawer"
EditorInterface.get_base_control().add_child(drawer)
func _on_settings_changed() -> void:
# Deferred: we first let the editor regenerate its theme before re-reading the colors.
if _theme_check_queued:
return
_theme_check_queued = true
_check_theme.call_deferred()
func _check_theme() -> void:
_theme_check_queued = false
if not is_instance_valid(drawer) or not drawer.palette_changed():
return
# Recreates the drawer with the new palette. Its state (folder, height, favorites...)
# is already in the config, and is read back by the new drawer.
var was_open: bool = drawer.is_open
var old := drawer
drawer = null
old.get_parent().remove_child(old) # triggers _exit_tree: save + cleanup
old.queue_free()
await get_tree().process_frame # lets the old pill / overlay go away (same names)
if not is_inside_tree():
return
_create_drawer()
if was_open:
drawer.open.call_deferred()
func _exit_tree() -> void:
var es := EditorInterface.get_editor_settings()
if is_instance_valid(es) and es.settings_changed.is_connected(_on_settings_changed):
es.settings_changed.disconnect(_on_settings_changed)
remove_tool_menu_item("Asset Drawer")
if is_instance_valid(_toolbar_btn):
remove_control_from_container(CONTAINER_TOOLBAR, _toolbar_btn)
_toolbar_btn.queue_free()
_toolbar_btn = null
if is_instance_valid(drawer):
drawer.queue_free()
drawer = null
func _on_menu_toggle() -> void:
if is_instance_valid(drawer):
drawer.toggle()
func _is_freelook_active() -> bool:
# During free look, Godot captures the mouse (right button held OR free look
# toggled with Shift+F). The right-click test acts as a safety net.
return Input.mouse_mode == Input.MOUSE_MODE_CAPTURED \
or Input.is_mouse_button_pressed(MOUSE_BUTTON_RIGHT)
func _input(event: InputEvent) -> void:
if not is_instance_valid(drawer):
return
if not (event is InputEventKey and event.pressed and not event.echo):
return
var key := event as InputEventKey
if key.keycode == KEY_SPACE and key.ctrl_pressed and not key.alt_pressed and not key.shift_pressed and not key.meta_pressed:
# Free look active: we let the key through to the editor (camera movement).
if BLOCK_IN_FREELOOK and _is_freelook_active():
return
# Ctrl+Space is also used for autocompletion: see OPEN_IN_CODE_EDITOR at the top of the file.
if not OPEN_IN_CODE_EDITOR:
var focus := EditorInterface.get_base_control().get_viewport().gui_get_focus_owner()
if focus is TextEdit and not drawer.is_ancestor_of(focus):
return
drawer.toggle()
get_viewport().set_input_as_handled()
elif key.keycode == KEY_ESCAPE and drawer.is_open and not drawer.pinned:
drawer.close()
get_viewport().set_input_as_handled()
elif key.keycode == KEY_V and key.alt_pressed and not key.ctrl_pressed and not key.shift_pressed and not key.meta_pressed:
# Pastes the copied resource from the drawer onto the Inspector resource field hovered by the mouse.
if drawer.try_paste_resource_at_mouse():
get_viewport().set_input_as_handled()
+1
View File
@@ -0,0 +1 @@
uid://bbthaayqxoorj