diff --git a/demo/addons/blendalot/blendalot_main_panel.gd b/demo/addons/blendalot/blendalot_main_panel.gd new file mode 100644 index 0000000..46e7bdf --- /dev/null +++ b/demo/addons/blendalot/blendalot_main_panel.gd @@ -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!") diff --git a/demo/addons/blendalot/blendalot_main_panel.gd.uid b/demo/addons/blendalot/blendalot_main_panel.gd.uid new file mode 100644 index 0000000..40b1784 --- /dev/null +++ b/demo/addons/blendalot/blendalot_main_panel.gd.uid @@ -0,0 +1 @@ +uid://dvulvuytt81lw diff --git a/demo/addons/blendalot/blendalot_main_panel.tscn b/demo/addons/blendalot/blendalot_main_panel.tscn new file mode 100644 index 0000000..796e64c --- /dev/null +++ b/demo/addons/blendalot/blendalot_main_panel.tscn @@ -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"] diff --git a/demo/addons/blendalot/blendalot_plugin.gd b/demo/addons/blendalot/blendalot_plugin.gd new file mode 100644 index 0000000..47c4336 --- /dev/null +++ b/demo/addons/blendalot/blendalot_plugin.gd @@ -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") diff --git a/demo/addons/blendalot/blendalot_plugin.gd.uid b/demo/addons/blendalot/blendalot_plugin.gd.uid new file mode 100644 index 0000000..3a5113c --- /dev/null +++ b/demo/addons/blendalot/blendalot_plugin.gd.uid @@ -0,0 +1 @@ +uid://c33pycuedrx4n diff --git a/demo/addons/blendalot/plugin.cfg b/demo/addons/blendalot/plugin.cfg new file mode 100644 index 0000000..da0f9eb --- /dev/null +++ b/demo/addons/blendalot/plugin.cfg @@ -0,0 +1,7 @@ +[plugin] + +name="Blendalot Animation Graphs" +description="" +author="Martin Felis " +version="0.0.1" +script="blendalot_plugin.gd"