载入中...
搜索中...
未找到
ControlRigBindings.cpp
浏览该文件的文档.
37 return Result<void>::failure(Diagnostic::error(DiagnosticCode::InvalidArgument, std::move(message), "controlRig"));
50 cls.addFunc("getRevision", [](ControlRigEditor* self) { return std::to_string(self->revision()); });
67 return bind.checked(self && pose, "editor and pose required", [&] { return self->copyPose(*pose); });
70 return bind.checked(self && pose, "editor and pose required", [&] { return self->keyFromPose(*pose); });
73 return bind.checked(self && clip, "editor and clip required", [&] { return self->bakeInto(*clip, rate); });
75 cls.addFunc("setControl", [bind](ControlRigEditor* self, const std::string& id, float x, float y, float z, float qx,
85 cls.addFunc("moveControl", [bind](ControlRigEditor* self, int index, float x, float y, float z, bool key) {
86 return bind.checked(self, "editor required", [&] { return self->moveControl(index, x, y, z, key); });
88 cls.addFunc("previewMoveControl", [bind](ControlRigEditor* self, int index, float x, float y, float z) {
89 return bind.checked(self, "editor required", [&] { return self->previewMoveControl(index, x, y, z); });
91 cls.addFunc("reparent", [bind](ControlRigEditor* self, const std::string& id, const std::string& parent) {
108 cls.addFunc("getTime", [](ControlRigEditor* self) { return static_cast<float>(self->time()); });
109 cls.addFunc("getDuration", [](ControlRigEditor* self) { return static_cast<float>(self->duration()); });
124 cls.addFunc("setLimitsJson", [bind](ControlRigEditor* self, const std::string& id, const std::string& text) {
138 cls.addFunc("addControl", [bind](ControlRigEditor* self, const std::string& id, const std::string& parent, float x,
165 cls.addFunc("setNode", [bind](ControlRigEditor* self, const std::string& id, const std::string& kind,
199 auto found = std::find_if(d.nodes.begin(), d.nodes.end(), [&](const auto& n) { return n.id == id; });
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 Result failure(Status status)
Construct a failed result from a structured status.
Definition Result.h:196
static Result< Value > fromJson(std::string_view json)
Parse one strict JSON value into an owning Value.
Definition Value.cpp:177
int controlCount() const
Number of authored controls.
std::string controlId(int index) const
Control ID at index, empty if invalid.
void exposeControlRigBindings(ssq::Table &, ssq::Class &)
Register owned rig authoring facade when animation runtime is available.
Definition ControlRigBindings.cpp:210
EVENGINE_API_WORLD Result< RigDefinition > decodeControlRig(const Value &value)
Decode atomically; rejects unknown versions/fields. Pure, no retained input references.
Definition ControlRigCodec.cpp:137
@ TwoBoneIK
std::variant< std::monostate, std::int64_t, double, std::string, bool > Value
Definition Database.h:27
Status invalid(const char *message)
Definition OceanBindingInternal.h:21
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
@ InvalidArgument