mirror of
				https://github.com/godotengine/godot.git
				synced 2025-10-31 13:41:03 +00:00 
			
		
		
		
	Add read-only info to resource embedded in other scenes.
This commit is contained in:
		
							parent
							
								
									06d5189167
								
							
						
					
					
						commit
						ada1f66fc1
					
				
					 1 changed files with 5 additions and 11 deletions
				
			
		|  | @ -2342,22 +2342,16 @@ void EditorNode::_edit_current(bool p_skip_foreign) { | ||||||
| 		int subr_idx = current_res->get_path().find("::"); | 		int subr_idx = current_res->get_path().find("::"); | ||||||
| 		if (subr_idx != -1) { | 		if (subr_idx != -1) { | ||||||
| 			String base_path = current_res->get_path().substr(0, subr_idx); | 			String base_path = current_res->get_path().substr(0, subr_idx); | ||||||
| 			if (!base_path.is_resource_file()) { |  | ||||||
| 			if (FileAccess::exists(base_path + ".import")) { | 			if (FileAccess::exists(base_path + ".import")) { | ||||||
|  | 				if (!base_path.is_resource_file()) { | ||||||
| 					if (get_edited_scene() && get_edited_scene()->get_scene_file_path() == base_path) { | 					if (get_edited_scene() && get_edited_scene()->get_scene_file_path() == base_path) { | ||||||
| 						info_is_warning = true; | 						info_is_warning = true; | ||||||
| 					} | 					} | ||||||
|  | 				} | ||||||
| 				editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); | 				editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); | ||||||
| 				} else { | 			} else if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") { | ||||||
| 					if ((!get_edited_scene() || get_edited_scene()->get_scene_file_path() != base_path) && ResourceLoader::get_resource_type(base_path) == "PackedScene") { |  | ||||||
| 				editable_info = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it must be made inside the original scene."); | 				editable_info = TTR("This resource belongs to a scene that was instantiated or inherited.\nChanges to it must be made inside the original scene."); | ||||||
| 			} | 			} | ||||||
| 				} |  | ||||||
| 			} else { |  | ||||||
| 				if (FileAccess::exists(base_path + ".import")) { |  | ||||||
| 					editable_info = TTR("This resource belongs to a scene that was imported, so it's not editable.\nPlease read the documentation relevant to importing scenes to better understand this workflow."); |  | ||||||
| 				} |  | ||||||
| 			} |  | ||||||
| 		} else if (current_res->get_path().is_resource_file()) { | 		} else if (current_res->get_path().is_resource_file()) { | ||||||
| 			if (FileAccess::exists(current_res->get_path() + ".import")) { | 			if (FileAccess::exists(current_res->get_path() + ".import")) { | ||||||
| 				editable_info = TTR("This resource was imported, so it's not editable. Change its settings in the import panel and then re-import."); | 				editable_info = TTR("This resource was imported, so it's not editable. Change its settings in the import panel and then re-import."); | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Saracen
						Saracen