Implementing Undo in UE4 Editor Utility Widgets and Blueprints

Implementing Undo in UE4 Editor Utility Widgets and Blueprints

This image shows an example of how to setup an undo-able function call in unreal 4’s blueprints. This was reported as a bug and marked “by design” simply because you can do it 100% controllable and custom in blueprints

Begin Transaction

Starts the undo stack and allows for anything after this call to be grouped into 1 undo operation.

Transact Object

Every object you want to be undo-able has to be added by using the Transact Object node. Then you can do whatever you want to the object and it will properly go back to whatever it was before doing anything to that object.

End Transaction

Closes the gates and stops recording anything else to the undo stack. Which then will allow you to finally undo properly you custom tool’s operation.

This was a bit tricky to find since typing the word “Undo” in blueprint doesn’t give you much. Under the hood though everything undo-based is actually referred to as the Transaction System. Which is why these nodes are called Transaction Nodes.

That is all, hope this helps and Have a great day!

Project Mix: Fireworks Test

Project Mix: Fireworks Test

150 Nodes all playing respectively to their connection timings.

So, I had an idea. I wanted to make fireworks as a way to celebrate the 4th of july. And I figured lets try to do it with project mix.

What you see in the video is 150 Connected nodes. Each node has their own note and sound settings.

What a node looks like up close
The looks of the actual sound settings

All of these are defined by presets in which I manually create by importing a wav file from FL-studio with each octave I want to have available to use. Like I’ve talked about in the past with the post about audio visualization using the baked analysis that unreal just added, there are only a handful of actual sound files which makes my life so much easier when it comes to quick importing and management. However, I don’t currently have support for just.. One-Shot type sounds.

FL-studio midi used for exporting sounds.

I tried to take an approach to create this that is a bit additive. I started with the basic kick to get the loop that I wanted to use, layered in the snares and high hats, and then went to town emulating the “firework” feel I was going for. This meant that I needed to create a few buttons to help make things faster like Randomize Notes, Randomly place in a spherical pattern, and selection helpers.

The buttons at the top are the examples of added usability.
In the end… it looks like this hellstorm of madness. There’s gotta be a better way.

Right now there is NO MIXING setup at all. This is about as raw as audio playback can get in unreal. Just play the damn sound… This is also why certain parts might sound a bit too loud or soft. So the next phase of development for this system is pretty clear. Project Mix.. needs.. well.. a MIX of some sort. But that’s not the most worrying thing to me. I think the biggest issue with development right now is that I have to hit play.. wait for the loop to start… and hope that it sounds the way I want. This makes things extremely slow and aggravating to work with. So, I think I am gonna take an interesting step forward into editor-based nodes that actually play .. while I am tweaking them (Obviously with some control on when to play). Imagine kinda like planet coaster, where the roller-coaster is running along the track you are currently building. This is something that I think is needed in order to not rip my hair out creating the next scene and ultimately.. the final vision for this project ( Which I am currently keeping to myself ).

Then… well there is the time synth.. which aims to solve all of my synchronization problems… so I gotta get going on that too. I did watch dan’s amazing overview of it and I think it has a ton of potential with one fatal flaw… time synth components are made to not be used spatially… 150 times in a scene. Therefore.. I’d have to tell the nodes to call the master time synth in order to play things on time efficiently. Maybe if I do that I can convince the awesome audio folks to help me out with getting 3D sound to work properly per node.

So to finish it off.. here is a few bullet points for the future.

  • Better Editor Development workflow
  • An actual soundclass and submix setup.
  • Update the core audio system to use the time synth component instead of my jenky synchronization master blueprint.

Those three are enough to keep me busy for awhile. On that note, have a great day <3

Manipulator Tools Plugin is ALMOST ready for first release!

Manipulator Tools Plugin is ALMOST ready for first release!

Things have been wrapping up quite nicely as I finish up a ton of cleanup and usability features for the Manipulator Tools Plugin. Here is a bit of a taste of what it looks like to manipulate Vectors, Transforms, and Booleans.

The idea is pretty simple. Do you have variables that you’d like to edit in the editor on the actor itself as a nice way to visualize what you are changing on the fly? This is where the Manipulator Components come in handy. Here is the hierarchy of the test tank blueprint.

Component layout for the “tank” you see above.

You’ll notice, that there are 4 green icons with _MC. These are the Manipulator Components and each one has settings to control what shapes it can be, what property to attach to for editing, and a bunch of other settings like constraints, offsets, and a few other extras. What makes this really neat is you could essentially do what the Control Rig Plugin does but for ANY ACTOR. ANY BP, ANYTHING that can have a component added to it and be added to the world.

Example of what the settings looks like right now. I chose to make it struct based for easy copy-paste functionality from one manipulator to the next.

Right now, I am wrapping up some helper functions and also getting it to be a bit cleaned up code-side. Then I will document how to use it, setup examples, and look into distributing the plugin either via the marketplace or github. I don’t know whether or not I am going to charge for it yet, but it is a CRAP TON of personal time that I have dedicated so far and supporting a plugin is definitely no small task. Please keep that in mind that if I do charge for it, it’s mostly because that money will go into the time to maintain and support it.

Very minimal blueprint logic needed to make that tank do what it shows.. in-fact most of that is just making the “Look at rotation” logic work.

Lastly, the entire system is based off of the current “Show 3D Widget” functionality in the editor. If you are unfamiliar with this please feel free to watch the tutorial video on how to use those. Then, get angry at the fact that you have no control over how they look or work like I did and get pumped for the MANIPULATOR PLUGIN!

Tutorial on how to use the current UE4 Property Widgets

Have a great day.
<3 Zuko

Unreal 4 Quick Tip – Shift Dragging Comments.

Unreal 4 Quick Tip – Shift Dragging Comments.

How the crap did I not know this? You can move comments 2 different ways. Group or non-grouped movement.

Shift+Drag changes it for you on the fly!

This.. this.. dammit. You know, it’s the little things like this that I miss all the time and I am just so happy to know about it now. Did you know?

Have a great day <3