Terrain3DEditor
Inherits: Object
Description
This class handles all of the sculpting and painting operations for Terrain3D.
Methods
void |
apply_undo(maps: Array) |
get_tool() |
|
bool |
|
void |
operate(position: Vector3, camera_direction: float) |
void |
set_brush_data(data: Dictionary) |
void |
set_operation(operation: Operation) |
void |
set_terrain(terrain: Terrain3D) |
void |
|
void |
start_operation(position: Vector3) |
void |
Enumerations
enum Operation:
Operation ADD = 0
Additive operations.
Operation SUBTRACT = 1
Subtractive operations.
Operation MULTIPLY = 2
Multiplicative operations.
Operation DIVIDE = 3
Divisive operations.
Operation REPLACE = 4
Replacing operations.
Operation AVERAGE = 5
Averaging operations.
Operation GRADIENT = 6
Gradient operations.
Operation OP_MAX = 7
The number of elements in this enum.
enum Tool:
Tool HEIGHT = 0
Sculpt heights.
Tool TEXTURE = 1
Paint textures.
Tool COLOR = 2
Paint on the color map.
Tool ROUGHNESS = 3
Paint a roughness modifier, aka wetness.
Tool AUTOSHADER = 4
Paint where the shader automatically textures.
Tool HOLES = 5
Paint where vertices will be invalidated to leave holes.
Paint where navigation will be generated.
Tool REGION = 7
Add/remove regions.
Tool TOOL_MAX = 8
The number of elements in this enum.
Method Descriptions
void apply_undo(maps: Array)
Undo the previous changes, with the reverted images in the array. Used by Godot, not users.
Operation get_operation()
Returns the current operation.
Terrain3D get_terrain()
Returns the instance of Terrain3D this class is conneced to.
Tool get_tool()
Returns the current tool selected in the editor plugin.
bool is_operating()
Returns true if currently brushing.
void operate(position: Vector3, camera_direction: float)
Start brushing.
void set_brush_data(data: Dictionary)
Sets all brush settings used in the editor plugin.
void set_operation(operation: Operation)
Sets the tool operation used in the editor plugin.
void set_terrain(terrain: Terrain3D)
Sets the instance of Terrain3D this class is connected to.
void set_tool(tool: Tool)
Sets the tool selected in the editor plugin.
void start_operation(position: Vector3)
Begin a sculpting or painting operation.
void stop_operation()
End a sculpting or painting operation.