MCPcopy
hub / github.com/Lightricks/ComfyUI-LTXVideo / reloadState

Function reloadState

web/js/sparse_track_editor.js:243–256  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

241// ---------------------------------------------------------------------------
242
243function reloadState(node) {
244 const ed = node._ed;
245 const pointsW = node.widgets.find((w) => w.name === "points_store");
246 try {
247 const saved = JSON.parse(pointsW?.value);
248 if (Array.isArray(saved) && saved.length > 0) {
249 ed.splines = saved;
250 }
251 } catch (_) {
252 /* keep current splines */
253 }
254 ed.dirty = true;
255 syncWidgets(node);
256}
257
258// ---------------------------------------------------------------------------
259// Background image loading

Callers 1

beforeRegisterNodeDefFunction · 0.85

Calls 1

syncWidgetsFunction · 0.85

Tested by

no test coverage detected