Jump to content
You must now use your email address to sign in [click for more info] ×

Recommended Posts

  • Staff

Hi Singguy,

 

At the moment we only export layers that are visible and haven't been hidden. The ability to export hidden layers is something that has been requested in the past and may be added in the future but in the meantime you will have to make all of your layers visible before you export.

 

C

Please tag me using @ in your reply so I can be sure to respond ASAP.

Link to comment
Share on other sites

I am able to import SVG files that have hidden layers so it only seemed logical to be able to export them as well.  It's not a problem to select all layers and make them visible before I export, it just doesn't look very nice when layers overlap or when a layer is representative of an artboard or another page.  

SVG is an open standard whereas .afdesign is not so this does make it difficult for certain people to exchange files easily. 

 

My issue was that I was sent a licensed SVG file that had hidden layers.  I made some changes and sent them back to the original licensor of the file and he was not able to see the hidden svg layers that I made changes to.  It just seemed awkward to have to select all layers when the SVG standard allows hidden layers.

 

On the other hand, I'm sure that there are instances where someone might want to export to SVG and not have hidden layers contained within the file either.  I know that in AI hidden layers are exported whether you want them or not so I guess there is an argument on both sides of the fence.  

 

I just want you to know that I couldn't be happier with Affinity Designer/Photo and you guys have given me more options then I could have hoped for.  I am more than happy to work around some of these little incompatibilities and don't find them to be a major problem at all.  If someone really needs something that AD doesn't offer then they can use some other program that provides that compatibility.  It really bugs me when someone complains and threatens to switch to something else.  There is nothing better than Affinity for the price!

 

Thank you for providing us with such a wonderful tool for the price and thank you for your unbelievable support!  I owe you a lot more than I have ever paid for your software.

Link to comment
Share on other sites

  • 4 weeks later...
  • 2 weeks later...
  • 3 months later...

Same problem here;

 

I exported an svg for web use only to notice that parts that lied outside the canvas were not written to the svg file, even if they were inside of a group that was mostly visible. 

 

I really need this to be fixed before I can use this for web use.

Link to comment
Share on other sites

Same problem here;

 

I exported an svg for web use only to notice that parts that lied outside the canvas were not written to the svg file, even if they were inside of a group that was mostly visible. 

 

I really need this to be fixed before I can use this for web use.

Why can't you just resize the canvas to include everything?

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Because of the way designer exports everything. 

 

Say I had a document structure like this:

  • Item A
  • Item B
    • Item B1
    • Item B2
    • Item B3
  • Item C

Say I wanted to move item B around the canvas, this is made very difficult with designer, because it does not allow me to set up relative transforms. What currently happens, is that items B1, B2 and B3 get their transformations "baked in", so basically, ItemB has no translation information, but items B1, B2 and B3 are positioned absolutely, relative to the canvas.

 

What I would prefer to see, is to see items B1, B2 and B3 positioned relative to the registration point, and then to apply a master transformation to item B to place the registration point in the correct place. 

 

This is the most sensible behaviour, because then if I wanted to move an object around the canvas, I could achieve that easily, by simply editing the master transformation.

 

Right now, if I increase the size of the canvas, <B1, B2 and B3> will just be in the wrong place, and that wreaks havoc when trying to apply sensible transformations to the resulting svg.

Link to comment
Share on other sites

I do not understand what you mean by transformations being "baked in," or what the "registration point" or "master transformation" are that you refer to.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

So when exporting svg's a transformation matrix is applied to each node.

So for example if item A, B, B1, B2, B3 and C are all translated, then they will each have their own "translation" coordinates.

 

The registration point is the little square you have in the transform panel (in affinity designer), it is basically the point that you would rotate your item around. 

 

When I say transformations are baked in, I mean that Instead of translating node B to the correct location, then translating B1, B2, and B3 relative to node B, affinity just translates B1, B2 and B3 directly; without moving node B at all. This doesn't allow for proper transformation groupings, and makes it very hard to work with the resulting svg.

