Class reference
WorldScape3DEditor
Inherits Object
Description
This class handles all of the sculpting and painting operations for WorldScape3D.
Methods
void apply_undo(Dictionary data)
Dictionary data)Undo the previous changes, with the provided data. Used by Redot, not gamedevs.
void backup_region(WorldScape3DRegion region)
WorldScape3DRegion region)Adds a region to the currently pending operation undo snapshot. is_operating() must be true.
int get_operation() const
int get_operation() constReturns the current selected tool operation (eg. add, subtract).
WorldScape3D get_terrain() const
WorldScape3D get_terrain() constReturns the instance of WorldScape3D this class is connected to.
int get_tool() const
int get_tool() constReturns the current tool selected in the editor plugin.
bool is_operating() const
bool is_operating() constReturns true if currently in the middle of a brushing operation.
void operate(Vector3 position, float camera_direction)
Vector3 position, float camera_direction)Start brushing.
void set_brush_data(Dictionary data)
Dictionary data)Sets all brush settings used in the editor plugin.
void set_operation(int operation)
int operation)Sets the tool operation used in the editor plugin.
void set_terrain(WorldScape3D terrain)
WorldScape3D terrain)Sets the instance of WorldScape3D this class is connected to.
void set_tool(int tool)
int tool)Sets the tool selected in the editor plugin.
void start_operation(Vector3 position)
Vector3 position)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.
Constants
ADD = 0
Additive operations.
SUBTRACT = 1
Subtractive operations.
REPLACE = 2
Replacing operations.
AVERAGE = 3
Averaging operations.
GRADIENT = 4
Gradient operations.
OP_MAX = 5
The number of elements in this enum.
SCULPT = 1
HEIGHT = 2
Sculpt heights.
TEXTURE = 3
Paint textures.
COLOR = 4
Paint on the color map.
ROUGHNESS = 5
Paint a roughness modifier, aka wetness.
ANGLE = 10
Paint textures rotated by an angle.
SCALE = 11
Paint textures scaled by a value.
AUTOSHADER = 6
Paint where the shader automatically textures.
HOLES = 7
Paint where vertices will be invalidated to leave holes.
NAVIGATION = 8
Paint where navigation will be generated.
INSTANCER = 9
Paint MultiMesh instances on the ground.
REGION = 0
Add/remove regions.
TOOL_MAX = 12
The number of elements in this enum.