1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-09 12:50:35 +00:00

In inspector, show 'edit' button instead of 'inspect' when resource is part of an editable scene.

This commit is contained in:
SaracenOne
2022-09-07 10:14:06 +01:00
parent b8977ca333
commit 1e99c13de2
3 changed files with 8 additions and 4 deletions

View File

@@ -186,7 +186,7 @@ void EditorResourcePicker::_update_menu_items() {
// Add options for changing existing value of the resource.
if (edited_resource.is_valid()) {
// Determine if the edited resource is part of another scene (foreign) which was imported
bool is_edited_resource_foreign_import = EditorNode::get_singleton()->is_resource_read_only(edited_resource);
bool is_edited_resource_foreign_import = EditorNode::get_singleton()->is_resource_read_only(edited_resource, true);
// If the resource is determined to be foreign and imported, change the menu entry's description to 'inspect' rather than 'edit'
// since will only be able to view its properties in read-only mode.