Started working on editor to create and test more complex graphs.

This commit is contained in:
Martin Felis 2026-01-18 23:27:59 +01:00
parent 625a3ae79f
commit 67acbb35b3
6 changed files with 103 additions and 0 deletions

View File

@ -0,0 +1,16 @@
@tool
extends Control
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
pass
func _on_hit_me_button_pressed() -> void:
print("Hello from the main screen plugin!")

View File

@ -0,0 +1 @@
uid://dvulvuytt81lw

View File

@ -0,0 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://31c6depvs0y1"]
[ext_resource type="Script" uid="uid://dvulvuytt81lw" path="res://addons/blendalot/blendalot_main_panel.gd" id="1_427jg"]
[node name="BlendalotMainPanel" type="Control" unique_id=1259518158]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
size_flags_horizontal = 3
size_flags_vertical = 3
script = ExtResource("1_427jg")
[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=2044593527]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="HitMeButton" type="Button" parent="VBoxContainer" unique_id=1060776498]
layout_mode = 2
size_flags_horizontal = 0
text = "Hit me!"
[node name="GraphFrame" type="GraphFrame" parent="VBoxContainer" unique_id=184673233]
layout_mode = 2
size_flags_vertical = 3
[connection signal="pressed" from="VBoxContainer/HitMeButton" to="." method="_on_hit_me_button_pressed"]

View File

@ -0,0 +1,45 @@
@tool
extends EditorPlugin
const MainPanel = preload("res://addons/blendalot/blendalot_main_panel.tscn")
var main_panel_instance
func _enable_plugin() -> void:
# Add autoloads here.
pass
func _disable_plugin() -> void:
# Remove autoloads here.
pass
func _enter_tree() -> void:
main_panel_instance = MainPanel.instantiate()
# Add the main panel to the editor's main viewport.
EditorInterface.get_editor_main_screen().add_child(main_panel_instance)
# Hide the main panel. Very much required.
_make_visible(false)
func _exit_tree() -> void:
if main_panel_instance:
main_panel_instance.queue_free()
func _has_main_screen():
return true
func _make_visible(visible):
if main_panel_instance:
main_panel_instance.visible = visible
func _get_plugin_name():
return "Blendalot"
func _get_plugin_icon():
return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons")

View File

@ -0,0 +1 @@
uid://c33pycuedrx4n

View File

@ -0,0 +1,7 @@
[plugin]
name="Blendalot Animation Graphs"
description=""
author="Martin Felis <martin@fysx.org>"
version="0.0.1"
script="blendalot_plugin.gd"