-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
Fix MeshLibrary and GridMap change notifications #76468
Conversation
Fixes MeshLibrary and GridMap change notifications.
Doesn't seem enough to close the issue: godot.windows.editor.dev.x86_64_ZJyT11LZVE.mp4The preview is not updated when material changes. |
Not sure how to handle this. The palette used fixed images that can be customized by the user or not, else the preview property wouldn't be exposed on the MeshLibrary item. But there is no distiction between the auto-generated preview and a user defined custom preview. So we can't just auto-update the preview on (sub) resource changed signals cause then any user custom preview gets replaced by a generic preview again. |
We could store them separately internally, could we not? And return the auto-generated one if user never set a custom one. The signal can be fired whenever any one of them changes, it shouldn't be a problem. |
On a side note, I don't know who thought that storing the preview inside the library is a good idea. The image is getting embedded in the resource. If you inspect the library from the MRP, 90% of its content is binary data saved as text. I wonder if users really use this feature for custom previews, or if we could just make this property not stored. Alternatively we could add a new property like |
Reacting to changes in the subresources revealed that there is a problem with a cascade of update trigger by it. I think this should be left for another pr because so far I don't even know what parts of the Editor trigger all those extra updates. Same as with changing the preview image storage. |
What does it look like? What's the impact on the editor or the user? |
Fixes MeshLibrary and GridMap change notifications.
Fixes a part of #76429.
Properly other older bug reports that had issues with Editor GridMap palette updates as well.