Skip to content

Commit

Permalink
Reduce first import errors
Browse files Browse the repository at this point in the history
  • Loading branch information
manuq committed Jun 13, 2024
1 parent 656da20 commit 61bbd2e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 3 deletions.
4 changes: 4 additions & 0 deletions addons/block_code/block_code_plugin.gd
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ var old_feature_profile: String = ""


func _enter_tree():
# Hack for `EditorInterface.open_scene_from_path()`, see: https://github.com/godotengine/godot/issues/86869
for _frame in range(10):
await get_tree().process_frame

main_panel = MainPanel.instantiate()
main_panel.undo_redo = get_undo_redo()

Expand Down
10 changes: 8 additions & 2 deletions addons/block_code/ui/main_panel.gd
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@
class_name MainPanel
extends Control

const EditorInterfaceAccess = preload("res://addons/block_code/lib/editor_interface_access.gd")
const Picker = preload("res://addons/block_code/ui/picker/picker.gd")
const BlockCanvas = preload("res://addons/block_code/ui/block_canvas/block_canvas.gd")
const DragManager = preload("res://addons/block_code/drag_manager/drag_manager.gd")
const TitleBar = preload("res://addons/block_code/ui/title_bar/title_bar.gd")
const BlockScriptData = preload("res://addons/block_code/block_script_data/block_script_data.gd")
const BlockCode = preload("res://addons/block_code/block_code_node/block_code.gd")

var eia: EditorInterfaceAccess

@onready var _picker: Picker = %Picker
@onready var _block_canvas: BlockCanvas = %NodeBlockCanvas
@onready var _drag_manager: DragManager = %DragManager
#@onready var _node_canvas := %NodeCanvas
#@onready var _node_list: NodeList = %NodeList
@onready var _title_bar: TitleBar = %TitleBar

var block_code_tab: Button
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
class_name BlockCategoryDisplay
extends MarginContainer

var category: BlockCategory
const BlockCategory = preload("res://addons/block_code/ui/picker/categories/block_category.gd")
const Block = preload("res://addons/block_code/ui/blocks/block/block.gd")

var category: BlockCategory
@onready var _label := %Label
@onready var _blocks := %Blocks
@onready var _background := %Background
Expand Down

0 comments on commit 61bbd2e

Please sign in to comment.