-
Notifications
You must be signed in to change notification settings - Fork 320
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
Make VISUAL NODES API same as HAXE API --> Static methods on nodes so that nodes API can be used in HAXE #3000
base: main
Are you sure you want to change the base?
Conversation
… be used within HAXE
Hi, while this PR only implements a small change to an individual logic node, let me comment on the intention behind this, which you mentioned here and on Discord: I think that Armory shouldn't follow this approach as this is kind of an inversion of responsibility and semantics. Logic nodes are a visual wrapper around game logic to simplify it, not the other way around. While at the moment Armory doesn't stricly follow this approach (and probably can't completely do this), ideally, a logic node should contain as little "own code" as possible and just act as the wrapper around code that's somewhere else in the Armory/Iron/Kha/Haxe APIs. Logic nodes are not supposed to be heavily used from Haxe, instead that's the job of the actual programming API. Logic nodes act as a visual helper to the API, not the other way around. I see two more problems with this approach, both resulting from the fact that logic nodes are not the main "API source":
Also, with the print example from your second post, I completely fail to see how this simplifies things:
After all I'm not the one who decides whether this gets merged, but I personally am sceptical whether this makes much sense. As for your last post about documenting the API in the logic node menu: This is sadly not possible with Blender's Python API. |
Yes, I made a single example class showing how it works, I am not going to do everything if you tell me that you are not interested in this proposal. |
Beyond this proposal I made, visual nodes have a completely different API than HAXE, that is very bad, it is unintuitive, confusing and wastes a lot of time. If they at least used the same API, that would be something else. |
I mean, it's not about using just nodes, but about looking at them for a second, seeing how it is implemented and that's it... even learning the API intuitively, this is intended for new users of the engine who want to learn the tool with less learning curve. |
Regarding the issue of trace, I can tell you that people do not know what it is called trace, they know what it is called print, apart from that the node print has a debug function that the trace does not have. If you want to use trace, that's fine... but my idea is to use the functionalities of the nodes, thus SELF-DOCUMENT THE API... Yes, it is a great functionality that could improve productivity by 100% with this engine. |
I'm skeptical as well and I don't think this should be merged. Logic nodes are just wrappers that already use the current API. I agree with @MoritzBrueckner points and I'm listing practical situations I've been through:
I personally don't like this approach, but in case I did here are some things to consider:
In the end these are my observations as an user that has spent a few months with the engine, have used Logic Nodes a bit and heavily used Haxe for scripting. |
The idea of this is to self-document the HAXE API with the nodes API, this way it is simpler to use the Armory functionalities within Haxe.
It is 100% possible to do this with all nodes
works correctly on linux and windows.
2024-02-13_19-04-29.mp4
You have to tell me if you want or don't want to implement it... if you want I can contribute with this.
discussion on discord
https://discord.com/channels/486771218599510021/1206956471364100168