Skip to content

Commit 237c709

Browse files
committed
Add blocks to reference nodes in the scene
https://phabricator.endlessm.com/T35497
1 parent 32231ed commit 237c709

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

addons/block_code/ui/picker/categories/category_factory.gd

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,18 @@ static func get_general_categories() -> Array[BlockCategory]:
169169
# Objects & Types
170170
var type_list: Array[Block] = []
171171

172+
b = BLOCKS["parameter_block"].instantiate()
173+
b.block_type = Types.BlockType.NODE
174+
b.block_format = "This object"
175+
b.statement = "self"
176+
type_list.append(b)
177+
178+
b = BLOCKS["parameter_block"].instantiate()
179+
b.block_type = Types.BlockType.NODE
180+
b.block_format = "%{name: STRING}"
181+
b.statement = "%{name}"
182+
type_list.append(b)
183+
172184
b = BLOCKS["parameter_block"].instantiate()
173185
b.block_type = Types.BlockType.STRING
174186
b.block_format = "As String {value}"

0 commit comments

Comments
 (0)