Jump to content

Recommended Posts

Posted

Hi,

I'm currently experiencing a problem with Affinity Designer: When I export my work in svg in order to import them in a vue.js project, I find myself unable to load several svg in the same component.
After a long search, I've finally managed to isolate the problem: Vite, the Vue bundler, is responsible for optimizing the styles linked to the svg, but it turns out that my images all have a radial gradient and, despite having renamed the layers using unique names, I end up with different gradients all bearing the same id: _Radial1.
How can I uniquely rename the gradients I use in my afdesign files in the same way I rename my layers to avoid name conflicts?

Thanks

Posted

Welcome to the forums @loranger

I don’t think we users have any control over what the gradients are called when exported to SVG.

Can you give us an example AFDESIGN document that we can look at?

Can you also point us to the specific gradients you are having a problem with in that document?

There might not be anything we users can can do about it but someone might have some kind of ‘post-export-fix/workaround’ that you could use.

Posted

Thank you @GarryP!

I tried to make a concrete but simple example of my problem.

You cand find a full project on github (if you're into web dev, you just need to clone then run npm install and npm run dev) and the afdesign file resides in the assets folder.

I hope you could understand my issue, and hopefully find a way to avoid this directly inside Affinity Designer.

SCR-20250125-ufof.png

Posted

Thanks for the extra information.

I don’t think I will be able to help further (I don't think we can do what I think you want to do) but, with the details you have supplied, someone else might have some ideas.

Posted
On 1/21/2025 at 3:19 PM, loranger said:

How can I uniquely rename the gradients I use in my afdesign files in the same way I rename my layers to avoid name conflicts?

Other than by editing the text contents of the SVG file manually, I don't think you can. The SVG files produced by Affinity are intended for stand-alone use, not for combining into other files as you're doing. 

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.3.1, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.