Announcement

Collapse
No announcement yet.

MGC 'Magic Nodes'

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • started a topic [PLUGIN] MGC 'Magic Nodes'

    MGC 'Magic Nodes'

    Hello!
    I have been using this for a while now and, even though I didn't have the time to put together extensive learning resources, I believe it's ready to be shared with you guys

    I've put together a system which I call "Magic Nodes" (lol) where we can write some C++ functions in-place on any Blueprint Graph and that node will "morph" to match the input and output parameters of the function you wrote within the node itself. Some people might be confused of why we would need this, but instead of trying to advocate the tool I'd rather let your own experience speak for itself; there's numerous tasks where dragging wires on Blueprint Editor slows down productivity and this tool could be useful to address that, sometimes it's simply faster to type a few lines of code instead of dealing with wire spaghetti!

    With this I also hope, with time, Blueprint developers have a first contact with C++ code and slowly become comfortable moving to Visual Studio workflow later on, if wanted


    So, what is this... A few super simple simple examples:








    We can type some code, compile (hot-reload), and the node will "morph" its pins to accommodate and execute the function we wrote inside of it.
    This can be very handy for developers missing something in-between Blueprints and pure C++ code...
    Also it's very useful to actually "read" right there what exactly that one node is doing.



    While coding our functions in this node, we can have some basic auto-complete functionality as well.
    However keep in mind that I have no previous experience with any of this, turns out making an auto-complete feature is a beast of a complex task and I've implemented only the very basics!
    For example, in this screenshot the node detected I am trying to invoke a function from a ACharacter class, so while I was typing it will show me functions and properties members of ACharacter class:





    Now released:


    MARKETPLACE
    GITHUB


    Last edited by BrUnO XaVIeR; 01-28-2019, 10:35 PM.

  • replied
    I cannot install this plugin to UE 4.23.

    Leave a comment:


  • replied
    OK, cool! some of that made sense to me! (that's a huge improvement over where I was a month ago.) I have much more Unreal to learn.

    Leave a comment:


  • replied
    It's a custom "Kismet Node": https://wiki.unrealengine.com/Create..._For_Blueprint

    The turn-around thing about this node is that it can actually generate C++ classes and invoke functions from the generated classes by itself.
    In general Kismet Nodes (or the UFUNCTION(...) ones) only know about C++ functions that already exist.

    This node in particular creates an Unreal Object to store the code the user typed, then in runtime it already knows the pointer in memory to the compiled version of the function to call.
    At runtime the node de-references the pointer and calls the "Execute" function of its object...

    So you can have N^ custom Kismet Nodes packed into this only one node, instead of need to create one custom Kismet Node for each execution object you have.

    Leave a comment:


  • replied
    This is so awesome. Is this like some sort of convenience wrapper around the normal "C++ backed Blueprint node" design or are you doing something special?

    Leave a comment:


  • replied
    Some quick nodes to workaround this issue: https://issues.unrealengine.com/issue/UE-68641

    Make sure you read this: https://brunoxavierleite.com/2019/01...s-programming/

    Can download nodes here:
    https://www.dropbox.com/s/19foctkvju...ts.uasset?dl=0
    https://www.dropbox.com/s/sqymv91hvo...el.uasset?dl=0











    Leave a comment:


  • replied
    I've submitted v0.1.5 to marketplace (I have no access to GitHub where I am right now so the files in Git will be outdated for a while)...


    * In text/code editor within Nodes (expanded nodes) I have included auto indentation for new code lines.
    However, there's a hard-coded routine in Slate's multiline text widget which I cannot override right now, it automatically adds new line whenever Enter key is pressed. So the auto indentation will always come with an extra line break, I am working around that pressing backspace once a new line is included... I cannot find a way to fix this problem for now, sorry!

    * In pre-compiler class I've included an extra check to ignore whatever header includes that are incomplete or invalid before trying to generate the C++ objects.


    Those changes are currently on the submitted plugin v0.1.5 for Unreal 4.22.

    Leave a comment:


  • replied
    I submitted plugin update for Unreal 4.22.
    Keep in mind that this thing is still an experimental beta tool, I still didn't have any extra time to go back and work it some more.

    Leave a comment:


  • replied
    Originally posted by BrUnO XaVIeR View Post
    Hehe.. I have no luck with that kind of stuff.
    Dev Grants, lottery, etc.

    I just don't even try
    It might not be my place to say this but in case you really didn't, you should DEFINITELY submit for Dev Grants (there is no luck involved), they even have a check-box for "Tool/Plugin" in submission form. I just hope you get rewarded for this awesome tool materialistically as well! Wish I could do it myself .

    Leave a comment:


  • replied
    At this moment I consumed all the time I was allowed to invest into this plugin.
    I wanted to implement all the algorithms in the custom toolkit just like the ones that is implemented on the Node editor; I just couldn't deliver for now, ran out of time.

    Auto indent I was also unable to implement at this time, Slate got in the way (I failed in that function and scrapped it).

    But all these things already noted, I also want them lol
    I'm not too worried about it, because I want to keep working on it for many years. I just can't rush it or prioritize it above my job tasks :s

    Leave a comment:


  • replied
    Edit: Seems it wont generate code because it was open in visual studio.

    I would like to see it auto indent code and needs a complile/generate button in the MagicNode editor. (Not just on the node itself.)
    Last edited by ArxMods; 02-03-2019, 06:54 PM.

    Leave a comment:


  • replied
    This plugin is now released



    MARKETPLACE
    GITHUB

    Leave a comment:


  • replied
    Subscribed, bookmarked, noted and thousand thanks for this plugin!

    Leave a comment:


  • replied
    This is brilliant. Please update this thread when it arrives on GitHub (or other site like it).

    Leave a comment:


  • replied
    Originally posted by Mootjuh View Post
    Does it make separate files for each function? Or are all magic nodes put inside one big function library?
    The first iteration I was compiling them to a library.
    But then I noticed that hot-reloading time was increasing the more nodes I create.

    Now what I do is create source files for each node class, hot reload became way faster and will remain the same time always, when I recompile just one node.

    Now instead of packing them within a library, I pack their source files inside the Source/MagicNodes/ folder. You will be able to see each generated class within Content Browser's C++ directory.

    The good thing is, if desired, you can remove all Magic Nodes from your Blueprints later and destroy the "Script" asset once the C++ class is generated and compiled. Then you include and use the C++ code directly. So the nodes in this case would be just a testing environment before moving your algorithms to full C++ in Visual Studio environment...
    I've been doing that. Once a node works the way I want, and I know I will never change it again, I delete the node asset and call the native functions directly from my Character.cpp.
    Only nodes that are really self-contained I leave them running as is, when the functionality doesn't fit any of my native classes.

    Oh I think I forgot to mention in the blog post to include "MagicNodeRuntime" module to Build.cs file for that, to make those sources usable by native project classes, otherwise project classes might cause error when calling magic node functions directly.

    Leave a comment:

Working...
X