-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
Implement ClassDB::class_get_static_method
#91392
base: master
Are you sure you want to change the base?
Implement ClassDB::class_get_static_method
#91392
Conversation
b1319b8
to
c20fa27
Compare
This is a great addition, thanks a lot 👍 The CI is currently encountering an error in the godot-cpp builds. I'm not sure if it's a codegen issue, but it looks like the keyword In file included from /home/runner/work/godot/godot/godot-cpp/include/godot_cpp/core/class_db.hpp:41,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/ref_counted.hpp:39,
from /home/runner/work/godot/godot/godot-cpp/include/godot_cpp/classes/ref.hpp:37,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/input_event.hpp:36,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/input_event_from_window.hpp:36,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/input_event_with_modifiers.hpp:37,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/input_event_mouse.hpp:37,
from /home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/input_event_mouse_motion.hpp:36,
from /home/runner/work/godot/godot/godot-cpp/gen/src/classes/input_event_mouse_motion.cpp:33:
/home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/class_db_singleton.hpp: In member function 'godot::Variant godot::ClassDBSingleton::class_call_static_method(const godot::StringName&, const godot::StringName&, const Args& ...)':
/home/runner/work/godot/godot/godot-cpp/gen/include/godot_cpp/classes/class_db_singleton.hpp:71:66: error: expected primary-expression before '(' token
71 | std::array<Variant, 2 + sizeof...(Args)> variant_args { Variant(class), Variant(method), Variant(args)... };
| ^ Apart from that, what do you think about naming it |
Its currently being overhauled to return a static callable directly |
Hey, do you plan to pursue this? 🙂 |
I do, and its still sitting on my hard drive, untested. |
I just posted godot-cpp PR godotengine/godot-cpp#1485, which should fix the CI issues here, after it's been merged and cherry-picked to the |
Oh i already changed this to create a custom callable instead to provide more flexibility to the users. |
8be03cc
to
24e39bd
Compare
ClassDB::class_call_static_method
ClassDB::class_get_static_method
This is a different feature though... I would also implement that one first, as it's always possible to add a Maybe the two deserve separate pull requests, so they can be discussed independently? |
This new approach is interesting! However, it is no longer an analog to
I agree. Even though they are functionally equivalent, the exposed API is very different between the two approaches. |
I'll definitely put both methods on this pull request then, had no idea many people wanted it like this. |
As dsnopek and I mentioned, it's probably better to have two separate pull requests, first one for Then, the discussions can flow independently, people can argue pro/con for each approach, and it's possible to merge one without the other, or at different times. |
6b66185
to
e2cc14a
Compare
I need help with ZStd "macro redefined" even though i never touched it? |
e2cc14a
to
bd02839
Compare
Found the issue, looks like its an improper merge conflict resolution. |
2c326b1
to
85d5df7
Compare
85d5df7
to
847a823
Compare
Co-authored-by: AThousandShips <AThousandShips@users.noreply.github.com>
847a823
to
30b89fe
Compare
No description provided.