mirror of
https://gitlab.com/MaddoScientisto/cirnogodot.git
synced 2026-06-10 03:45:55 +00:00
Broken graph editor
This commit is contained in:
parent
6215008db7
commit
f996513dca
16 changed files with 1033 additions and 12 deletions
32
addons/bullet_script_graph_editor/plugin.gd
Normal file
32
addons/bullet_script_graph_editor/plugin.gd
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
@tool
|
||||
extends EditorPlugin
|
||||
|
||||
const GraphEditorDockScene := preload("res://addons/bullet_script_graph_editor/ui/graph_editor_dock.tscn")
|
||||
const InspectorPluginScript := preload("res://addons/bullet_script_graph_editor/inspector_plugin.gd")
|
||||
|
||||
var _dock_instance: PanelContainer
|
||||
var _inspector_plugin: EditorInspectorPlugin
|
||||
|
||||
func _enter_tree() -> void:
|
||||
_dock_instance = GraphEditorDockScene.instantiate()
|
||||
_dock_instance.setup(get_editor_interface())
|
||||
add_control_to_bottom_panel(_dock_instance, "Bullet Graph")
|
||||
|
||||
_inspector_plugin = InspectorPluginScript.new()
|
||||
_inspector_plugin.setup(self)
|
||||
add_inspector_plugin(_inspector_plugin)
|
||||
|
||||
func _exit_tree() -> void:
|
||||
if _inspector_plugin:
|
||||
remove_inspector_plugin(_inspector_plugin)
|
||||
_inspector_plugin = null
|
||||
|
||||
if _dock_instance:
|
||||
remove_control_from_bottom_panel(_dock_instance)
|
||||
_dock_instance.queue_free()
|
||||
_dock_instance = null
|
||||
|
||||
func open_resource_in_graph(resource: Resource) -> void:
|
||||
if _dock_instance == null:
|
||||
return
|
||||
_dock_instance.open_resource(resource)
|
||||
Loading…
Add table
Add a link
Reference in a new issue