Skip to content
Brass Orrery

Orrery Terrain · OrreryTerrainCore module · function

Native::

DecodeSculptCommand

Experimental

Read one command written by EncodeSculptCommand, of this version or an older one it still reads.

Declaration

bool DecodeSculptCommand(const uint8_t* Data, size_t Size, FSculptCommand& Out);
Header
#include "Native/SculptCommand.h"
Module
PublicDependencyModuleNames.Add("OrreryTerrainCore"); in your module’s Build.cs.
Stability
Experimental: supported, may change in a minor version, with a changelog line.
Thread
Pure, any thread.

Description

A version 2 command (kSculptCommandBytesV2 bytes) comes back as this version, its new fields at their defaults: falloff start 0, flatten Both, paint layer 0, opacity 255. Those apply it exactly as version 2 did, so an old record replays to the same tiles. A version 3 or 4 command (kSculptCommandBytesV4 bytes) comes back as this version with no mask: mask hash 0, angle 0, flags 0, blend Add, aspect kBrushAspectSquare, which apply it as version 4 did.

Parameters

NameTypeDefaultMeaning
Dataconst uint8_t*——
Sizesize_t——
OutFSculptCommand&——

Returns

false, with Out untouched, on a short buffer, an unknown version, a patch kind, a brush kind, falloff, flatten direction, mask flag bit or stamp blend this version does not know (a Stamp before version 5 included), an aspect of 0, mask fields other than their defaults without a mask, a blend other than Add on a kind other than Stamp, or non-zero reserved bytes. Bytes past the version's length are ignored.

Note.

Pure, any thread.