Skip to content
Merged
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
1 change: 1 addition & 0 deletions addons/dialogic/Editor/CharacterEditor/character_editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ func new_character(path: String) -> void:
resource.default_portrait = ""
resource.custom_info = {}
ResourceSaver.save(resource, path)
EditorInterface.get_resource_filesystem().update_file(path)
DialogicResourceUtil.update_directory('dch')
editors_manager.edit_resource(resource)

Expand Down
1 change: 1 addition & 0 deletions addons/dialogic/Editor/TimelineEditor/timeline_editor.gd
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,7 @@ func new_timeline(path:String) -> void:
new_timeline.resource_path = path
new_timeline.set_meta('timeline_not_saved', true)
var err := ResourceSaver.save(new_timeline)
EditorInterface.get_resource_filesystem().update_file(new_timeline.resource_path)
DialogicResourceUtil.update_directory('dtl')
editors_manager.edit_resource(new_timeline)

Expand Down
11 changes: 10 additions & 1 deletion addons/dialogic/Resources/CharacterResourceLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ func _get_recognized_extensions() -> PackedStringArray:
return PackedStringArray(["dch"])


## Returns "Rrsource" if this file can/should be loaded by this script
## Returns "Resource" if this file can/should be loaded by this script
func _get_resource_type(path: String) -> String:
var ext := path.get_extension().to_lower()
if ext == "dch":
Expand All @@ -18,6 +18,15 @@ func _get_resource_type(path: String) -> String:
return ""


## Returns the script class associated with a Resource
func _get_resource_script_class(path: String) -> String:
var ext := path.get_extension().to_lower()
if ext == "dch":
return "DialogicCharacter"

return ""


## Return true if this type is handled
func _handles_type(typename: StringName) -> bool:
return ClassDB.is_parent_class(typename, "Resource")
Expand Down
11 changes: 10 additions & 1 deletion addons/dialogic/Resources/TimelineResourceLoader.gd
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ func _get_recognized_extensions() -> PackedStringArray:
return PackedStringArray(["dtl"])


## Returns "Rrsource" if this file can/should be loaded by this script
## Returns "Resource" if this file can/should be loaded by this script
func _get_resource_type(path: String) -> String:
var ext := path.get_extension().to_lower()
if ext == "dtl":
Expand All @@ -17,6 +17,15 @@ func _get_resource_type(path: String) -> String:
return ""


## Returns the script class associated with a Resource
func _get_resource_script_class(path: String) -> String:
var ext := path.get_extension().to_lower()
if ext == "dtl":
return "DialogicTimeline"

return ""


## Return true if this type is handled
func _handles_type(typename: StringName) -> bool:
return ClassDB.is_parent_class(typename, "Resource")
Expand Down
Loading