godotengine / godotengine/godot

resource icon is not shown when saving it with custom extension

Open
#93,379 0 comments 1 reaction 0 assignees View on GitHub
bug topic:editor
Dominant language
C++
Stars
117k
Forks
26.8k
PR merge metrics
PR metrics pending

Description

### Tested versions

v4.3.beta1.mono.official [a4f2ea91a]

### System information

Windows 11

### Issue description

I build my custom resource loader and saver to have a custom extension.
When I now save my resource by the custom extension, the resource icon is not shown in the filesystem.

![image](https://github.com/godotengine/godot/assets/347037/f7990915-5173-4a9d-886a-053b3337dc7b)

### Steps to reproduce

Use the attached project and create a new resource from the `GeometryNodeGraphResource`
![image](https://github.com/godotengine/godot/assets/347037/8b5225fe-4d2f-4354-bbb8-91231677ab68)
- do save as `graph.npgh`
![image](https://github.com/godotengine/godot/assets/347037/65bf8ae9-541c-429d-b871-0776b4c90a46)
- do save as `graph.tres`
You can see the icon is only shown for the *.tres extension.
![image](https://github.com/godotengine/godot/assets/347037/9217625b-f166-41cd-b9d0-143482716667)

## Additional Info
On v4.2.2.stable.official [15073afe3] the custom resource load save is completely broken :(

![image](https://github.com/godotengine/godot/assets/347037/b2b69b88-fdf0-46f5-8de2-3bc0d6c1af13)

### Minimal reproduction project (MRP)

[fileicon.zip](https://github.com/user-attachments/files/15910660/fileicon.zip)

Contributor guide

Open the contributing guide

Research direction

Start with the attached fileicon.zip minimal reproduction project and reproduce saving GeometryNodeGraphResource as graph.npgh versus graph.tres on Windows. Trace the editor filesystem icon handling for custom resource extensions; done means the custom-extension resource shows the same icon as the corresponding .tres resource without regressing custom resource loading and saving.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.