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

Expose CameraFeed setters #97534

Merged
merged 1 commit into from
Sep 28, 2024
Merged

Conversation

j20001970
Copy link
Contributor

Closes #97504

In Godot 3.x, CameraFeed setters like _set_position, _set_RGB_img are exposed to GDNative for implementing custom camera feeds, but they are no longer visible in GDExtension due to methods starting with underscore being ignored in extension_api_dump.cpp

The PR simply removes underscore for these setters, exposing them to end users as the result. I'm not sure if there are better approach.

@j20001970 j20001970 requested review from a team as code owners September 27, 2024 10:40
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

I'll let @BastiaanOlij confirm as he implemented this class.

@akien-mga akien-mga modified the milestones: 4.x, 4.4 Sep 27, 2024
Copy link
Contributor

@BastiaanOlij BastiaanOlij left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reasoning these were originally "private" was because we didn't want to expose these methods to normal users. They should only be called internally by the engine.
But that idea is very outdated by now as this indeed hinders their use from gdextension. So I think this change is fine.

@akien-mga akien-mga merged commit 99aec99 into godotengine:master Sep 28, 2024
19 checks passed
@akien-mga
Copy link
Member

Thanks! And congrats for your first merged Godot contribution 🎉

@j20001970 j20001970 deleted the camerafeed-setter branch September 29, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CameraFeed setters are not exposed to GDExtension
3 participants