You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the problem or limitation you are having in your project
When you drag and drop a file from the FileSystem dock while holding ctrl it creates a const using the preload method. Currently, it uses the path of the file. This path no longer works when you move the file to another location. With the push for UIDs, I think it makes sense to change this behaviour.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Replace the path with the UID of the file.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This would be my first pull request and I'm not sure about the codestyle and various details so I wanted to talk to other developers before creating the pull request. This is how I'd change the _get_dropped_resource_line in script_text_editor.cpp to implement this proposal. I've tested the behaviour and it works fine.
Calinou
changed the title
Replace the path with the uid when using ctrl + drag and drop
Replace the file path with the UID when using Ctrl + drag and drop
Feb 3, 2025
Describe the project you are working on
A Point & Click Adventure
Describe the problem or limitation you are having in your project
When you drag and drop a file from the FileSystem dock while holding ctrl it creates a const using the preload method. Currently, it uses the path of the file. This path no longer works when you move the file to another location. With the push for UIDs, I think it makes sense to change this behaviour.
Describe the feature / enhancement and how it helps to overcome the problem or limitation
Replace the path with the UID of the file.
Describe how your proposal will work, with code, pseudo-code, mock-ups, and/or diagrams
This would be my first pull request and I'm not sure about the codestyle and various details so I wanted to talk to other developers before creating the pull request. This is how I'd change the _get_dropped_resource_line in script_text_editor.cpp to implement this proposal. I've tested the behaviour and it works fine.
Screencast_20250203_131402.webm
If this enhancement will not be used often, can it be worked around with a few lines of script?
I think it will be used often and a workaround seems inconvenient to me.
Is there a reason why this should be core and not an add-on in the asset library?
This is about making preload constants more resilient to changes in the filesystem.
The text was updated successfully, but these errors were encountered: