Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't check resource type assigned in property #84446

Merged
merged 1 commit into from
Apr 26, 2024
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
2 changes: 1 addition & 1 deletion editor/editor_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3448,7 +3448,7 @@ void EditorPropertyResource::update_property() {
}
}

resource_picker->set_edited_resource(res);
resource_picker->set_edited_resource_no_check(res);
}

void EditorPropertyResource::collapse_all_folding() {
Expand Down
3 changes: 3 additions & 0 deletions editor/editor_resource_picker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -903,7 +903,10 @@ void EditorResourcePicker::set_edited_resource(Ref<Resource> p_resource) {
ERR_FAIL_MSG(vformat("Failed to set a resource of the type '%s' because this EditorResourcePicker only accepts '%s' and its derivatives.", class_str, base_type));
}
}
set_edited_resource_no_check(p_resource);
}

void EditorResourcePicker::set_edited_resource_no_check(Ref<Resource> p_resource) {
edited_resource = p_resource;
_update_resource();
}
Expand Down
1 change: 1 addition & 0 deletions editor/editor_resource_picker.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ class EditorResourcePicker : public HBoxContainer {
Vector<String> get_allowed_types() const;

void set_edited_resource(Ref<Resource> p_resource);
void set_edited_resource_no_check(Ref<Resource> p_resource);
Ref<Resource> get_edited_resource();

void set_toggle_mode(bool p_enable);
Expand Down
Loading