-
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
14 additions
and
28 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
33 changes: 8 additions & 25 deletions
33
addons/godot_resource_groups/godot_resource_groups_export_plugin.gd
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,31 +1,14 @@ | ||
@tool | ||
extends EditorExportPlugin | ||
|
||
#const ResourceScanner = preload("resource_scanner.gd") | ||
var _on_export:Callable | ||
|
||
func _init(on_export:Callable): | ||
_on_export = on_export | ||
|
||
func _begin_customize_resources(platform: EditorExportPlatform, features: PackedStringArray) -> bool: | ||
return true | ||
|
||
func _get_name() -> String: | ||
return "Godot Resource Groups Export Plugin" | ||
func _export_begin(features, is_debug, path, flags): | ||
_on_export.call() | ||
|
||
func _customize_resource(resource: Resource, path: String) -> Resource: | ||
print("Customizing resource: ", path) | ||
# re-scan resource paths for ResourceGroup on export | ||
# if resource is ResourceGroup: | ||
# print("Updating resource group before export: ", path) | ||
# var group:ResourceGroup = resource as ResourceGroup | ||
# var resource_scanner = ResourceScanner.new(group) | ||
# var resource_paths = resource_scanner.scan() | ||
# group.paths = resource_paths | ||
# return group | ||
|
||
# everything else we don't care about | ||
return null | ||
|
||
func _customize_scene(scene: Node, path: String) -> Node: | ||
return null | ||
|
||
|
||
func _get_customization_configuration_hash() -> int: | ||
return 0 | ||
func _get_name() -> String: | ||
return "Godot Resource Groups Export Plugin" |