Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce first import errors #22

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading