Really Flatten Vectors
<p>Figma plugin that flattens a vector into as few paths as possible. Overlapping paths will be simplified so only the outer shape is defined. The flattening happens in-place.</p><h2><br></h2><h2>Usage</h2><ol><li>Select some layers</li><li>Run the plugin by going to <code>Plugins > Really Flatten Vectors</code> or pressing <code>⌘/</code> and searching for <code>Really Flatten Vectors</code>.</li></ol><p><br></p><h2><strong>Links</strong></h2><ul><li><a href="https://github.com/stevenla/figma-plugin-really-flatten-vector" rel="noreferrer noopener nofollow ugc" target="_blank">GitHub</a></li><li><a href="https://steven.la/" rel="noreferrer noopener nofollow ugc" target="_blank">Personal Site</a></li></ul><p><br></p><h2>Known Issues</h2><ul><li>Flattening inside of a group/frame with auto-layout will not flatten in-place</li><li>Some invisible layers will be made visible</li></ul><p><br></p><h2>How does it work?</h2><p>Generally, Figma simplifies paths when using the built-in flatten <code>⌘E</code> on a union layer. This plugin simplifies the setup needed to get a pretty flattened output.</p><ol><li>Deeply ungroup/unframe the selection. This keeps positioning simple for some of the later operations.</li><li>Outline all strokes. Since this plugin merges everything into one path, strokes cannot be preserved. All strokes and text are outlined.</li><li>Use the first valid fill paint data to use as the output fill.</li><li>Use Figma's built-in flatten to merge the layers. Figma is pretty intelligent and will place the resulting layer in the correct spot in the layer hierarchy.</li><li>Create a union layer that contains the resulting layer from the previous step, and a clone of that same layer. This is because running the built-in flatten on a union with just one layer won't simplify the paths. If there is an exact replica inside the union, then the resulting layer will have simplified paths.</li><li>Run the built-in flatten against the union.</li></ol><h2><br></h2>
Plugin Preview
About this plugin
Figma plugin that flattens a vector into as few paths as possible. Overlapping paths will be simplified so only the outer shape is defined. The flattening happens in-place.
Usage
- Select some layers
- Run the plugin by going to
Plugins > Really Flatten Vectors
or pressing⌘/
and searching forReally Flatten Vectors
.
Links
Known Issues
- Flattening inside of a group/frame with auto-layout will not flatten in-place
- Some invisible layers will be made visible
How does it work?
Generally, Figma simplifies paths when using the built-in flatten ⌘E
on a union layer. This plugin simplifies the setup needed to get a pretty flattened output.
- Deeply ungroup/unframe the selection. This keeps positioning simple for some of the later operations.
- Outline all strokes. Since this plugin merges everything into one path, strokes cannot be preserved. All strokes and text are outlined.
- Use the first valid fill paint data to use as the output fill.
- Use Figma's built-in flatten to merge the layers. Figma is pretty intelligent and will place the resulting layer in the correct spot in the layer hierarchy.
- Create a union layer that contains the resulting layer from the previous step, and a clone of that same layer. This is because running the built-in flatten on a union with just one layer won't simplify the paths. If there is an exact replica inside the union, then the resulting layer will have simplified paths.
- Run the built-in flatten against the union.
Plugin Details
Version | 1 |
---|---|
Created | April 23, 2022 |
Last Updated | April 24, 2022 |
Category | editing & effects plugins |
Creator | steven la |
Stats | 2792 installs, 181 likes |
Pricing | Free |
Technical Details
- API:1.0.0
- main:code.js
- Editor Types:figma
More Like This
Discover other plugins in the editing & effects plugins category.