API ReferenceEditor.MapEditor

Hammerclass

objectHammer
Namespace
Editor.MapEditor
Assembly
Sandbox.Tools
Declaration
public static abstract sealed class Editor.MapEditor.Hammer

Methods6

Showing 6 methods

public static void AssignAssetToSelection(Editor.Asset asset)PUBLICSTATIC

Assigns the asset to the current selection.

ParameterTypeDescription
assetAsset
Returns:void

public static void ReloadFromFile()PUBLICSTATIC

Reloads the active editor session from file with user prompt

Returns:void

public static void SelectFacesUsingMaterial(Editor.Asset asset)PUBLICSTATIC

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

ParameterTypeDescription
assetAsset
Returns:void

public static void SelectObjectsUsingAsset(Editor.Asset asset)PUBLICSTATIC

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

ParameterTypeDescription
assetAsset
Returns:void

public static void SetCurrentMaterial(Editor.Asset asset)PUBLICSTATIC

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

ParameterTypeDescription
assetAsset
Returns:void

public static void ShowEntityReportForAsset(Editor.Asset asset)PUBLICSTATIC

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

ParameterTypeDescription
assetAsset
Returns:void

Properties5

Showing 5 properties

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

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

Returns:Material

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

If the Hammer app has been opened.

Returns:bool

On this page