API ReferenceEditor.MapDoc

MapNodeclass

A common class used for all objects in the world object tree.

object→MapNode
Namespace
Editor.MapDoc
Assembly
Sandbox.Tools
Declaration
public class Editor.MapDoc.MapNode

Methods2

Showing 2 methods

public Editor.MapDoc.MapNode Copy()PUBLIC

Creates a copy of this map node and its children, alongside it in the same parent - the same as cloning it in Hammer. The copy gets new node ids and is kept for undo, so call `Editor.MapEditor.History.MarkUndoPosition(System.String)` first. Returns null if the node can't be cloned.

Returns:MapNode—

public void Remove()PUBLIC

Returns:void—

Properties12

Showing 12 properties

public System.Collections.Generic.IEnumerable`1<Editor.MapDoc.MapNode> Editor.MapDoc.MapNode.Children { get; set; }PUBLICGETSET

Each MapNode can have many children. Children usually transform with their parents, etc.

Returns:IEnumerable<MapNode>—

public bool Editor.MapDoc.MapNode.GeneratesEntityModelGeometry { get; set; }PUBLICGETSET

Does this map node generate models to use?

Returns:bool—

public bool Editor.MapDoc.MapNode.IsSelected { get; set; }PUBLICGETSET

Whether this node is part of the current selection.

Returns:bool—

public string Editor.MapDoc.MapNode.Name { get; set; }PUBLICGETSET

User specified name of this node

Returns:string—

public int Editor.MapDoc.MapNode.NodeId { get; set; }PUBLICGETSET

Hammer's id for this node - unique within its `Editor.MapDoc.MapWorld` and saved with the map. Find the node again with `Editor.MapDoc.MapWorld.FindNode(System.Int32)`.

Returns:int—

public Editor.MapDoc.MapNode Editor.MapDoc.MapNode.Parent { get; set; }PUBLICGETSET

The parent node, at the top level this will be the `Editor.MapDoc.MapWorld`

Returns:MapNode—

public Vector3 Editor.MapDoc.MapNode.Scale { get; set; }PUBLICGETSET

Non-uniform scalar for this map node.

Returns:Vector3—

public string Editor.MapDoc.MapNode.TypeString { get; set; }PUBLICGETSET

Native C++ type name for this map node (nice for debug, might disappear at some point)

Returns:string—

public bool Editor.MapDoc.MapNode.Visible { get; set; }PUBLICGETSET

Visibility of this MapNode, e.g if it's been hidden by the user

Returns:bool—

public Editor.MapDoc.MapWorld Editor.MapDoc.MapNode.World { get; set; }PUBLICGETSET

The world this map node belongs to.

Returns:MapWorld—

On this page