Attention: Here be dragons (unstable version)
This is the latest
(unstable) version of this documentation, which may document features
not available in or compatible with released stable versions of Redot.
Checking the stable version of the documentation...
WorldScape3DEditor
Inherits: Object
Description
This class handles all of the sculpting and painting operations for WorldScape3D.
Methods
void |
apply_undo(data: Dictionary) |
void |
backup_region(region: WorldScape3DRegion) |
get_operation() const |
|
get_terrain() const |
|
get_tool() const |
|
is_operating() const |
|
void |
|
void |
set_brush_data(data: Dictionary) |
void |
set_operation(operation: Operation) |
void |
set_terrain(terrain: WorldScape3D) |
void |
|
void |
start_operation(position: Vector3) |
void |
Enumerations
enum Operation: 🔗
Operation ADD = 0
Additive operations.
Operation SUBTRACT = 1
Subtractive operations.
Operation REPLACE = 2
Replacing operations.
Operation AVERAGE = 3
Averaging operations.
Operation GRADIENT = 4
Gradient operations.
Operation OP_MAX = 5
The number of elements in this enum.
enum Tool: 🔗
Tool SCULPT = 1
There is currently no description for this enum. Please help us by contributing one!
Tool HEIGHT = 2
Sculpt heights.
Tool TEXTURE = 3
Paint textures.
Tool COLOR = 4
Paint on the color map.
Tool ROUGHNESS = 5
Paint a roughness modifier, aka wetness.
Tool ANGLE = 10
Paint textures rotated by an angle.
Tool SCALE = 11
Paint textures scaled by a value.
Tool AUTOSHADER = 6
Paint where the shader automatically textures.
Tool HOLES = 7
Paint where vertices will be invalidated to leave holes.
Paint where navigation will be generated.
Tool INSTANCER = 9
Paint MultiMesh instances on the ground.
Tool REGION = 0
Add/remove regions.
Tool TOOL_MAX = 12
The number of elements in this enum.
Method Descriptions
void apply_undo(data: Dictionary) 🔗
Undo the previous changes, with the provided data. Used by Redot, not gamedevs.
void backup_region(region: WorldScape3DRegion) 🔗
Adds a region to the currently pending operation undo snapshot. is_operating() must be true.
Operation get_operation() const 🔗
Returns the current selected tool operation (eg. add, subtract).
WorldScape3D get_terrain() const 🔗
Returns the instance of WorldScape3D this class is connected to.
Returns the current tool selected in the editor plugin.
Returns true if currently in the middle of a brushing operation.
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: WorldScape3D) 🔗
Sets the instance of WorldScape3D this class is connected to.
Sets the tool selected in the editor plugin.
void start_operation(position: Vector3) 🔗
Begin a sculpting or painting operation. Prepares to create an undo/redo commit.
void stop_operation() 🔗
End a sculpting or painting operation. Commits any regions marked with WorldScape3DRegion.edited in the undo/redo system and clears that flag.