This article relates to the game "Dota 2". Click here for more information.
This article relates to the SDK/Workshop Tools for "Dota 2 Workshop Tools". Click here for more information.
This article's documentation is for Source 2. Click here for more information.

Command History

From Valve Developer Community
Jump to: navigation, search

Hammer's Command History panel can be used to repeat commands sequentially.

Repeat Last Command

The most recent command can be repeated using the Repeat Command (Shift+G), which can also be found in the menu Edit->Repeat Command.

Hammer2 Command History Menu.jpg

For example, this allows you to things like rotation extrusion by doing the extrusion once with the gizmo, then repeating it using Shift+G:

Select a face, offset the gizmo:

Hammer2 Command History 1.png

Press R to switch to rotation, and then shift drag on the rotation handle to rotate and extrude a face:

Hammer2 Command History 2.png


Now instead of using the gizmo repeatedly, you can just press Shift+G several times to get something like this:

Hammer2 Command History 3.png

If that is still too many key presses, keep reading.


Command History interface

The command history panel can be used to select any number of commands in the history and repeat them a number of times. It is a dock-able panel. Depending on your current layout, it may be hidden behind another tab.

It looks like this:

Hammer2 Command History 4.png


Multiple commands can be selected in the command history and repeated using the repeat button, or from the context menu. For example, starting with a single cube:

Select a face.

Hammer2 Command History 5.png

Go to scale mode (E), go into local space (Tab) and and hold shift while scaling to extrude.

Hammer2 Command History 6.png

Switch to translation (T), and extrude along the up axis (purple)

Hammer2 Command History 7.png

Switch to rotation (R), and rotate the face a few degrees.

Hammer2 Command History 8.png


Now the command history lists these three commands, and the can be repeated by selecting them and pressing the repeat button:

Hammer2 Command History 9.png


Which would yield this result:

Hammer2 Command History 10.png


However you can also change the selection and apply the same set of commands to a different selection:

Hammer2 Command History 11.png Hammer2 Command History 12.png


Additionally, a number of repetitions can be selected and the repeat multiple button will execute the selected commands the specified number of times:

Hammer2 Command History 13.png

Hammer2 Command History 14.png