Skip to content
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

Add missing Projection constructor with 16 real_t values #1742

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

aaronfranke
Copy link
Member

When GDExtension generates bindings, it creates C++ code based on the API JSON. Values are serialized into literals constructed with numbers matching the value, for example, Vector3(0, 1, 0). This includes default values for function parameters. Projection default values are serialized like Projection(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1). However, Godot is missing a constructor for Projection, so the generated C++ code doesn't compile:

Screenshot 2025-03-14 at 2 41 03 AM

I encountered this problem when the CI checks for godot-cpp failed to compile with my 4D module, because one of the bound methods includes a Projection default value, which cannot be constructed, as seen in the above image. This wasn't a problem in the engine before because the engine doesn't have any Projection default values in parameters.

See also PR which adds this to the engine: godotengine/godot#104113

@aaronfranke aaronfranke added the bug This has been identified as a bug label Mar 14, 2025
@aaronfranke aaronfranke added this to the 4.x milestone Mar 14, 2025
@aaronfranke aaronfranke requested a review from a team as a code owner March 14, 2025 10:11
@dsnopek dsnopek added the waiting for Godot This issue needs a Godot Engine improvement to be solved label Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This has been identified as a bug waiting for Godot This issue needs a Godot Engine improvement to be solved
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants