Announcement

Collapse
No announcement yet.

Custom Bluprint nodes with C++ function code in-editor :-o

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

    #46
    Very impressive, well done!

    Comment


      #47
      Working at home last night I put some effort into this IntelliNonsense thingy...
      It runs using Unreal's UProperty reflection + some more hackery:







      Another cool and important thing I've added is that, if I Ctrl + click a class in the text editor then it launches docs URL (I use that much more than Visual Studio's F12 which sometimes stop working anyway); For example, if I Ctrl + click on UObject word anywhere on the script then the editor launches Chrome on this docs page for me (I can't work without these docs pages ):

      https://api.unrealengine.com/INT/API...ect/index.html
      | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

      Comment


        #48
        Could you do some benchmarks?
        BP only
        BP nativized
        C++ Only
        And your Function Nodes doing some sorting or something like that.
        Would like to see some performance test and to see whether your effort is actually worth

        Comment


          #49
          The cost is exactly the same cost of calling a Blueprint function node.

          The difference is within a Blueprint function graph you can have another tons of nodes in there and each of those nodes add up another "Kismet call" cost.

          I can have over a thousand functions inside this node... The cost for a "Kismet call" is still going to be just 1. Everything within after that is C++ land.

          Only the "Execute" function is the Kismet cost (Blueprint overhead)
          It's the only thing that the Kismet Compiler, well, executes.
          | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

          Comment


            #50
            Okay, last post then I stop flooding this topic
            I got reflection-based auto complete working... Now I can use this thing more seriously lol


            | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

            Comment


              #51
              That is it! This has gone too far to stop, don't you think? I'm really excited about this and have two questions:
              1) Do you need to open VisualStudio in the background for this?
              2) Can you do everything you could do in VisualStudio, I mean do we need to use VS after having this?
              ..ok make it three :P
              3) Is it possible to make this into a plugin and share/sell it, and are you thinking of doing that?

              Also, I'm not op but I wouldn't mind this kind of "flood"
              HeadsAndBrains
              MARKETPLACE | YouTube

              Comment


                #52
                Originally posted by Nicat View Post
                1) Do you need to open VisualStudio in the background for this?
                No, just need to have it installed so Unreal can use HotReload with C++ Compiler... The project must be a C++ project, but I don't keep Visual Studio open at all.

                2) Can you do everything you could do in VisualStudio, I mean do we need to use VS after having this?
                I don't think this is a replacement to Visual Studio.
                However some times I just want to make some foreach loops or write my functions instead of dragging wires around, but I don't want to wait for VS to launch either. I just want to write the function and see it there in the graph on the exact place where it's called without wasting time on extra steps such as creating function library classes.
                Blueprints are great, but sometimes just typing on a keyboard to create a function is simply faster than connecting wires to nodes...
                "Less time waiting for things to happen!", this is why I'm making this, I need to reduce time spent on the overall "coding" workflow, "less rocks on the way"

                3) Is it possible to make this into a plugin and share/sell it, and are you thinking of doing that?
                In fact this is a plugin that I built and I could share it.
                However there are a few problems I see about sharing this:

                * I would need written permission. Some pieces of this plugin I wrote on my workplace which makes the company legally owner of this tool; they would have to allow me to make it public.

                * I don't have a lot of time to create documentation, tutorials, etc, besides a few example nodes. This could become a problem if I make it public...

                * And I believe EpicGames has in the EULA something saying we can't sell scripting/coding systems for Unreal, it must be shared for free

                * And finally, there's the fact this isn't complete yet, right now it's more like something in "alpha" state.
                | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                Comment


                  #53
                  Originally posted by BrUnO XaVIeR View Post
                  No, just need to have it installed so Unreal can use HotReload with C++ Compiler... The project must be a C++ project, but I don't keep Visual Studio open at all.
                  That's just great!


                  I don't think this is a replacement to Visual Studio.
                  However some times I just want to make some foreach loops or write my functions instead of dragging wires around, but I don't want to wait for VS to launch either. I just want to write the function and see it there in the graph on the exact place where it's called without wasting time on extra steps such as creating function library classes.
                  Blueprints are great, but sometimes just typing on a keyboard to create a function is simply faster than connecting wires to nodes...
                  "Less time waiting for things to happen!", this is why I'm making this, I need to reduce time spent on the overall "coding" workflow, "less rocks on the way"
                  I don't have much experience with VS (I hated it since the first time I tried to use it) but from your gifs, we could do most of the stuff without opening VS at all using this. Imo this is more useful than just clearing some rocks. Because it allows to use all the functions unavailable to BP in BP.


                  * I would need written permission. Some pieces of this plugin I wrote on my workplace which makes the company legally owner of this tool; they would have to allow me to make it public.
                  Wow, that is some hardcore law abiding

                  ...* And I believe EpicGames has in the EULA something saying we can't sell scripting/coding systems for Unreal, it must be shared for free
                  Huh, didn't know about that.

                  ...* I don't have a lot of time to create documentation, tutorials, etc, besides a few example nodes. This could become a problem if I make it public...

                  ...* And finally, there's the fact this isn't complete yet, right now it's more like something in "alpha" state.
                  Well, no pressure... we can wait hehe
                  HeadsAndBrains
                  MARKETPLACE | YouTube

                  Comment


                    #54
                    Even if Bruno releases it for FREE we which know a bit or two of C++ and engine source could keep it alive as a community thing than an one dev only thing. Just a thought.
                    Nilson Lima
                    Technical Director @ Rigel Studios Ltda - twitter: @RigelStudios
                    Join us at Discord: https://discord.gg/uFFSEXY

                    UE4 Marketplace: Cloudscape Seasons
                    supporting: Community FREE Ocean plugin

                    Comment


                      #55
                      Alright I got all permission I needed

                      Now I have to start writing basic documentation and include a few dozen coded nodes as examples, explaining the basics of Unreal's C++ for the people struggling with the language (my little brother included);

                      In a month or two I shall upload the tool to both Marketplace and GitHub (for those who might want to contribute improvements)
                      | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                      Comment


                        #56
                        I have a tiny little problem

                        Does anybody out there have experience in writing a parser for C header files? without using LibClang??
                        The only way for the little node editor to detect (and show tips like IntelliSense does) from variables and functions that aren't exposed as UFUNCTION() and UPROPERTY() is me writing a header parser to collect those declarations... And oh boy this stuff is hard :[

                        My autocomplete system is based on Reflection so anything not UProperty it can't see (unless I parse declarations from a script's header and manually inject the declaration into the sematics database), I've injected "Context" as a variable declaration of type UMagicNode class into the semantics database just to see if that would work and seems like the "Class Pointer Parser" is working fine, it now understands that "Context" is a variable of type UMagicNode* class declared in body of Execute function, but oh boy...

                        Parsing header files without any reflection data is going to be far from easy:






                        _____


                        Yep, working just fine; testing again I've injected "_X" as if it was a variable declaration of AActor* and the thingy found it.
                        Now I just need a header parsing algorithm >.<

                        | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                        Comment


                          #57
                          Originally posted by BrUnO XaVIeR View Post
                          I have a [I]tiny little problem...
                          Can't you use UHT's source?

                          I've been following this thread and I'm eager to see this on the Marketplace.​​

                          Comment


                            #58
                            Originally posted by vlad.serbanescu11 View Post
                            Can't you use UHT's source?
                            Hmm..
                            I don't know if that would help btw, because if it isn't exposed as UProperty or UFunction I don't know if UHT can even see those declarations.
                            But I will lurk into UHT's source and try to find clues, thanks!

                            _____

                            Oh from there I've found something really helpful:
                            Code:
                            Engine/Source/Runtime/Core/Public/Misc/Parse.h
                            There's helper functions to parse source code "tokens" in there, this is going to be useful!
                            Last edited by BrUnO XaVIeR; 12-28-2018, 02:08 PM.
                            | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                            Comment


                              #59
                              Before the year ends I wanted to finish this as well...
                              Node's source can be also edited from its asset package (they won't exist in built game, they only exist in Editor!)

                              So we will be able to share nodes as assets between projects and machines (instead of sending whole copies of Blueprints), then attach that source into a node and hit compile, the base C++ class is generated (as if the user went through the whole process of creating and setting up a plugin to host his custom Kismet node, but skipping the headaches):







                              Now it's party time!
                              Happy new year guys, till later :]
                              | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                              Comment


                                #60
                                I wrote a movement input node just to see if I could...
                                turns out we can lol

                                | Finite State Machine | Savior | USQLite | Object-Pool | Sound-Occlusion | Property Transfer | Magic Nodes | MORE |

                                Comment

                                Working...
                                X