I would appreciate some guidance on figma.variables. setBoundVariableForPaint method.
figma.comI would like to run a simple script to bind a variable to the existing style. This is what I tried
// get a style ref
let style = figma.getLocalPaintStyles()[0];
// get a var ref
let variable = figma.variables.getVariableById("VariableID:1:53");
// bind?
figma.variables.setBoundVariableForPaint(style.paints[0], 'color', variable);
It returns a solid paint indeed, however, it has no effect on a given style. Confusing…