@@ -5,12 +5,44 @@ extends EditorPlugin
55const MainPanel := preload ("res://addons/block_code/ui/main_panel.tscn" )
66static var main_panel
77
8- var script_ok_button : Button
9- var script_ok_prev_connection : Dictionary
10- var prev_opened_script_idx : int
11-
128var old_feature_profile : String = ""
139
10+ const DISABLED_CLASSES := [
11+ "BlockScriptData" ,
12+ "DragManager" ,
13+ "InstructionTree" ,
14+ "EditorInterfaceAccess" ,
15+ "SimpleCharacter" ,
16+ "Types" ,
17+ "BasicBlock" ,
18+ "Block" ,
19+ "ControlBlock" ,
20+ "ParameterBlock" ,
21+ "StatementBlock" ,
22+ "DragDropArea" ,
23+ "SnapPoint" ,
24+ "NodeBlockCanvas" ,
25+ "SerializedBlockTreeNodeArray" ,
26+ "SerializedBlockTreeNode" ,
27+ "SerializedBlock" ,
28+ "PackedSceneTreeNodeArray" ,
29+ "PackedSceneTreeNode" ,
30+ "BlockCanvas" ,
31+ "NodeCanvas" ,
32+ "NodeClass" ,
33+ "NodeClassList" ,
34+ "NodeData" ,
35+ "NodePreview" ,
36+ "NodeList" ,
37+ "CategoryFactory" ,
38+ "BlockCategoryDisplay" ,
39+ "BlockCategory" ,
40+ "Picker" ,
41+ "TitleBar" ,
42+ "MainPanel" ,
43+ "BlockCodePlugin"
44+ ]
45+
1446
1547func _enter_tree ():
1648 main_panel = MainPanel .instantiate ()
@@ -25,50 +57,14 @@ func _enter_tree():
2557 add_autoload_singleton ("SignalManager" , "res://addons/block_code/block_code_node/utilities/signal_manager.gd" )
2658
2759 # Remove unwanted class nodes from create node
28- var remove_list := [
29- "BlockScriptData" ,
30- "DragManager" ,
31- "InstructionTree" ,
32- "EditorInterfaceAccess" ,
33- "SimpleCharacter" ,
34- "Types" ,
35- "BasicBlock" ,
36- "Block" ,
37- "ControlBlock" ,
38- "ParameterBlock" ,
39- "StatementBlock" ,
40- "DragDropArea" ,
41- "SnapPoint" ,
42- "NodeBlockCanvas" ,
43- "SerializedBlockTreeNodeArray" ,
44- "SerializedBlockTreeNode" ,
45- "SerializedBlock" ,
46- "PackedSceneTreeNodeArray" ,
47- "PackedSceneTreeNode" ,
48- "BlockCanvas" ,
49- "NodeCanvas" ,
50- "NodeClass" ,
51- "NodeClassList" ,
52- "NodeData" ,
53- "NodePreview" ,
54- "NodeList" ,
55- "CategoryFactory" ,
56- "BlockCategoryDisplay" ,
57- "BlockCategory" ,
58- "Picker" ,
59- "TitleBar" ,
60- "MainPanel" ,
61- "BlockCodePlugin"
62- ]
63-
6460 old_feature_profile = EditorInterface .get_current_feature_profile ()
6561
6662 var editor_paths : EditorPaths = EditorInterface .get_editor_paths ()
6763 if editor_paths :
6864 var config_dir := editor_paths .get_config_dir ()
6965 var new_profile := EditorFeatureProfile .new ()
7066 new_profile .load_from_file (config_dir + "/feature_profiles/" + old_feature_profile + ".profile" )
71- for _class_name in remove_list :
67+ for _class_name in DISABLED_CLASSES :
7268 new_profile .set_disable_class (_class_name , true )
7369
7470 var dir = config_dir + "/feature_profiles/block_code.profile"
@@ -93,10 +89,6 @@ func _exit_tree():
9389 EditorInterface .set_current_feature_profile ("" )
9490
9591
96- func _reconnect_signal (_signal : Signal , _data : Dictionary ):
97- _signal .connect (_data .callable , _data .flags )
98-
99-
10092func _has_main_screen ():
10193 return true
10294
0 commit comments