robac Posted August 17 Share Posted August 17 (edited) Hi, I've searched extensively for a solution to this but can't find anything that works. I have a vector graphic with several horizontal lines; each line has bumps and 'ridges' of varying heights and no two lines are the same. I want to apply a gradient to each individual horizontal line so that the bottom/flat part is one colour and the peaks/ridges are another colour - like the two lines near the bottom of this image, which I did manually with gradient tool. How can I apply that same style to the other lines? It is not practical to do it manually as there are 80 lines altogether. I have tried the following without success: Applying the gradient swatch to other lines. This only applies the gradient horizontally (see the line in the middle of the image) rather than vertically; if I try to rotate the gradient, it doesn't work, I think because the rotation is based on the width of the object and isn't limiting itself to the height of the object (this is hard to describe) Using 'create style' for my gradient stroke and applying the new style to other lines. This doesn't do anything; the lines stay white. It doesn't do anything if I try to draw a circle or square as a fresh shape, either. using 'create style' for a gradient fill and applying it to other lines. This kind of works but I still need to apply the gradient to each line manually then tinker with the stroke/fill options to set it correctly. Selecting one of the correctly styled lines, clicking copy, then trying to 'paste style' to another line. As above, doesn't do anything, lines stay white, doesn't work on newly created shapes. Selecting all of the lines and using the gradient tool on them in one go. This just treats all of the lines as a group, so across the whole image the ones towards the bottom are purple and the lines at the top are white rather than styling each line individually. If it matters: I've tried the above with the lines grouped and as individual layers The lines are open-ended rather than closed shapes Ideas, please! Grateful for any insight. Edited August 17 by robac Added further information Quote Link to comment Share on other sites More sharing options...
thomaso Posted August 17 Share Posted August 17 Hi @robac, Welcome to the Affinity Forums! If I understand right you have two options. One via copy/paste… Select one curve with the desired design. Choose menu Edit > Copy. Select all unformatted objects. Choose menu Edit > Paste as Style. … the other way via a saved style: Select one curve which is designed as desired. In the "Styles" Panel choose the menu option "Add Style from Selection". Apply the new style to other objects. Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
lepr Posted August 17 Share Posted August 17 14 minutes ago, thomaso said: Hi @robac, Welcome to the Affinity Forums! If I understand right you have two options. One via copy/paste… Select one curve with the desired design. Choose menu Edit > Copy. Select all unformatted objects. Choose menu Edit > Paste as Style. … the other way via a saved style: Select one curve which is designed as desired. In the "Styles" Panel choose the menu option "Add Style from Selection". Apply the new style to other objects. The OP tried that. The functionality is broken in V2. thomaso 1 Quote Link to comment Share on other sites More sharing options...
robac Posted August 17 Author Share Posted August 17 (edited) 36 minutes ago, lepr said: The functionality is broken in V2. Good point - I forgot to say I'm on v2. And it doesn't look like I can roll back to v1 and try it there as I only ever purchased v2. Edited August 17 by robac grammar Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted August 17 Share Posted August 17 Moonshot idea Assuming all lines have vertical equal distance, and layer stack is organized from top to bottom matching y position. align all lines to bottom apply gradient to all lines move top line to original y position select all lines and distribute them in equal distance Quote Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
thomaso Posted August 17 Share Posted August 17 2 hours ago, lepr said: The OP tried that. The functionality is broken in V2. Thanks and sorry for not reading carefully! @robac, in V2 there is another option to transfer a style between objects: The Style Picker Tool. According this thread it appears to work in a previous V2 version at least: Possibly there is also a V2 version that does not have the two issues mentioned above. In this case you might try to download the according installer, if you'll get them offered for download in a "Previous versions" list in your account, like so: Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
KarinC Posted August 17 Share Posted August 17 Paste as style is broken in v2? I use it all the time in v2. edit: Designer v2.4.2 Did it break in 2.5? Quote Link to comment Share on other sites More sharing options...
robac Posted August 17 Author Share Posted August 17 8 minutes ago, NotMyFault said: Assuming all lines have vertical equal distance They don't, but perhaps this will help someone else! 7 minutes ago, thomaso said: in V2 there is another option to transfer a style between objects: The Style Picker Tool. Thanks, I'll take a look. KarinC, maybe it's paste style specifically in relation to gradient strokes that's broken..? idk, my Designer use cases are such that I haven't had to use that particular feature before. Quote Link to comment Share on other sites More sharing options...
thomaso Posted August 17 Share Posted August 17 1 minute ago, robac said: maybe it's paste style specifically in relation to gradient strokes that's broken..? Maybe. @lepr or another V2 user might know what specific function in detail has been reported & logged as a bug for your issues. Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
h_d Posted August 17 Share Posted August 17 7 minutes ago, NotMyFault said: Moonshot idea Assuming all lines are same width, and vertical equal distance. align all lines to bottom apply gradient to all lines move top line to original y position select all lines and distribute them in equal distance Brilliant. Just a couple of extra thoughts: Set the stroke of all the lines to white. Layer>Alignment>Align bottom Select all the lines in the Layers panel and Group them. Make sure the Group is selected. Switch to the Gradient tool, set the Context to Stroke, Type to Linear, set colours as required. Draw the gradient over the group, rotate so it's vertical: Switch to the Move tool, Ungroup. Distribute the individual lines as required: @robac in your screen shot the left-hand ends of the lines are equally distributed vertically, so I think this should work. Quote Affinity Photo 2.5.3, Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel. Link to comment Share on other sites More sharing options...
KarinC Posted August 17 Share Posted August 17 Pasting the gradient style in the stroke is broken. Even though the gradient is showing in the swatches I only get one end of the gradient in the stroke and I can't adjust it when selecting the stroke in the appearance panel. If I expand the stroke then it works. Maybe you can do that. Select all of the strokes, choose layer>expand stroke then you can paste the gradient style to all of them. Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted August 17 Share Posted August 17 12 minutes ago, robac said: They don't, but perhaps this will help someone else! You can enforce that by using a helper rectangle object per line. Yes, I know still extra step but this can be automated by macros. Quote Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
NotMyFault Posted August 17 Share Posted August 17 5 minutes ago, h_d said: Distribute the individual lines as required: Unfortunately a found no way to distribute layers of unequal heights to a grid. All existing layer distribution are relative to layer height. so extra step is needed, e.g. adding a parent container rectangle of fixed size. Quote Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 iPad Air Gen 5 (2022) A2589 Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
h_d Posted August 17 Share Posted August 17 15 minutes ago, NotMyFault said: no way to distribute layers of unequal heights to a grid Ah yes, I see what you mean. Pity. Quote Affinity Photo 2.5.3, Affinity Designer 2.5.3, Affinity Publisher 2.5.3, Mac OSX 14.5, 2018 MacBook Pro 15" Intel. Link to comment Share on other sites More sharing options...
lepr Posted August 17 Share Posted August 17 1 hour ago, KarinC said: Pasting the gradient style in the stroke is broken. Thanks. That's what I meant because that's what the OP was trying to do. Quote Link to comment Share on other sites More sharing options...
KarinC Posted August 17 Share Posted August 17 1 hour ago, lepr said: Thanks. That's what I meant because that's what the OP was trying to do. Sorry, I was verifying it that it was happening for me. Expand to stroke is the best way around it. Just be sure to make a copy if you want to edit the lines. Quote Link to comment Share on other sites More sharing options...
lepr Posted August 17 Share Posted August 17 2 minutes ago, KarinC said: Sorry, I was verifying it that it was happening for me. No need to be sorry I think there has been a misunderstanding. I was genuinely thanking you for clarifying what I meant by broken functionality. KarinC 1 Quote Link to comment Share on other sites More sharing options...
KarinC Posted August 17 Share Posted August 17 10 minutes ago, lepr said: No need to be sorry I think there has been a misunderstanding. I was genuinely thanking you for clarifying what I meant by broken functionality. I understand. lepr 1 Quote Link to comment Share on other sites More sharing options...
robac Posted August 19 Author Share Posted August 19 Thanks all for trying to help. There are a few ideas I haven't tried yet and can attempt later this week/next weekend. I had been starting to play around with expand stroke but didn't get very far before the work week came around again. As a placeholder 'workaround', which definitely does not work if there are hundreds of lines, I managed to get the look I was after by setting my gradient on the *fill* rather than the stroke and creating a style of it, then applying that style to my lines (so it appeared as a fill under the ridges), then swapping the fill and stroke (to make the stroke take the gradient style), then applying a black fill. I had to do all 80 lines manually, which ended up only taking a few minutes, though I'd still rather have a one-and-done way of doing it for next time! Quote Link to comment Share on other sites More sharing options...
thomaso Posted August 19 Share Posted August 19 On 8/17/2024 at 6:37 PM, KarinC said: Paste as style is broken in v2? I use it all the time in v2. edit: Designer v2.4.2 Did it break in 2.5? This wasn't answered yet, right? – It might be faster to install an earlier app version than editing 80 objects individually, @robac. 41 minutes ago, robac said: then swapping the fill and stroke (to make the stroke take the gradient style), then applying a black fill. I had to do all 80 lines manually, which ended up only taking a few minutes, though I'd still rather have a one-and-done way of doing it for next time! If you have APhoto + if next time the "Paste Style" issue will not be fixed, possibly the "Links" Panel may be a workaround for less repeated settings of stroke & fill: Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
robac Posted August 19 Author Share Posted August 19 I don't have Photo, but seems worth me trying an older version of Designer when I get back into this project. I'm on 2.5.3. Quote Link to comment Share on other sites More sharing options...
pbasdf Posted August 19 Share Posted August 19 Might this work for your situation - leave the lines as black strokes, select them all and apply a Gradient Overlay FX? You can set the orientation to 90 degrees so the overlay is applied vertically. You can fine tune the FX on one line and then use Copy/Paste FX to apply it to all the others. There are a couple of downsides: 1. The "length" of the gradient is set relative to each particular object, so the "top" of a line will always be one end of the gradient and the "bottom" will be at the other end - even if the absolute height difference is much less than for the other lines. Even a perfectly horizontal line will have the top edge in one colour and the bottom edge the other (see pic). You might be able to finesse this with the scale and offset adjustments in the FX panel. 2. I believe using FX will result in rasterisation on export. Quote Link to comment Share on other sites More sharing options...
KarinC Posted August 19 Share Posted August 19 3 hours ago, thomaso said: This wasn't answered yet, right? – It might be faster to install an earlier app version than editing 80 objects individually, @robac. I confirmed that this one type of paste style is also broken in 2.4.2 Quote Link to comment Share on other sites More sharing options...
thomaso Posted August 19 Share Posted August 19 On 8/17/2024 at 6:37 PM, KarinC said: Paste as style is broken in v2? I use it all the time in v2. edit: Designer v2.4.2 2 minutes ago, KarinC said: I confirmed that this one type of paste style is also broken in 2.4.2 So your first quoted info was a mistake? – Or what do you mean by "this one type of paste style", – are there various 'types' of the menu command "Paste Style", or do you mean 'gradients' only while other stroke designs work? Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1 Link to comment Share on other sites More sharing options...
KarinC Posted August 19 Share Posted August 19 1 hour ago, thomaso said: So your first quoted info was a mistake? – Or what do you mean by "this one type of paste style", – are there various 'types' of the menu command "Paste Style", or do you mean 'gradients' only while other stroke designs work? No, my first quoted info wasn't a mistake. I use Copy, then paste as style all the time so I thought it was working. After I posted that I tried copy and paste a gradient stroke style to another stroke and it didn't work. I got one end of the gradient which was not adjustable. I posted that correction. All of the "paste style" works that I've tried except that one - pasting the gradient of a stroke. I found that if I expand the stroke you can paste the style to the expanded stroke. Strangely I found, but didn't post, that I could copy the gradient of the stroke, then paste as style to an expanded stroke and it put the gradient in as a fill which I didn't expect. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.