Easy way to apply LPEs to multiple paths?

Post questions on how to use or achieve an effect in Inkscape.
TheGrudge
Posts: 5
Joined: Tue Oct 04, 2016 4:04 pm

Easy way to apply LPEs to multiple paths?

Postby TheGrudge » Tue Oct 04, 2016 4:17 pm

Hi,

I have custom "brushes" in Inkscape that I use for drawing paths.
I mostly apply them with the LPE "Pattern along path".

The problem is that I am unable to copy the LPE to other paths. When I select the path I want to copy from and hit CTRL+C, select the other paths and hit CTRL+7 (Paste Path Effect), it does not actually copy the LPE, it seems to just link it. So when I change the LPE settings in one of the paths, all other paths change too.

Is there a way to avoid this?
I try to mimic the behavior of Illustrator where you can apply a brush to a path, as seen in the following tutorial:
https://www.youtube.com/watch?v=xypjqvImEGw

Unfortunately I'm also not able to add a LPE to multiple paths at once so that I could copy the path via the "Copy Path" feature in the LPE editor dialog.
As soon as I select more than one path, the LPE editor is disabled.

Am I missing something here or is not not possible to COPY LPEs instead of just linking them?

Andi

User avatar
druban
Posts: 1917
Joined: Fri Nov 20, 2009 10:48 pm

Re: Easy way to apply LPEs to multiple paths?

Postby druban » Tue Oct 04, 2016 5:56 pm

to mimic the behavior of Illustrator where you can apply a brush to a path


Path menu>object to path,
no longer LPE afterwards. Free and unlinked.
Your mind is what you think it is.

TheGrudge
Posts: 5
Joined: Tue Oct 04, 2016 4:04 pm

Re: Easy way to apply LPEs to multiple paths?

Postby TheGrudge » Tue Oct 04, 2016 7:38 pm

Hi,

but then I'm not able to manipulate the LPE anymore.
I want to keep the LPE so that I can change it if needed (for example change the width).
But currently the LPE is linked instead of copied.

I guess it is not possible, I tried it for the last 3 weeks and I can't find a (fast) way to apply LPEs zu my paths.

My best approach seems to be like this for now:
  • Create paths with the pen tool and set it to "Ellipse" shape
  • Copy the "brush" to the clipboard and select the appropriate path, "Paste Path" from the LPE editor window
  • Repeat until all appropriate paths habe the brush applied
  • Copy another brush to the clipboard and select the appropriate path, "Paste Path" from the LPE editor window
  • Repeat until all appropriate paths have their brush applied
  • Now the width for each LPE can be changed separately
  • When everything is fine, select all, covert object to path and unite all paths

Still it would be really nice to habe an option to copy an LPE to multiple paths (without the link to the original LPE), so that changes can be made individually.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Easy way to apply LPEs to multiple paths?

Postby Lazur » Tue Oct 04, 2016 9:16 pm

Hi.

So you can paste the path effect, but would rather unlink it from the original lpe?

If you copy&paste the original path with the lpe and copy that second one's lpe it will be unlinked.

So it goes something like select the original object, Ctrl+C, Ctrl+Alt+V, Ctrl+X, then
select the new path and Ctrl+7.

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Easy way to apply LPEs to multiple paths?

Postby hulf2012 » Wed Oct 05, 2016 1:47 am

Hello

This is an interesting post, which I feel I've pass for that situation. I can't explain better than the original poster. But so far I don't find the solution neither.

Druban, thank You but I also think that your idea it's not the solution.

Lazur, I don't understand Your solution. I'll try to explain better.
1- Let's say that you have the Pattern along path applied to one path let's call "original path". Your pattern is a "pattern path"
2.-You also have a "2nd path" and a "3rd path"
3.- You do a Ctrl+ C to the "original path".
4.- You select "2nd path" and "3rd path" together
5.- You hit Ctrl + 7.
6.- Result: If you change the width on the LPE panel of any of those paths, all the paths change their width.
Isn't any other way?
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

Lazur
Posts: 4717
Joined: Tue Jun 14, 2016 10:38 am

Re: Easy way to apply LPEs to multiple paths?

Postby Lazur » Wed Oct 05, 2016 2:24 am

Let's say it is the sketch lpe instead of the pattern along path lpe for the example.

Oh no, that doesn't seem to be linked after pasting...*



So that's a pattern along path lpe.


You have a path for the core (A) and a pattern along path lpe applied (a) with the pattern path (P),
and you want to achieve another pattern along path lpe (b) on another path (B) with the same pattern path (P).

  • select A
  • press Ctrl+C
  • press Ctrl+Alt+V -resulting in another path (A') with pattern along path lpe (b) applied on
  • press Ctrl+X -copies (b) onto clipboard and gets rid of (A')
  • select B
  • press Ctrl+7



*In my humble opinion the linked behave is more beneficial and would be nice if that was the default with the sketch lpe. But at least the behave would be more consistent.



Edit: there seems to be a bug with this one, sometimes even duplicating the path (A) with (a)&(P) results in (A') and (b)&(P).

hulf2012
Posts: 716
Joined: Sat Nov 24, 2012 12:37 pm

Re: Easy way to apply LPEs to multiple paths?

Postby hulf2012 » Wed Oct 05, 2016 3:05 am

Thank You Lazur

But
When do You want to apply the "b" to several paths selected at the same time, all of them will have linked their width. On the other maybe it could work for the original poster.

In my opinion, an extension could solve the problem, just adding SVG, XML code. It will be the solution for only this kind of Path and no other (No Sketch Path Effect or similar).

If some one is interested the way I see it could work is:
1.- First step is applying the Pattern along Path to all the paths required, using the same pattern path (or "brush"). In the usual way (ctrl + 7)
2.- Select those paths
3.- Run the extension
4.- The extension finds in the first path of the group, the ID of that path
5.- Based on that ID look in the <defs> tag which kind of LPE is (is that possible?)
6.- If the LPE is Pattern along path it continues
7.- Based on the id, copies in memory all the data related to that specific Pattern Along Path
8.- Based on the number of paths selected, it makes a copy of the specific Pattern Along Path, but changing the ID each time
9.- Then to each selected path, modifies the link to the LPE def, with the new ones created.

- It will generate a lot more of SVG code.
- I don't know if it will create memory issues or other bugs :!:
- Hope some other could do :oops: . I'm not good making extensions
If you have problems:
1.- Post a sample (or samples) of your file please.
2.- Please check here:
http://tavmjong.free.fr/INKSCAPE/MANUAL/html/index.html
3.- If you manage to solve your problem, please post here your solution.

zhart
Posts: 3
Joined: Mon Nov 07, 2016 7:34 pm

Re: Easy way to apply LPEs to multiple paths?

Postby zhart » Thu Apr 13, 2017 12:33 am

I have the same problem with "Taper stroke" LPE.
It's too time-consuming to apply LPE for each individual path (especially when every time you need to change default settinsg of particular LPE).
This solution is work:
Lazur wrote:So it goes something like select the original object, Ctrl+C, Ctrl+Alt+V, Ctrl+X, then
select the new path and Ctrl+7.

I can even improve it. You can get rid of unnecessary action if you replace two first shortcuts with just Ctrl+D (duplicate object). But it's still a crutch solution. It will be better if user can simultaneously apply some independent copies of LPE to several strokes. I think, it can be done by creating extension, but who can create it? Unfortunately, my skills do not allow it to be done.

jabiertxof
Posts: 184
Joined: Wed Feb 06, 2013 6:47 am

Re: Easy way to apply LPEs to multiple paths?

Postby jabiertxof » Thu Apr 13, 2017 1:54 am

Hi all the way to do is a option that fork all the LPES applyed on a path and relink the path to them.
Is the only way to do, or editing the XML at hand :)
I have plans to add options to 0.93 to 2 items:
"Paste path effect" and "Paste cloned path effect"
I try this weekend to make a fast extension for 0.92.


zhart
Posts: 3
Joined: Mon Nov 07, 2016 7:34 pm

Re: Easy way to apply LPEs to multiple paths?

Postby zhart » Thu Apr 13, 2017 5:29 am

jabiertxof, thank you.
It works great. I'm already assign a shortcut to this extension, and now my work is much faster and more pleasant.
Just in case, I post here a link to a page from Launchpad with our discussion:
https://bugs.launchpad.net/inkscape/+bug/1682039

Raspi
Posts: 229
Joined: Fri Oct 21, 2016 12:51 am

Re: Easy way to apply LPEs to multiple paths?

Postby Raspi » Thu Apr 13, 2017 6:22 am

Nice to see some love for Jason Secrest youtube channel !
As TheGrudge, i have tried to ink a drawing Jason supplied, to check how well it works with Inkscape.

Especially for this kind of artwork the Pap LPE could use some improvements.

For example, every time you apply the pattern to a new path, you have to re-select the "Pattern Copies" options in the drop down menu.
It would be nice if Inkscape remembered the last selected options, instead of "resetting" every time.

Also the ringer of the Width reacts very slowly and only in increments of 0,01.
It would be nice if the ringer speeds up, the longer you click it.

When it comes to the pattern, you really dont need increments of 0,01, because the pattern is already =1.
An additional dropdown menu with values like 3/4, 1/2, 1/4, 1/8 would be a much better option.

Also it would be nice to make the copying of the pattern a one-click option.
Would it be possible to apply some sort of tag to your inking patterns, so that everytime you click it, it gets copied to the clipboard ?

zhart
Posts: 3
Joined: Mon Nov 07, 2016 7:34 pm

Re: Easy way to apply LPEs to multiple paths?

Postby zhart » Thu Apr 13, 2017 6:29 am

Raspi wrote:It would be nice if Inkscape remembered the last selected options, instead of "resetting" every time

Here is another discussion on Launchpad (on this topic):
https://bugs.launchpad.net/inkscape/+bug/1682033


Return to “Help with using Inkscape”