-
-
Notifications
You must be signed in to change notification settings - Fork 21.3k
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
Set base_path
and filename
during GLTF export when writing to a file
#79636
Conversation
e183576
to
3812827
Compare
I rather not add to the inconsistency. Any suggestions? @YuriSizov |
Approved in terms of technical review. I'll leave bikeshedding of file_name up to others |
In the public API |
3812827
to
97fd5d5
Compare
base_path
and filename
during GLTF export when writing to a file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine to me. Needs a rebase though.
Also, and this is not new to this PR, but shouldn't getters be const for GLTFState
members? (Note that changing that would require adding compatibility methods for the GDExtension API.)
97fd5d5
to
2970839
Compare
@YuriSizov Rebased and re-tested. Thanks for the catch with GLTFState property constness. Since filename is being added in this PR and copyright is not in Godot 4.1, I have changed those to be const. But base_path and the other properties were already exposed in Godot 4.1 so those will have to wait for the future to be changed to const. |
They could be changed now, you then just need to add compatibility methods so that existing compiled GDExtensions can find the old method hash and keep using it. See examples in #80168. |
Thanks! |
This PR sets
base_path
andfilename
during the export process, and exposesfilename
. Previously onlybase_path
was exposed and it was only used during the import process.π²ποΈ: I usedfile_name
for consistency with most of the engine'sfile_path
, but as for just file names and not pathsfilename
is twice as common asfile_name
. Personally I preferfile_name
.