Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ofn-brush-strokes-on-path
#21
See ofn-reorder-copy-layers on your favorite repo... Basically you set the chainlink on all layers you want to move/copy, then make the target layer active, and use Image ➤ Copy linked layers or Image ➤ Reorder linked layers to copy/move the layer above your target layer.
Reply
#22
Excellent thank you Ofnuts.
Reply
#23
Hi Ofnuts,

Thanks again for this great script Smile

Just noticed something I thought I'd mention.  I was making the word Gimp with a brush that has a flower image.  Wanting to dot the i my path had a short stroke. When running the script I got a GIMP Message that said:

Brush strokes on path Message
float division by zero

I was using settings:

Strokes 0
Spacing (px) 32

My brush is 40x38 pixels.

I think it's actualCountAndSpacing where intervals is set to 0 on an open path.

I made the path's stroke a bit longer to fit two flowers and it works fine and as I was making an animation I deleted one of the layers.  (I put the result in the text effects thread on gimp chat).
Reply
#24
(05-06-2021, 02:17 AM)teapot Wrote: Hi Ofnuts,

Thanks again for this great script Smile

Just noticed something I thought I'd mention.  I was making the word Gimp with a brush that has a flower image.  Wanting to dot the i my path had a short stroke. When running the script I got a GIMP Message that said:

Brush strokes on path Message
float division by zero

I was using settings:

Strokes 0
Spacing (px) 32

My brush is 40x38 pixels.

I think it's actualCountAndSpacing where intervals is set to 0 on an open path.

I made the path's stroke a bit longer to fit two flowers and it works fine and as I was making an animation I deleted one of the layers.  (I put the result in the text effects thread on gimp chat).

For what I have seen, It's not a matter of open path but  a matter of having a stroke much smaller than the requested spacing. Fixed and uploaded all the same. Thx for the report.
Reply
#25
When I read teapot's comment, shortly after he posted it, I noticed the same thing he reported. But fortunately he himself found a very practical solution; after increasing the stroke to avoid the plug-in error, remove a layer after the plug-in had run.

After this update, repeating only one tiny stroke for the dot on the letter i. there was no problem this time, no error message.

Thx teapot and Ofnuts!
Reply
#26
Thank you Ofnuts, it works fine now.

   
Reply
#27
On second thoughts, would it be better to return a count of 1?

   
Reply
#28
(05-08-2021, 03:12 PM)teapot Wrote: On second thoughts, would it be better to return a count of 1?

Agreed. Fixed and uploaded. Wondering what to do for short strokes. Currently I put the brush stroke at the origin of the stroke, but perhaps a better behavior would be the mid point between beginning and end, or perhaps even the centroid of the stroke anchors. I would also need a workable rule for the brush orientation.
Reply
#29
(05-08-2021, 05:09 PM)Ofnuts Wrote: Agreed. Fixed and uploaded. Wondering what to do for short strokes. Currently I put the brush stroke at the origin of the stroke, but perhaps a better behavior would be the mid point between beginning and end, or perhaps even the centroid of the stroke anchors. I would also need a workable rule for the brush orientation.

I had not noticed these effects on the naming of the layers; 1-2, 2-2, 3-2, 4-2 before.
It really got better now; 1-4, 2-4, 3-4, and 4-4.

It took me a while to understand how to choose values
for Strokes or Spacing (px) depending on the brush and path used. (the brush stroke at the origin of the stroke?).
But now that I am familiar with it, it seems quite satisfactory.
Reply
#30
(05-08-2021, 06:32 PM)Krikor Wrote: It took me a while to understand how to choose values
for Strokes or Spacing (px) depending on the brush and path used. (the brush stroke at the origin of the stroke?).
But now that I am familiar with it, it seems quite satisfactory.

Depends what you want to do (what is called the "use case" in software development jargon). If you want to create dial marks, you likely want a known number of these. If you create rivets on the skin of an airplane, you likely know an approximate spacing and the script's main purpose is to compute the exact spacing required to have regularly space rivets.
Reply


Forum Jump: