Import an SVG
import_svgAdd an SVG (icon, logo, illustration) as editable vector layers inside one new group, from its markup in svg: paths, rectangles, circles, lines and polygons with their fills, strokes, linear and radial gradients and transforms. Each becomes a group named from its id, data-name or inkscape:label, and each shape keeps its name, so update_layers select and animate can find them. Text, images, masks, clips, filters and are skipped and listed in skipped: add text with create_layers and photos as image layers. Returns the group and every layer made. Saved as a new revision that undo reverts; if any part is refused, nothing changes. Use it for artwork drawn elsewhere; for exact geometric shapes use shape_path.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| x | No | Left edge in px relative to the parent (centred when omitted). | |
| y | No | Top edge in px relative to the parent (centred when omitted). | |
| svg | No | The SVG markup. | |
| name | No | Name of the group the shapes go into ("SVG" by default). | |
| width | No | Width in px to scale to, keeping the aspect ratio. Default: the SVG's own width, shrunk to fit inside the parent when larger. | |
| intent | Yes | One short sentence: what you change and why. Kept in the design history. | |
| page_id | Yes | The page to work on, as returned by create_design. | |
| parent_id | No | Frame or group to add into; the scene when omitted. |