Skip to main content

Feature Requests: Expose "Ungroup" and "Outline stroke" APIs for vector nodes


Hi, it’s my first time posting here so please let me know if there’s a better category where I can post this.

I’m working on a Figma plugin to automate a manual workflow and one of the steps is to convert a vector’s stroke to outlines. Manually I do this by following these steps:

  1. Select vector layer
  2. Ungroup
  3. Select parent frame
  4. Flatten
  5. Outline strokes

Currently there’s no “outline strokes” plugin API available at all, and as far as I can tell the “ungroup” API applies to groups but not vector nodes, despite being able to ungroup it in the UI.

4 replies

tank666
  • 4854 replies
  • October 11, 2023

Vector layers cannot be ungrouped. You’re probably confusing something.

“Outline stroke” is available in the Plugin API.

figma.com

  • Author
  • 2 replies
  • October 11, 2023

Thanks for your quick reply! I’ll take a look at the outline stroke link you shared, for some reason I couldn’t find it.

Yes, I think you’re right. I think the layer is actually of type BOOLEAN_OPERATION. I don’t think that satisfies the SceneNode & ChildrenMixin requirement on ungroup, unless I’m mistaken.


tank666
  • 4854 replies
  • October 11, 2023

For layers such as Boolean operations, you can use ungrouping.

figma.com

  • Author
  • 2 replies
  • October 11, 2023

You were right on both counts, ungrouping the boolean operation node and outlining strokes on the vector both work!

The error was on my part for not finding these or getting them to work correctly in the first place.

Thanks so much for your help with this! 🙌


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings