You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-07 12:30:27 +00:00
Add alert in anim trees if resource load fails
Add_menu_type implements a resource loading, but only when the resource is initially valid. No alert message is shown if the resource isn't valid, leaving the user without feedback. This commit adds an else clause to the is_valid command to give feedback to the user when loading an animationPlaybackNode into an animation tree fails.
This commit is contained in:
@@ -363,6 +363,8 @@ void AnimationNodeBlendSpace1DEditor::_file_opened(const String &p_file) {
|
||||
file_loaded = ResourceLoader::load(p_file);
|
||||
if (file_loaded.is_valid()) {
|
||||
_add_menu_type(MENU_LOAD_FILE_CONFIRM);
|
||||
} else {
|
||||
EditorNode::get_singleton()->show_warning(TTR("This type of node can't be used. Only root nodes are allowed."));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user