-
-
Notifications
You must be signed in to change notification settings - Fork 21.7k
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
EditorExportPlugin
: skip()
can cause issues when customizing a CompressedTexture2D
#94045
Comments
Simply not skipping the This means that, for the specific case of This bug is definitely still an issue because it requires the user to handle |
…behaviour of customizing texture resources. The list of types that should not be both customized and skipped was created through trial-and-error with the following import types: - AnimationLibrary - BitMap - Translation - CompressedCubemap - CompressedCubemapArray - FontFile - FontFile - FontFile - RDShaderFile - Image - AudioStreamMP3 - AudioStreamWAV - ArrayMesh - PackedScene - CompressedTexture2D - CompressedTexture2DArray - CompressedTexture3D - AtlasTexture - AudioStreamOggVorbis The reason `skip()` should not be called is because the original resource will now point to the `.ctex` (or equivalent) file of the resource that replaced it. In this scenario, the `.ctex` file that was initially referenced by the original resource will no longer be included in the project. Co-authored-by: Tomek <kobewi4e@gmail.com>
…behaviour of customizing texture resources. The list of types that should not be both customized and skipped was created through trial-and-error with the following import types: - AnimationLibrary - BitMap - Translation - CompressedCubemap - CompressedCubemapArray - FontFile - FontFile - FontFile - RDShaderFile - Image - AudioStreamMP3 - AudioStreamWAV - ArrayMesh - PackedScene - CompressedTexture2D - CompressedTexture2DArray - CompressedTexture3D - AtlasTexture - AudioStreamOggVorbis The reason `skip()` should not be called is because the original resource will now point to the `.ctex` (or equivalent) file of the resource that replaced it. In this scenario, the `.ctex` file that was initially referenced by the original resource will no longer be included in the project. Co-authored-by: Tomek <kobewi4e@gmail.com>
Now that the behaviour is documented, this issue could maybe be closed? I don’t see it being fixed any time soon, at the very least… |
…behaviour of customizing texture resources. The list of types that should not be both customized and skipped was created through trial-and-error with the following import types: - AnimationLibrary - BitMap - Translation - CompressedCubemap - CompressedCubemapArray - FontFile - FontFile - FontFile - RDShaderFile - Image - AudioStreamMP3 - AudioStreamWAV - ArrayMesh - PackedScene - CompressedTexture2D - CompressedTexture2DArray - CompressedTexture3D - AtlasTexture - AudioStreamOggVorbis The reason `skip()` should not be called is because the original resource will now point to the `.ctex` (or equivalent) file of the resource that replaced it. In this scenario, the `.ctex` file that was initially referenced by the original resource will no longer be included in the project. Co-authored-by: Tomek <kobewi4e@gmail.com>
Tested versions
Commit 932c191 onwards
System information
Godot v4.3.beta (b97110c) - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 980 Ti (NVIDIA; 31.0.15.3699) - Intel(R) Core(TM) i7-6700K CPU @ 4.00GHz (8 Threads)
Issue description
I made changes to
EditorExportPlugin
in PR #93878 that allowed all resources to be skipped through the_export_file
function. I have found no issues with most imported files, such as.wav
audio files, but have found an issue that I believe is specific toTexture2D
's interaction between_customize_resource
andskip()
.Works: Skipping an
AudioStreamWAV
and customizing a differentAudioStreamWAV
to be replaced by the skippedAudioStreamWAV
.Does not work: Skipping a
CompressedTexture2D
and customizing a differentCompressedTexture2D
to be replaced by the skippedCompressedTexture2D
.This is important functionality for porting because it allows the developer to, for example, replace existing PC-specific textures (such as an Xbox controller diagram) with mobile-specific textures (such as a touch-screen controls diagram). This functionality is needed to fully implement godotengine/godot-proposals#10051 as an add-on for all resource types, including textures.(Update: there is a workaround, see my next comment.)Explanation
When a resource is customized in
EditorExportPlugin
, a new.res
file is added to theexported
folder. For something likeAudioStreamWAV
, this will contain all of the resource data, so it doesn't matter if the source resource data is skipped because a full copy is made into the newly customized resource....But for a
CompressedTexture2D
resource, the full resource data is not copied. Instead, the new.res
file will simply point to a.ctex
file inside of theimported
folder. So if this source texture is skipped, it will no be copied to theimported
folder and this customized resource will now be invalid.Development Status
I'm looking into a fix for this, but I would appreciate any thoughts that others might have on how to correctly solve this.
I don't see this as a regression in any way. It's just a very specific interaction that was not fully addressed when texture skipping was introduced in PR #93878.
Steps to reproduce
Create an
EditorExportPlugin
with something like this:...And then export a project that uses
res://default.svg
.Additionally, order doesn't matter: Renaming
res://mobile.svg
tores://amobile.svg
does not change the behaivour.Minimal reproduction project (MRP)
Testxport-customize-skip.zip
The text was updated successfully, but these errors were encountered: