Version 1, Update 123
Expanded support for Figma Draw features
You can now use the Plugin API to view and manipulate Figma Draw features, including:
- Creating and editing text on a path nodes
- Viewing and adding transforms in transform groups
- Viewing and adding stretch brush, scatter brush, and dynamic strokes
- Modifying stroke width profiles to create custom variable width strokes or using preset stroke width profiles
We've also updated the documentation around setting pattern fills and strokes.
New types
TextPathStartData: Data defining the starting position of text on a pathTransformModifier: A modifier that can be applied to a transform groupComplexStrokeProperties: Stroke properties describing stretch brushes, scatter brushes, and dynamic strokesVariableWidthStrokeProperties: Points that define the width profile of variable width strokes
New methods
figma.createTextPath(node, startSegment, startPosition): Create a text on a path node from a vector node.figma.transformGroup(nodes, parent, index, transformModifiers): Wrap nodes in a transform group with specified transform modifiers.figma.loadBrushesAsync(brushType): Load the first-party brushes of the specified type (stretch or scatter).node.setFillsAsync(fills): Supports setting pattern fills.node.setStrokesAsync(strokes): Supports setting pattern strokes.
New properties
textOnPathNode.textPathStartData: Gets and sets the starting position data for text on a path node.transformGroupNode.transformModifiers: Gets and sets the transform modifiers applied to a transform group.node.complexStrokeProperties: Gets and sets the complex stroke properties (brush or dynamic stroke properties) of a node, if any.node.variableWidthStrokeProperties: Gets and sets the variable width stroke properties of a node, if any.