Class reference

WorldScape3DEditor

Inherits Object

Description

This class handles all of the sculpting and painting operations for WorldScape3D.

Methods

void apply_undo(Dictionary data)

Undo the previous changes, with the provided data. Used by Redot, not gamedevs.

int 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.

int get_tool() const

Returns the current tool selected in the editor plugin.

bool is_operating() const

Returns true if currently in the middle of a brushing operation.

void operate(Vector3 position, float camera_direction)

Start brushing.

void set_brush_data(Dictionary data)

Sets all brush settings used in the editor plugin.

void set_operation(int operation)

Sets the tool operation used in the editor plugin.

void set_terrain(WorldScape3D terrain)

Sets the instance of WorldScape3D this class is connected to.

void set_tool(int tool)

Sets the tool selected in the editor plugin.

void start_operation(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

Enum: Operation

Additive operations.

SUBTRACT = 1

Enum: Operation

Subtractive operations.

REPLACE = 2

Enum: Operation

Replacing operations.

AVERAGE = 3

Enum: Operation

Averaging operations.

GRADIENT = 4

Enum: Operation

Gradient operations.

OP_MAX = 5

Enum: Operation

The number of elements in this enum.

SCULPT = 1

Enum: Tool

HEIGHT = 2

Enum: Tool

Sculpt heights.

TEXTURE = 3

Enum: Tool

Paint textures.

COLOR = 4

Enum: Tool

Paint on the color map.

ROUGHNESS = 5

Enum: Tool

Paint a roughness modifier, aka wetness.

ANGLE = 10

Enum: Tool

Paint textures rotated by an angle.

SCALE = 11

Enum: Tool

Paint textures scaled by a value.

AUTOSHADER = 6

Enum: Tool

Paint where the shader automatically textures.

HOLES = 7

Enum: Tool

Paint where vertices will be invalidated to leave holes.

NAVIGATION = 8

Enum: Tool

Paint where navigation will be generated.

INSTANCER = 9

Enum: Tool

Paint MultiMesh instances on the ground.

REGION = 0

Enum: Tool

Add/remove regions.

TOOL_MAX = 12

Enum: Tool

The number of elements in this enum.

Source revision 5592dc3a7a61
Connection interrupted. Reload×

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.