-
-
Notifications
You must be signed in to change notification settings - Fork 22k
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
Rename global transform notification to contain the word "global" #104352
base: master
Are you sure you want to change the base?
Rename global transform notification to contain the word "global" #104352
Conversation
This feels like an ugly api, but doesn’t seem to be a blocker (required pull request) for a godot engine game project. |
It's a bit nasty because having it deprecated now may cause more confusion, due of the methods and notifications existing side-to-side with the originals. Also CanvasItem has a similarly ambiguous naming scheme with its transform notification. |
Agreed, this does seem to be compat breaking for modules etc? Would have been better to have been done during that Godot 3 -> 4 phase when there were a lot of major renames. Also, I'm not sure it's actually correct, especially for canvas items. Canvas items send their local transform to the server, not global. EDIT: Actually I checked this morning and although local xforms are sent (in It's still very debatable either way though I suspect. Related: |
While the rename makes sense, there is another similar inconsistency: Ideally the methods and notifications should be consistent, but that would break compatibility, because the current name would have to change meaning.
Yeah, it renames internal methods. Though the old names could be left as an alias, so module compatibility is preserved. |
As mentioned earlier because of compatibility we can not remove the alternative renames until godot 5 and adding both has difficult usability |
As mentioned in godotengine/godot-proposals#3866, the word "global" is ambiguous. |
0576f30
to
34b29ca
Compare
@Sauermann The word global is consistent with 3D global transforms, referring to the world origin. I think "canvas transform" and "viewport transform" would be confusing, because this gives me the impression that it takes into account the Camera2D or scaling. But either way, this is established terminology in Godot with properties like
Correct. It is not a blocker. It is a low priority enhancement.
I'm not sure what you mean by that, this PR is already changing CanvasItem.
I've updated the PR to include the old methods so that existing modules will keep working.
CanvasItem already has
Maybe. I think a term by itself (like "transform") makes sense to refer to local automatically, but "local" can help clarify. |
I briefly mentioned this here: #87440 (comment)
Now the global transform notification has "global" or "GLOBAL" in its name, matching
global_transform
and such, mirroring the "local" versions. The old names are kept as deprecated aliases for compatibility.