-
-
Notifications
You must be signed in to change notification settings - Fork 97
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
Differentiate Image's get_data()
and Texture's get_data()
#517
Comments
This sounds like a good idea. Do you have a better name in mind? |
I figured I'd leave it to the experts, the most important thing was seeing if others felt the same way. But as a starting point: Texture class's function could become In the docs the Interestingly OpenSimplexNoise has a function named |
Functions like these (and I'm sure these are not the only two instances) should be renamed ala |
get_data()
and Texture's get_data()
Since godotengine/godot#47435 was merged, is this issue resolved in master?
|
Oh, it's in. Thanks @madmiraal |
Describe the project you are working on:
Projects that deal with the Image and Texture classes.
Describe the problem or limitation you are having in your project:
Poor clarity in GDScript. I was helping someone with their code earlier today and I got them mixed up again for the 3rd time.
Your code can even look like this:
variable.get_data().get_data()
which is just crazy. You will often be handling both classes in the same script and both classes are calling what appears to be the same function. Knowing about the difference between a "texture" and "image" in Godot is already another point of confusion in itself.Describe the feature / enhancement and how it helps to overcome the problem or limitation:
Rename one of them and clarity will be improved. Now may be the best time to ask, considering other things are being renamed: godotengine/godot#30736
Describe how your proposal will work, with code, pseudocode, mockups, and/or diagrams:
Any kind of rename, I don't mind how they are differentiated.
If this enhancement will not be used often, can it be worked around with a few lines of script?:
It will be used often.
Is there a reason why this should be core and not an add-on in the asset library?:
This is about GDScript.
The text was updated successfully, but these errors were encountered: