SceneEditorTerrainMaterialEdit
Package: Libraries.Interface.Undo · Inherits from: Libraries.Language.Object, Libraries.Interface.Undo.Edit
The SceneEditorTerrainMaterialEdit is one change to a terrain's materials in the scene editor's undo list: adding, choosing or removing a layer. It keeps: - which terrain material the terrain had, and its file, before and after; - the layers of the terrain material that changed, before and after, since terrains sharing it change with it; - the painting it moved, such as a removed layer's weight going to the first layer, on each terrain it moved it on.
Actions
AddPaintingEdit(Libraries.Game.Graphics.Worlds.TerrainStrokeEdit edit)
Adds the edit that undoes painting the change moved on one terrain.
Parameters
editLibraries.Game.Graphics.Worlds.TerrainStrokeEdit: The painting's edit
Create(Libraries.Interface.Controls.Scenes.SceneEditor controller, Libraries.Interface.Controls.Scenes.Items.EditorTerrain terrain, text name, Libraries.Game.Graphics.Worlds.TerrainMaterial beforeMaterial, text beforeFile, Libraries.Game.Graphics.Worlds.TerrainMaterial afterMaterial, text afterFile)
Sets up the edit with the terrain's material from before and after the change.
Parameters
controllerLibraries.Interface.Controls.Scenes.SceneEditor: The scene editorterrainLibraries.Interface.Controls.Scenes.Items.EditorTerrain: The terrain whose materials changednametext: What changed, such as "add Grass"beforeMaterialLibraries.Game.Graphics.Worlds.TerrainMaterial: The terrain's terrain material before, or undefinedbeforeFiletext: Its file's path in the scene beforeafterMaterialLibraries.Game.Graphics.Worlds.TerrainMaterial: The terrain's terrain material after, or undefinedafterFiletext: Its file's path in the scene after
Dispose()
GetRedoName()
Returns
text
GetUndoName()
Sets up the edit with the terrain's material from before and after the change.
Returns
text
Redo()
Records that a terrain material's layers changed.
SetChangedLayers(Libraries.Game.Graphics.Worlds.TerrainMaterial material, Libraries.Game.Graphics.Worlds.TerrainMaterial beforeLayers, Libraries.Game.Graphics.Worlds.TerrainMaterial afterLayers)
Records that a terrain material's layers changed.
Parameters
materialLibraries.Game.Graphics.Worlds.TerrainMaterial: The terrain material that changedbeforeLayersLibraries.Game.Graphics.Worlds.TerrainMaterial: A copy of it from beforeafterLayersLibraries.Game.Graphics.Worlds.TerrainMaterial: A copy of it from after
Undo()
Adds the edit that undoes painting the change moved on one terrain.