-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from endlessm/godotcon
Update plugin & add GodotCon demo
- Loading branch information
Showing
193 changed files
with
9,528 additions
and
8,625 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 14 additions & 3 deletions
17
addons/block_code/blocks/communication/add_node_to_group.tres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,27 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://bpvefei72nh3a"] | ||
[gd_resource type="Resource" load_steps=5 format=3 uid="uid://bpvefei72nh3a"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_5qal7"] | ||
[ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_auf06"] | ||
[ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_p83c7"] | ||
|
||
[sub_resource type="Resource" id="Resource_sus0f"] | ||
script = ExtResource("1_auf06") | ||
selected = 0 | ||
items = [] | ||
|
||
[resource] | ||
script = ExtResource("1_5qal7") | ||
name = &"add_node_to_group" | ||
target_node_class = "" | ||
description = "Add the node into the group" | ||
category = "Communication | Groups" | ||
type = 2 | ||
variant_type = 0 | ||
display_template = "Add {node: OBJECT} to group {group: STRING}" | ||
display_template = "add {node: OBJECT} to group {group: STRING}" | ||
code_template = "{node}.add_to_group({group})" | ||
defaults = {} | ||
defaults = { | ||
"group": SubResource("Resource_sus0f") | ||
} | ||
signal_name = "" | ||
scope = "" | ||
extension_script = ExtResource("1_p83c7") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 17 additions & 5 deletions
22
addons/block_code/blocks/communication/call_method_group.tres
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,27 @@ | ||
[gd_resource type="Resource" load_steps=2 format=3 uid="uid://c15vtdfihdxb8"] | ||
[gd_resource type="Resource" load_steps=5 format=3 uid="uid://c15vtdfihdxb8"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_3nuts"] | ||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_mlm68"] | ||
[ext_resource type="Script" path="res://addons/block_code/blocks/communication/groups.gd" id="1_of577"] | ||
|
||
[sub_resource type="Resource" id="Resource_f4ctg"] | ||
script = ExtResource("1_3nuts") | ||
selected = 0 | ||
items = [] | ||
|
||
[resource] | ||
script = ExtResource("1_mlm68") | ||
name = &"call_method_group" | ||
target_node_class = "" | ||
description = "Calls the method/function on each member of the given group" | ||
category = "Communication | Methods" | ||
type = 2 | ||
variant_type = 0 | ||
display_template = "Call method {method_name: STRING} in group {group: STRING}" | ||
display_template = "call method {method_name: STRING} in group {group: STRING}" | ||
code_template = "get_tree().call_group({group}, {method_name})" | ||
description = "Calls the method/function on each member of the given group" | ||
category = "Communication | Methods" | ||
defaults = {} | ||
defaults = { | ||
"group": SubResource("Resource_f4ctg") | ||
} | ||
signal_name = "" | ||
scope = "" | ||
extension_script = ExtResource("1_of577") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
@tool | ||
extends BlockExtension | ||
|
||
const OptionData = preload("res://addons/block_code/code_generation/option_data.gd") | ||
const Util = preload("res://addons/block_code/ui/util.gd") | ||
|
||
|
||
func _find_paths(paths: Array[NodePath], node: Node, path_root: Node, block_parent: Node): | ||
# Add any non-BlockCode nodes that aren't the parent of the current | ||
# BlockCode node. | ||
if not node is BlockCode: | ||
var node_path: NodePath = Util.node_scene_path(node, block_parent, path_root) | ||
if not node_path in [^"", ^"."]: | ||
paths.append(node_path) | ||
|
||
for child in node.get_children(): | ||
_find_paths(paths, child, path_root, block_parent) | ||
|
||
|
||
func get_defaults_for_node(context_node: Node) -> Dictionary: | ||
# The default paths are only needed in the editor. | ||
if not Engine.is_editor_hint(): | ||
return {} | ||
|
||
var scene_root: Node = EditorInterface.get_edited_scene_root() | ||
var path_root: Node = scene_root.get_parent() | ||
var paths: Array[NodePath] | ||
_find_paths(paths, scene_root, path_root, context_node) | ||
|
||
if not paths: | ||
return {} | ||
|
||
return {"path": OptionData.new(paths)} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
[gd_resource type="Resource" load_steps=5 format=3 uid="uid://canpdkahokjqs"] | ||
|
||
[ext_resource type="Script" path="res://addons/block_code/code_generation/option_data.gd" id="1_bk47y"] | ||
[ext_resource type="Script" path="res://addons/block_code/code_generation/block_definition.gd" id="1_d60g7"] | ||
[ext_resource type="Script" path="res://addons/block_code/blocks/communication/get_node.gd" id="1_we5wl"] | ||
|
||
[sub_resource type="Resource" id="Resource_esr4a"] | ||
script = ExtResource("1_bk47y") | ||
selected = 0 | ||
items = [] | ||
|
||
[resource] | ||
script = ExtResource("1_d60g7") | ||
name = &"get_node" | ||
target_node_class = "" | ||
description = "Get the node at the given path" | ||
category = "Communication | Nodes" | ||
type = 3 | ||
variant_type = 24 | ||
display_template = "{path: NIL}" | ||
code_template = "get_node(\"{path}\")" | ||
defaults = { | ||
"path": SubResource("Resource_esr4a") | ||
} | ||
signal_name = "" | ||
scope = "" | ||
extension_script = ExtResource("1_we5wl") |
Oops, something went wrong.