Link to comment
Share on other sites

saivan,

 

Perhaps I'm still missing something but it seems like in your document structure you are talking about layers, not nodes, & the "B" item is a group layer (or similar) that includes shape (or whatever) layers B1, B2, & B3. Is that right?

 

If so, I don't understand why you are talking about nodes in the last paragraph of your last post. Group layers don't have nodes (in AD); they are just a way to organize object, image, etc. layers so they can be moved, rotated, hidden, etc. as if they were a single object. Their registration point, if you want to call it that, is just a reference point on the group's bounding box. So transforming a group layer of necessity transforms the individual items in it, & changes the reference point coordinates of both the group & its items accordingly. Transforming any of the individual layers in the group changes the bounding box coordinates of the group as needed so that it still includes all the layers in the group.

 

When you resize the document's canvas (using the File > Document Setup menu item) in the Dimensions tab, you have a choice of rescaling everything proportionally to the new dimensions or anchoring everything to the page, with a choice of 9 reference/registration anchor points similar to those in the Transform panel. So for example, if you chose the center anchor point, the only thing that will happen if you increase the canvas size is more empty space will be created around the existing objects.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Thanks Dave, no it doesn't give me what I would expect.

I agree with you R C-R, I will use a concrete example this time: 

 

Say I had:

  • Island One
  • Island Two
  • Person
    • Head
    • Hair
    • Left Eye
    • Right Eye

If I wanted to be able to move the person around so that he can visit the islands, I need to be able to translate the group layer for the person. Eventually, the end goal is to output code like this. If I had the person at x=500 and y=200, and his group layer was rotated by 45 degrees, the following is the svg code I would expect to get out of AD:

<g id="person" transform="matrix(0.7, 0.7, 0.7, -0.7, 500, 200)">
    <path id="head" d="...[coordinates relative to 500, 200 and rotated 45deg]..."/>
    <path id="hair" d="...[coordinates relative to 500, 200 and rotated 45deg]..."/>
    <path id="left-eye" d="...[coordinates relative to 500, 200 and rotated 45deg]..."/>
    <path id="right-eye" d="...[coordinates relative to 500, 200 and rotated 45deg]..."/>
</g>

Instead, an export right now will have no transformation matrix on the g element, and the paths will be transcribed relative to the original reference frame. As a result, when I want to apply a transformation like a rotation or a shear, it will rotate it about (0, 0), which is not the intended transformation; this will of course produce wild and wonderful effects.

 

My key purpose here is to use the exports as components of an animation;

I'm finding that I have to write a lot of code to work around this problem,

which I believe should just be the default export behavior of AD.

 

Hope that makes sense :)

Sorry if I've been unclear.

Saivan.

Link to comment
Share on other sites

I've attached an example .afdesign file, and also the SVG that Affinity created with the "for export" preset. It seems to me it the transforms are organised how you want. There is a transform on the Person group, and the other elements (I just drew a face) are nested within it and so relative to that transform:

 

    <g id="Person" transform="matrix(1,0,0,1,137.84,395.893)">
        <g id="Mouth" transform="matrix(4.43588,0,0,4.14447,-835.145,-914.053)">
            <ellipse cx="284.858" cy="326.466" rx="41.792" ry="35.78" style="..."/>
        </g>
        <ellipse id="Eye-2" cx="371.395" cy="396.322" rx="31.512" ry="25.832" style="..."/>
        <g id="Eye-1" transform="matrix(1,0,0,1,-19.0497,-7.6625)">
            <ellipse cx="498.755" cy="416.346" rx="28.584" ry="31.132" style="..."/>
        </g>
        <g id="Mouth1" transform="matrix(-0.005566,-0.999985,2.21284,-0.0123169,-728.309,884.612)">
            <path d="..." style="..."/>
        </g>
    </g>
    <path id="Island-2" d="..." style="..."/>
    <path id="Island-1" d="..." style="..."/>

Example.afdesign

Example.svg

Link to comment
Share on other sites

  • 2 years later...

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.