This commit is contained in:
user 2024-12-28 02:19:44 +01:00
parent 9c2bfbb93c
commit 3e410de576
25 changed files with 1266 additions and 9 deletions

21
addons/script-ide/LICENSE Normal file
View File

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2023 Marius Hanl
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.

View File

@ -0,0 +1,46 @@
# Script IDE
Transforms the Script UI into an IDE like UI. Tabs are used for navigating between scripts.
The default Outline got an overhaul and now shows all members of the script (not just methods) with unique icons for faster navigation.
Enhanced keyboard navigation for Scripts and Outline.
Features:
- Scripts are now shown as Tabs inside a TabContainer
- The Outline got an overhaul and shows more than just the methods of the script. It includes the following members with a unique icon:
- Classes (Red Square)
- Constants (Red Circle)
- Signals (Yellow)
- Export variables (Orange)
- (Static) Variables (Red)
- Engine callback functions (Blue)
- (Static) Functions (Green)
- All the different members of the script can be hidden or made visible again by the outline filter. This allows fine control what should be visible (e.g. only signals, (Godot) functions, ...)
- A `Right Click` enables only the clicked filter, another `Right Click` will enable all filters again
- The Outline can be opened in a Popup with a defined shortcut for quick navigation between methods
- You can navigate through the Outline with the `ARROW` keys (or `PAGE_UP/PAGE_DOWN`) and scroll to the selected item by pressing `ENTER`
- Scripts can be opened in a Popup with a defined shortcut or when clicking the three dots on the top right of the TabContainer for quick navigation between scripts
- The plugin is written with performance in mind, everything is very fast and works without any lags or stuttering
Customization:
- The Outline is on the right side (can be changed to be on the left side again)
- The Outline can be toggled via `File -> Toggle Scripts Panel`. This will hide or show it
- There is also the possibility to hide private members, this is all members starting with a `_`
- The Script ItemList is not visible by default, but can be made visible again
All settings can be changed in the `Editor Settings` under `Plugin` -> `Script Ide`:
- `Open Outline Popup` = Shortcut to control how the Outline Popup should be triggered (default=CTRL+O or META+O)
- `Outline Position Right` = Flag to control whether the outline should be on the right or on the left side of the script editor (default=true)
- `Hide Private Members` = Flag to control whether private members (methods/variables/constants starting with '_') should be hidden in the Outline or not (default=false)
- `Open Script Popup` = Shortcut to control how the Script Popup should be triggered (default=CTRL+U or META+U)
- `Script List Visible` = Flag to control whether the script list should still be visible or not (above the outline) (default=false)
- All outline visibility settings
![Example of the Outline](https://github.com/user-attachments/assets/1729cb2b-01ae-4365-b77a-45edcb94b978)
![Example of the Outline Popup](https://github.com/user-attachments/assets/995c721f-9708-40d9-a4e8-57b1a99e9c29)
![Example of the TabContainer Script ItemList Popup](https://github.com/user-attachments/assets/484d498c-bd1c-4c77-a693-ac31a8500fbe)
![Example of the Script ItemList Popup](https://github.com/user-attachments/assets/bb976604-6049-4ce1-a28e-377fc62899f6)
![Example of the plugin editor settings](https://github.com/user-attachments/assets/0450e423-bc49-4076-862b-c95a62190df1)

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><rect x="1" y="1" width="14" height="14" fill="#ff4949" stroke-width="2.6941"/></svg>

After

Width:  |  Height:  |  Size: 183 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://csik7oxvt7tq3"
path="res://.godot/imported/class.svg-e6f2816a1f06041fb421c2af52817a4a.image"
[deps]
source_file="res://addons/script-ide/icon/class.svg"
dest_files=["res://.godot/imported/class.svg-e6f2816a1f06041fb421c2af52817a4a.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7s7-3.134 7-7c0-3.866-3.134-7-7-7zm0 2c2.7614 0 5 2.2386 5 5 0 2.7614-2.2386 5-5 5-2.7614 0-5-2.2386-5-5 0-2.7614 2.2386-5 5-5z" fill="#ff4949"/></svg>

After

Width:  |  Height:  |  Size: 302 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://cawc456ja8vf5"
path="res://.godot/imported/constant.svg-f6e857276565573c7540f3c32801842a.image"
[deps]
source_file="res://addons/script-ide/icon/constant.svg"
dest_files=["res://.godot/imported/constant.svg-f6e857276565573c7540f3c32801842a.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#c67e43"/></svg>

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://bvu2gnj8fv2kw"
path="res://.godot/imported/export.svg-d2d18132258a7a219ec1af1f0316c91c.image"
[deps]
source_file="res://addons/script-ide/icon/export.svg"
dest_files=["res://.godot/imported/export.svg-d2d18132258a7a219ec1af1f0316c91c.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#8fcc77"/></svg>

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://rni04cl446ov"
path="res://.godot/imported/func.svg-139842caa5b4b7e4839711b6c756d0f7.image"
[deps]
source_file="res://addons/script-ide/icon/func.svg"
dest_files=["res://.godot/imported/func.svg-139842caa5b4b7e4839711b6c756d0f7.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 15c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm0.5-2a1 1 0 0 1-0.70703-0.29297l-4-4a1 1 0 0 1-0.25977-0.62695 1.0001 1.0001 0 0 1 0-0.16016 1 1 0 0 1 0.25977-0.62695l4-4a1 1 0 0 1 1.4141 0 1 1 0 0 1 0 1.4141l-2.293 2.293h4.5859a1 1 0 0 1 1 1 1 1 0 0 1-1 1h-4.5859l2.293 2.293a1 1 0 0 1 0 1.4141 1 1 0 0 1-0.70703 0.29297z" fill="#8fc77a"/></svg>

After

Width:  |  Height:  |  Size: 469 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://c2a3aowyhxj5x"
path="res://.godot/imported/func_get.svg-093f0ce02889d1f102ff9cc3e7f72654.image"
[deps]
source_file="res://addons/script-ide/icon/func_get.svg"
dest_files=["res://.godot/imported/func_get.svg-093f0ce02889d1f102ff9cc3e7f72654.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7s7-3.134 7-7c0-3.866-3.134-7-7-7zm-0.5 2a1 1 0 0 1 0.70703 0.29297l4 4a1 1 0 0 1 0.25977 0.62695 1.0001 1.0001 0 0 1 0 0.16016 1 1 0 0 1-0.25977 0.62695l-4 4a1 1 0 0 1-1.4141 0 1 1 0 0 1 0-1.4141l2.293-2.293h-4.5859a1 1 0 0 1-1-1 1 1 0 0 1 1-1h4.5859l-2.293-2.293a1 1 0 0 1 0-1.4141 1 1 0 0 1 0.70703-0.29297z" fill="#8fc77a"/></svg>

After

Width:  |  Height:  |  Size: 485 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://bvjkrti6kj6o2"
path="res://.godot/imported/func_set.svg-c31168d90866ff1707ad9834754bd2c9.image"
[deps]
source_file="res://addons/script-ide/icon/func_set.svg"
dest_files=["res://.godot/imported/func_set.svg-c31168d90866ff1707ad9834754bd2c9.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#0094ff"/></svg>

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://cupb0polhqrwj"
path="res://.godot/imported/keyword.svg-15ea12cc9eda85ed385533fe57e3bba8.image"
[deps]
source_file="res://addons/script-ide/icon/keyword.svg"
dest_files=["res://.godot/imported/keyword.svg-15ea12cc9eda85ed385533fe57e3bba8.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#ff4949"/></svg>

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://dbwlgnwv5e8kl"
path="res://.godot/imported/property.svg-9e228499f30651faad74aa99e4499d7e.image"
[deps]
source_file="res://addons/script-ide/icon/property.svg"
dest_files=["res://.godot/imported/property.svg-9e228499f30651faad74aa99e4499d7e.image"]
[params]

View File

@ -0,0 +1 @@
<svg width="16" height="16" version="1.1" viewBox="0 0 16 16" xmlns="http://www.w3.org/2000/svg"><path d="m8 1c-3.866 0-7 3.134-7 7 0 3.866 3.134 7 7 7 3.866 0 7-3.134 7-7 0-3.866-3.134-7-7-7z" fill="#ffdb3a"/></svg>

After

Width:  |  Height:  |  Size: 217 B

View File

@ -0,0 +1,14 @@
[remap]
importer="image"
type="Image"
uid="uid://bnccvnaloqnte"
path="res://.godot/imported/signal.svg-97182e1498b520a1ff5b8b9017c3b480.image"
[deps]
source_file="res://addons/script-ide/icon/signal.svg"
dest_files=["res://.godot/imported/signal.svg-97182e1498b520a1ff5b8b9017c3b480.image"]
[params]

View File

@ -0,0 +1,7 @@
[plugin]
name="Script-IDE"
description="Transforms the Script UI into an IDE like UI. Tabs are used for navigating between scripts. The default Outline got an overhaul and now shows all members of the script (not just methods) with unique icons for faster navigation. Enhanced keyboard navigation for Scripts and Outline."
author="Marius Hanl"
version="1.4.6"
script="plugin.gd"

1047
addons/script-ide/plugin.gd Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
[gd_scene load_steps=12 format=3 uid="uid://cbfoxxoamehgg"] [gd_scene load_steps=13 format=3 uid="uid://cbfoxxoamehgg"]
[ext_resource type="Script" path="res://src/viewport.gd" id="3_1olx4"] [ext_resource type="Script" path="res://src/viewport.gd" id="3_1olx4"]
[ext_resource type="SpineAtlasResource" uid="uid://bo3ljqyv75e4b" path="res://assets/characters/pasadena/spine.atlas" id="4_tbp5u"] [ext_resource type="SpineAtlasResource" uid="uid://bo3ljqyv75e4b" path="res://assets/characters/pasadena/spine.atlas" id="4_tbp5u"]
[ext_resource type="Script" path="res://src/spine_sprite.gd" id="5_f351d"] [ext_resource type="Script" path="res://src/spine_sprite.gd" id="5_f351d"]
[ext_resource type="SpineSkeletonFileResource" uid="uid://dy0llktw1x7i6" path="res://assets/characters/pasadena/spine.skel" id="5_k5je5"] [ext_resource type="SpineSkeletonFileResource" uid="uid://dy0llktw1x7i6" path="res://assets/characters/pasadena/spine.skel" id="5_k5je5"]
[sub_resource type="ViewportTexture" id="ViewportTexture_tue73"] [sub_resource type="ViewportTexture" id="ViewportTexture_6ixgq"]
viewport_path = NodePath("MeshInstance3D/SubViewport") viewport_path = NodePath("MeshInstance3D/SubViewport")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a31vv"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_a31vv"]
@ -14,11 +14,9 @@ blend_mode = 4
no_depth_test = true no_depth_test = true
diffuse_mode = 3 diffuse_mode = 3
specular_mode = 1 specular_mode = 1
disable_ambient_light = true
disable_fog = true disable_fog = true
vertex_color_use_as_albedo = true vertex_color_use_as_albedo = true
albedo_texture = SubResource("ViewportTexture_tue73") albedo_texture = SubResource("ViewportTexture_6ixgq")
metallic = 0.55
billboard_mode = 1 billboard_mode = 1
[sub_resource type="QuadMesh" id="QuadMesh_iwcmf"] [sub_resource type="QuadMesh" id="QuadMesh_iwcmf"]
@ -32,6 +30,8 @@ atlas_res = ExtResource("4_tbp5u")
skeleton_file_res = ExtResource("5_k5je5") skeleton_file_res = ExtResource("5_k5je5")
animation_mixes = [SubResource("SpineAnimationMix_piuq6")] animation_mixes = [SubResource("SpineAnimationMix_piuq6")]
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_232ej"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_wn1m5"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_wn1m5"]
[sub_resource type="CylinderShape3D" id="CylinderShape3D_cbp6h"] [sub_resource type="CylinderShape3D" id="CylinderShape3D_cbp6h"]
@ -60,6 +60,7 @@ size = Vector2i(3000, 3000)
light_mask = 0 light_mask = 0
position = Vector2(42, 256) position = Vector2(42, 256)
skeleton_data_res = SubResource("SpineSkeletonDataResource_ufcij") skeleton_data_res = SubResource("SpineSkeletonDataResource_ufcij")
normal_material = SubResource("CanvasItemMaterial_232ej")
preview_skin = "default" preview_skin = "default"
preview_animation = "animation" preview_animation = "animation"
preview_frame = true preview_frame = true

View File

@ -36,14 +36,14 @@ size = Vector2(10, 5)
[sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_flcen"] [sub_resource type="ConcavePolygonShape3D" id="ConcavePolygonShape3D_flcen"]
data = PackedVector3Array(5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5) data = PackedVector3Array(5, 0, 5, -5, 0, 5, 5, 0, -5, -5, 0, 5, -5, 0, -5, 5, 0, -5)
[sub_resource type="ViewportTexture" id="ViewportTexture_80n1l"] [sub_resource type="ViewportTexture" id="ViewportTexture_puele"]
viewport_path = NodePath("MeshInstance3D/SubViewport") viewport_path = NodePath("MeshInstance3D/SubViewport")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mdr1l"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mdr1l"]
transparency = 2 transparency = 2
alpha_scissor_threshold = 0.5 alpha_scissor_threshold = 0.5
alpha_antialiasing_mode = 0 alpha_antialiasing_mode = 0
albedo_texture = SubResource("ViewportTexture_80n1l") albedo_texture = SubResource("ViewportTexture_puele")
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lrfyr"] [sub_resource type="ShaderMaterial" id="ShaderMaterial_lrfyr"]

View File

@ -19,8 +19,8 @@ config/icon="res://icon.svg"
[autoload] [autoload]
GDRx="*res://addons/reactivex/__gdrxsingleton__.gd"
Console="*res://addons/console/console.gd" Console="*res://addons/console/console.gd"
GDRx="*res://addons/reactivex/__gdrxsingleton__.gd"
[display] [display]
@ -36,7 +36,7 @@ project/assembly_name="Test Project"
[editor_plugins] [editor_plugins]
enabled=PackedStringArray("res://addons/Todo_Manager/plugin.cfg", "res://addons/console/plugin.cfg", "res://addons/reactivex/plugin.cfg") enabled=PackedStringArray("res://addons/Todo_Manager/plugin.cfg", "res://addons/console/plugin.cfg", "res://addons/reactivex/plugin.cfg", "res://addons/script-ide/plugin.cfg")
[input] [input]