Vector artwork support
Intro
Cavalry supports importing and exporting SVG artwork meaning it's possible to copy/paste SVG code from other vector apps like Affinity, Figma and Adobe Illustrator.
Import
As well as importing SVG as an Asset, .svg files can be imported and converted when dragging or pasting them into the Viewport.
Dragging an SVG file from the Assets Window or file system into the Viewport or pasting SVG data via the clipboard will invoke a pop-up dialogue with two options:
- Asset Layer - Create an SVG layer and connect the
.svgasset to the File attribute. - Separate Layers - Separate the
.svgasset into individual layers, convert each one into an Editable Shape and set the Fill and Stroke to match.
Hold Option/Alt when dragging an SVG asset from the Assets Window or file system into the Viewport or Scene Tree to bypass the modal and Separate Layers.
Copy and Paste SVG data
It's possible to copy/paste SVG code from other vector apps like Adobe Illustrator, Affinity and Figma.
| Application | Instructions |
|---|---|
| Adobe Illustrator | Edit > Copy (Cmd/Ctrl + C) |
| Figma | Right click on a path and select Copy/Paste as > Copy as SVG. |
| Affinity | Edit > Copy (Cmd/Ctrl + C). Ensure Copy Items as SVG is checked in Settings > General > Miscellaneous |
Export
Cavalry Compositions can be rendered to SVG via the Render Manager or via the File > Render Current Frame to SVG... menu item.
Cavalry Shapes can also be copied to the clipboard. To copy a Shape to the clipboard as SVG, select a Shape or Shapes in the Viewport and right click > Copy as SVG.
Supported Features
| Feature | Import | Export | Notes |
|---|---|---|---|
| Opacity | ✔️ | ✔️ | A Shape's Opacity and/or Fill Alpha will define the SVG's fill-opacity on export. |
| Gradient | ✔️ | ||
| Clipping Masks | ✔️ | ||
| Text | ✔️ | Missing fonts fall back to the default font. | |
| Blend Modes | |||
| Stroke Alignment | Only Centre alignment is supported. |
Support for svg can be a little mixed as it is not a fully featured format. For example, the SVG format has no native support for Inner or Outer Stroke and, as a consequence, different apps have different ways of working around this problem. For this reason parity may not be 100% when exchanging files between applications.