s&box docs
API ReferenceEditor.MapEditor

public static abstract sealed class Editor.MapEditor.Hammer

Broader workflow and conceptual references connected to this API.

Methods

Showing 6 methods

public static void AssignAssetToSelection(Editor.Asset asset)

Assigns the asset to the current selection.

public static void ReloadFromFile()

Reloads the active editor session from file with user prompt

public static void SelectFacesUsingMaterial(Editor.Asset asset)

Selects all faces using the asset, forces `Editor.MapEditor.Selection.SelectMode` to `Editor.MapEditor.SelectMode.Faces`

public static void SelectObjectsUsingAsset(Editor.Asset asset)

Selects all map nodes using the asset, appending them to the current selection.

public static void SetCurrentMaterial(Editor.Asset asset)

Sets the currently used material to the specified asset.

Note

I'd happily merge together this into a get setter, but it's a mix of a Material and an Asset

public static void ShowEntityReportForAsset(Editor.Asset asset)

Opens a Entity Report dialog showing all entities using this asset.

Properties

Showing 5 properties

public static Sandbox.Material Editor.MapEditor.Hammer.CurrentMaterial { get; set; }

Current Material - you can set this programmatically with `Editor.MapEditor.Hammer.SetCurrentMaterial(Editor.Asset)`

public static bool Editor.MapEditor.Hammer.Open { get; set; }

If the Hammer app has been opened.

Metadata

FieldValue
NamespaceEditor.MapEditor
Typeclass
AssemblySandbox.Tools
Doc IDT:Editor.MapEditor.Hammer

On this page