载入中...
搜索中...
未找到
AppearanceBindings.cpp
浏览该文件的文档.
37 cls.addFunc("applyMorphWeights", [vm](Appearance* self, graphics::Mesh* mesh, const std::string& prefix) {
40 vm, Status::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, "Expected a live mesh")));
The single Squirrel projection for common Result, Status and Value.
static Diagnostic error(DiagnosticCode code, std::string message, std::string path={})
Construct an error diagnostic with the standard error severity.
Definition Diagnostic.cpp:21
static Status success(StatusCode code=StatusCode::Ok)
Construct a successful status with an explicit non-error outcome.
Definition Status.cpp:19
static Status failure(StatusCode code, Diagnostic diagnostic)
Construct a failed status with one diagnostic.
Definition Status.cpp:28
Result< std::string > toJson() const
Serialize this value as deterministic compact JSON.
Definition Value.cpp:187
static Result< Value > fromJson(std::string_view json)
Parse one strict JSON value into an owning Value.
Definition Value.cpp:177
Renderer-independent character appearance authoring and runtime state. Owns its validated definition,...
Definition Appearance.h:27
Result< void > configure(const Value &definition)
Validate and replace a complete eve.appearance.definition v1 document. @cost Linear in document size ...
Definition Appearance.cpp:63
Result< void > applyMorphWeights(graphics::Mesh &mesh, std::string_view prefix) const
Validate all driven morph names before writing weights to a borrowed mesh. Only outputs beginning wit...
Definition AppearanceMesh.cpp:5
bool canRedo() const
Query whether a redo state exists, without evaluating anything.
Definition Appearance.h:51
bool canUndo() const
Query whether an undo state exists, without evaluating anything.
Definition Appearance.h:49
Value evaluate() const
Evaluate additive channels and multi-input corrective drivers, and derive wardrobe visibility....
Definition Appearance.cpp:225
Result< void > redo()
Redo the last undone edit; NotFound when history is empty.
Definition Appearance.cpp:207
Result< void > undo()
Undo the last applied edit; NotFound when history is empty.
Definition Appearance.cpp:199
Result< void > apply(const Value &patch)
Atomically patch parameters and selections; reject unknown ids, conflicts and out-of-range values....
Definition Appearance.cpp:163
Value snapshot() const
Return an owning versioned snapshot of authoritative parameter and selection state....
Definition Appearance.cpp:215
Result< void > restore(const Value &snapshot)
Restore an exact eve.appearance.state v1 snapshot for the currently loaded profile....
Definition Appearance.cpp:182
Definition Appearance.cpp:8
void exposeAppearance(ssq::Table &table)
Register VM-owned Appearance objects. Table is borrowed only during registration. @thread VM owner th...
Definition AppearanceBindings.cpp:8
ssq::Table projectStatusResult(HSQUIRRELVM vm, const Status &status)
Project a checked native status that carries no payload.
Definition SquirrelBinding.cpp:524
ssq::Table projectResult(HSQUIRRELVM vm, Result< void > &&result)
Consume and project a void native Result using the common schema.
Definition SquirrelBinding.cpp:540
Result< Value > valueFromSquirrel(HSQUIRRELVM vm, SQInteger index, const SquirrelValueOptions &options)
Convert one Squirrel value into the canonical owning Value tree.
Definition SquirrelBinding.cpp:412
@ InvalidArgument