After using PaintStyle() the Scripter also creates a rectangle. This rectangle seems to be connected with paint style so I can't delete it without deleting the style.
Also rectangle is created at coordinates 0:0. This rectangle has the same color as the paint style but not linked to it. And here is the strange part, if you delete this rectangle, the paint style will also be deleted 🤯
There will also be an error in console after deleting that rectangle: "Uncaught Error: "Encountered style on visible canvas" in softDeleteNode (FGSceneGraph.cpp)".
By the way figma.createPaintStyle() seems to work correctly, this bug only happens with PaintStyle()
After using
PaintStyle()
the Scripter also creates a rectangle. This rectangle seems to be connected with paint style so I can't delete it without deleting the style.Steps to reproduce:
Run this script:
Expected behavior:
Current behavior:
There will also be an error in console after deleting that rectangle: "Uncaught Error: "Encountered style on visible canvas" in softDeleteNode (FGSceneGraph.cpp)".
By the way
figma.createPaintStyle()
seems to work correctly, this bug only happens withPaintStyle()