TerrainBrush
Description
The tool used to edit the terrain. Mostly to mod the Terrain Tool. To draw on the Terrain, use World.Level.Terrain.Paint() instead.
Accessed by Global.Editor.Tools["TerrainBrush"]
.
Properties
bool | Enabled |
float | BrushRadius |
bool | IsPainting |
int | TerrainID |
bool | SmoothBlending |
float | Size |
float | Intensity |
Image | brush |
Image | previousSplat |
Image | previousSplat2 |
ItemList | terrainList |
VBoxContainer | terrainButtonBox |
bool | extendedTerrainTypes |
Methods
void | SetBiome ( int index ) |
void | SetSize ( float value ) |
void | SetSmoothBlending ( bool enabled ) |
void | SetTextureFromWindow ( Texture texture, int listIndex ) |
void | UpdateBrush ( ) |
float | GetBrushRadius ( ) |
void | Fill ( ) |
void | ExpandSlots ( bool value ) |
void | SetControlsForExpandedSlots ( bool value ) |
Property Descriptions
- bool Enabled:
Gets if the tool is enabled by the user.
- float BrushRadius:
Gets the brush radius in canvas unit size.
- bool IsPainting:
Gets if the user is currently painting.
- int TerrainID:
Get or set the terrain being painted by slot order.
- bool SmoothBlending:
Get if the brush is smooth. Call SetSmoothBlending() to set instead.
- float Size:
Get or set the size of the brush.
- float Intensity:
Get or set the intensity of the brush.
- Image brush:
The Godot Image of the current brush style.
- Image previousSplat:
The previous version of the splatmap of the Terrain. Used for undo history.
- Image previousSplat2:
The previous version of the 2nd splatmap needed when slots are expanded to 8. Used for undo history.
- ItemList terrainList:
The UI Control that contains the current set of textures available.
- VBoxContainer terrainButtonBox:
The UI Control that contains all the terrain selection buttons.
- bool extendedTerrainTypes:
Gets whether or not the user has selected to expand terrain slots.
Method Descriptions
- void SetSmoothBlending ( bool enabled ):
Toggles if the terrain is using texured blending or smooth blending.
- void SetTextureFromWindow ( Texture texture, int listIndex ):
Called by the Texture Window to set the terrain
- void UpdateBrush ( ):
Call to update the brush once Size is set.
- float GetBrushRadius ( ):
Gets the brush radius.
- void Fill ( ):
Fill the terrain with the selected terrain texture.
- void ExpandSlots ( bool value ):
Set to expand terrain to 8 slots.
- void SetControlsForExpandedSlots ( bool value ):
Called by ExpandSlots() to update the UI to use more slots.