Download

Adding a feature to the blueprint editor

I’ve been wanting to get more familiar with the engine source for a while because I often find myself doing something and thinking “Wouldn’t it be nice if…”. I had one of those thoughts today and ended up sidetracking myself for hours reading through the source to figure out how to do what I wanted.

What I want to do is add an option to the blueprint settings screen that will automatically add in & out execution pins to macros when I create them. Small change, but on days where I do a lot of blueprint work that cumulative 30 seconds gained will add up.

I found that the code responsible for handling the part of macro creation that I’m interested in is UEdGraphSchema_K2::CreateMacroGraphTerminators. I’m thinking the proper way to go about this is to create a config variable in UBlueprintEditorSettings and then check that in the previous function and create a spawn pin on the entry and exit node. However, I’m hesitant to actually do anything because I don’t have a full grasp of the intricacies of the whole system and I’m afraid to introduce a bug that will break things six months down the line and potentially affect six months worth of work. I’m totally fine with breaking stuff that lets me know it’s broken right away, that’s why you make backups. It’s the other kind that scares me.

Does this look like the right way to go about this? If I hack away at stuff here and break something will it be immediately obvious or hide away for six months and kick my dog when I’m not looking?