-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Godot keeps changing ids in theme #74001
Comments
Judging by your screenshot, this happens with the bundled font, and is kind of expected. For the record, you don't have to make a copy of the entire default theme, and at the very least you don't have to bundle the fonts. Themes merge together, and your project theme only needs to contain the parts that you override from the default one. |
That is interesting, because this is what we have in the theme and I don't see any fonts there |
Well, I can be wrong, there is only so much I can tell from a screenshot. If you can't provide an MRP, you can try debugging it yourself by recreating the theme anew and adding only the stuff you need. |
As an update, including any fonts or textures in your theme from the default theme causes this issue. |
I have the same issue, and it seems to affect ImageTexture IDs specifically. The effect is similar to how a material flagged Local to Scene keeps changing its ShaderMaterial ID (an issue I have yet to report, as I'll try to make a MRP first), but since this is a resource and there is no Local to Scene to check, the cause must be different. |
I forgot the post the issue I created for Material ID: #77997 |
godot/scene/resources/image_texture.cpp Line 93 in fc99492
godot/servers/rendering/renderer_rd/storage_rd/texture_storage.cpp Lines 1566 to 1567 in fc99492
Setting It seems that the image of |
Similar to #55190. |
At the same time, I feel the need to solve a problem. When I copy a node, such as an animation_player, the id of the sub_resource does not change. This can lead to confusing issues. Here is my case: I am currently creating multiple monsters, some of which require AnimationPlayer and Sprite2D nodes. After creating one monster, I want to quickly copy these two nodes to other monster nodes. I expect the nodes to be copied normally. However, the AnimationPlayer node is actually copied with the same id as the resource type, and when I make changes to other monsters, the previous monster is unknowingly affected and damaged. |
same here... it changes the theme file even if i don't change anything in the theme... got a changed theme file on every commit... |
This comment was marked as off-topic.
This comment was marked as off-topic.
Can someone just shortly reiterate what the current workaround is (except for ignoring the id changes)? |
Remove resources (fonts/textures) from your theme file that reference the default theme or maybe make them unique? |
Thanks a ton @jamie-pate !
EDIT: No, that was the wrong button. This one ( I couldn't find any resources that were referencing the default theme (it should be in the resource path, am I right? all of those referenced my own theme). |
We have the same issue and it's driving me crazy that default_theme.tres keeps changing just because it decides to change IDs, so that file gets commited in Github every single commit. |
Here is my absurd workaround that possibly might have bad consequences for the integrity of your project:
Godot will complain about not being able to write to the file whenever you save, but it appears to work... |
Thanks for the suggestions, but that's not really a viable workaround for us, and I find it rather absurd. Has there been any official word about this bug yet? |
The ID change because you have ImageTexture embedded in your Theme. Trying to get Image of ImageTexture will always return a new instance (#25209), hence the IDs will change. We already have a warning when importing theme icons: |
I think the warning doesn't really let you know how it's not just bigger
but it's unstable and will change frequently which makes it practically
incompatible with source control .
…On Wed, Jul 24, 2024, 21:48 Tomek ***@***.***> wrote:
The ID change because you have ImageTexture embedded in your Theme. Trying
to get Image of ImageTexture will always return a new instance (#25209
<#25209>), hence the IDs will
change.
We already have a warning when importing theme icons:
image.png (view on web)
<https://github.com/user-attachments/assets/6ecb3466-820d-480f-98f5-aa7383cf3914>
I guess it could clarify what does it mean exactly or maybe it should be
outright not allowed, because icons imported from default/editor theme get
embedded. The only way to "fix" this is to save each icon to a new file, so
it gets referenced as an external dependency.
—
Reply to this email directly, view it on GitHub
<#74001 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAP4ANGESGCGROCLYOYODM3ZN6WCTAVCNFSM6AAAAAAVIUBDYGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENBXHE4TIOJSGU>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
This isn't an issue with themes I don't think - I am using ImageTexture in my project and every time the project loads the internal id of the sub-resource containing the image data is changed. The IDs change even when no changes to the image occur - i.e. just opening and closing the editor changes the IDs, I assume it is the loading and unloading of the resource that does it. I have tried everything I can think of and everything recommended on other threads to try and fix this but nothing works. This the the kind of ID that keeps changing in the ImageTexture:
If anyone has any ideas I'd be very grateful. |
For me, (I think) it was that I had to recreate my theme without starting from a copy of the default theme. |
Save the Image as file instead of embeddimg it. From the inspector, not using script. |
@basilicon Thank you so much for the step by step solution that at last I was able to follow. Your post will be remembered! Now I don't care that much anymore if it's fixed or not, this workaround is sufficient for me. |
Bugsquad note: This issue has been confirmed several times already. No need to confirm it further.
Godot version
4.0 rc5
System information
Windows 10 and Linux
Issue description
My friend and I are working on a game and we have a theme that we use for all of our UI.
We created it by importing it from the default theme and making some changes (not very important as this was happening before we made the changes)
Every time we save the project if the person who was saving isn't the last one to have commited a change to the theme it changes all the ids on the entries
Example image
![image](https://user-images.githubusercontent.com/3696546/221431550-2a3882d1-bbe2-43aa-b153-34c709fa8116.png)
Notably I am working on the windows release of rc5 while my friend is on the linux release, I assume that has something to do with this issue.
Steps to reproduce
Minimal reproduction project
N/A
The text was updated successfully, but these errors were encountered: