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 Python-level extension functions #4

Open
Maxwell175 opened this issue Dec 30, 2022 · 3 comments
Open

Add Python-level extension functions #4

Maxwell175 opened this issue Dec 30, 2022 · 3 comments

Comments

@Maxwell175
Copy link

I noticed that the various Python extension functions that are added to existing classes are not added.

https://github.com/panda3d/panda3d/tree/master/direct/src/extensions_native

@Maxwell175 Maxwell175 changed the title Add Python-level extension function Add Python-level extension functions Dec 30, 2022
@WMOkiishi
Copy link
Owner

The issue with those is that they don't exist if the extending module hasn't been imported, so including stubs for them could potentially be confusing. Most of them are deprecated anyway; do you use any of them in practice?

@Maxwell175
Copy link
Author

Maxwell175 commented Jan 1, 2023

There are quite a few that are not deprecated. I regularly use the ones that pop up a small editor for specific nodes and intervals. I love NodePath.place, for example. There are even the interval short hands that are even referenced in the manual: https://docs.panda3d.org/1.10/python/programming/intervals/lerp-intervals#convenience-short-hands

@WMOkiishi
Copy link
Owner

Hmm... the fact that they don't always exist still makes me hesitant. It also seems like the ones you mentioned are mostly aliases for functions from other modules. Why wouldn't one, for example, just import place from direct.tkpanels.Placer?
That being said, supporting the non-deprecated extension methods might be worthwhile, especially if they're mentioned in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants