# SVG

### UI

[Common Attributes](https://scenegroup.gitbook.io/cavalry/nodes/shapes/common-attributes) +

**File** - drag in a .svg file from the [Asset Window](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/asset-window)

**SVG Materials** - uncheck this attribute to ignore the SVG's materials. Enable **Fill** under the Fill tab to replace the Fill Color.

**SVG Strokes** - uncheck this attribute to ignore the SVG's stroke. Enable **Stroke** under the Fill tab to replace the Stroke Color.

### Working with SVG data.

Dragging an **SVG** file from the [Assets Window](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/asset-window) or the filesystem into the [Viewport](https://scenegroup.gitbook.io/cavalry/user-interface/menus/window-menu/viewport) will invoke a pop up dialogue with two options:

* **Asset Layer** - create an **SVG** node and connect the `.svg` asset to the **File** attribute. If the `.svg` asset does not already exist in the Assets Window it will be added.
* **Separate Layers** - separate the `.svg` asset into individual layers, convert each one into an [Editable Shape](https://scenegroup.gitbook.io/cavalry/nodes/shapes/editable-shape) and set the **Fill** and **Stroke** to match.

It is also possible to copy/ paste SVG code from other vector apps like Adobe Illustrator, Affinity Designer and Figma.

* **Adobe Illustrator** - **Edit > Copy** (`cmd/ ctrl + c`)&#x20;
* **Affinity Designer** - ensure **Copy Items as SVG** is checked in **Preferences > General** and then use **Edit > Copy** (`cmd/ ctrl + c`)&#x20;
* **Figma** - right click on a shape and then select **Copy/Paste > Copy as SVG**.
