Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Arrow Script
#31
I have altered the defaults for the length of the arrow wings and the brush thickness - not to the settings that Rich2005 had but it's easy to change them as per Rich's first post in this thread.

The main changes are replacing calls of deprecated functions and changing the script registration so that now, whlst it still runs in GIMP V2.10.24, it also registers correctly and appears in the menu of GIMP V2.99.6. HOWEVER, there is a bug in GIMP V2.99.6 that causes the script to fail and report that GimpObjectArray is an unknown return type. Once this is fixed in GIMP the same version of the script should run in both V2.10.x and V2.99.x/V3 - it's a pity that the same won't apply to Python scripts where different versions are needed.

The link to the updated version of the script is:

http://programmer97.byethost10.com/GIMP.html
Reply
#32
Are you sure that all is correct. The brush thickness BT values seem to me to be reversed in the new script.

   
Reply
#33
(05-07-2021, 06:00 PM)rich2005 Wrote: Are you sure that all is correct. The brush thickness BT values seem to me to be reversed in the new script.

Yes, I'm sure it is correct - the effect that you are seeing is what I would expect.

Considering the brush thickness setting - you have it set so that the brush thickness type is the length of the path divided by the brush thickness (BT) value - so the larger the BT value the thinner the arrow shaft - which is what your screen shot shows.

If the brush thickness type is set to "BT Pixels" then the opposite effect would be seen - the larger the brush thickness setting the thicker the shaft of the arrows.

Similarly for the length of the wings.

The default settings (perhaps with the "Length of wings (LoW)" and "Brush thickness (BT)" fields edited to your liking) would give arrows where the length of the wings and thickness of the shaft are proportional to the length of the path.

If you want default settings that give all arrows with the same thickness of shaft and the same length of wings then you need to do three things (if you only want the occasional arrow using absolute pixel values then don't bother doing this just set the type fields from the default settings to pixel settings when running the script):

1. Set the "Length of wings (LoW)" and "Brush thickness (BT)" fields to the required length and thickness respectively in pixels

2. Swap the order of the options in the SF-OPTION controls so that the pixels value settings come first

3. Swap the values assigned to FACTOR_RELATIVE_TO_PATH_LENGTH and FACTOR_IN_ABSOLUTE_PIXELS (so that these are 1 and 0 respectively, rather than 0 and 1 as they are in the script as posted)

Hope this helps.
Reply
#34
(05-07-2021, 09:51 PM)programmer_ceds Wrote: The default settings (perhaps with the "Length of wings (LoW)" and "Brush thickness (BT)" fields edited to your liking) would give arrows where the length of the wings and thickness of the shaft are proportional to the length of the path.

If you want default settings that give all arrows with the same thickness of shaft and the same length of wings then you need to do three things (if you only want the occasional arrow using absolute pixel values then don't bother doing this just set the type fields from the default settings to pixel settings when running the script):

1. Set the "Length of wings (LoW)" and "Brush thickness (BT)" fields to the required length and thickness respectively in pixels

2. Swap the order of the options in the SF-OPTION controls so that the pixels value settings come first

3. Swap the values assigned to FACTOR_RELATIVE_TO_PATH_LENGTH and FACTOR_IN_ABSOLUTE_PIXELS (so that these are 1 and 0 respectively, rather than 0 and 1 as they are in the script as posted)

Hope this helps.

In practice I noticed no difference in terms of results if I adjust the same settings in both versions of this script.

But it seems that with this update improvements have been made for future versions of the Gimp, and this is always welcome.

However, I liked better the results with the settings created by rich2005 and taught in post #1.

I also made the suggested changes between quotas, leaving the script pretty much as it was before (same defaults).

It is working great!

Thanks for the improvements!

P.S: In the PDF accompanying the script documentation the date of the last update appears to be on 01/15/2018.
Reply
#35
(05-07-2021, 09:51 PM)programmer_ceds Wrote:
(05-07-2021, 06:00 PM)rich2005 Wrote: Are you sure that all is correct. The brush thickness BT values seem to me to be reversed in the new script.

Yes, I'm sure it is correct - the effect that you are seeing is what I would expect.
.....snip....
Hope this helps.

Not really, devils advocate, a regular user drawing a line with size 10 brush and then a size 50 brush does not expect the 50 brush line smaller than the 10 brush line.

If the script is correct then maybe the term BT should be changed to something else, maybe line ratio or something.
Reply
#36
(05-08-2021, 01:10 AM)Krikor Wrote: P.S: In the PDF accompanying the script documentation the date of the last update appears to be on 01/15/2018.

The date at the end of the PDF file is the date when the PDF file itself was updated - the changes to arrow.scm are noted, with the dates they were made, in the .scm file.

I will make the following changes to the PDF file and then upload a new version:

1. Make clear thet the date at the end of the file is the PDF update date.

2. Update the website address for the script

3. Include instructions on editing the default settings

4. Try to make clearer the way in which the ratio-metric settings work


(05-08-2021, 07:22 AM)rich2005 Wrote: Not really, devils advocate, a regular user drawing a line with size 10 brush and then a size 50 brush does not expect the 50 brush line smaller than the 10 brush line.

If the script is correct then maybe the term BT should be changed to something else, maybe line ratio or something.

To specify wing lengths and brush thicknesses that are proportionate to the length of the path involves multiplying the length of the path by something smaller than 1 and multiplying by something smaller than 1 is better expressed as dividing by something larger than 1. It also avoids having to enter values with many digits after the decimal point.

You say maybe refer to line ratio but "Path length divided by BT value" is a ratio. I'm happy to change the wording if you can suggest anything more suitable or easier to understand.
Reply
#37
(05-08-2021, 09:38 AM)programmer_ceds Wrote: You say maybe refer to line ratio but "Path length divided by BT value" is a ratio. I'm happy to change the wording if you can suggest anything more suitable or easier to understand.

Oh, just leave it as it is. A new user will come along and wonder why brush thickness (BT) does not equal the arrow line thickness.
Reply
#38
(05-08-2021, 09:52 AM)rich2005 Wrote: Oh, just leave it as it is. A new user will come along and wonder why brush thickness (BT) does not equal the arrow line thickness.

Only if they don't read the settings of the Length of wings type and Brush thickness type controls.

Perhaps it would be better if I changed the script so that by default the absolute pixel settings rather than the proportional settings are used? What do you reckon?
Reply
#39
(05-08-2021, 10:07 AM)programmer_ceds Wrote: Only if they don't read the settings of the Length of wings type and Brush thickness type controls.

You have been around Gimp as long as me. Since when did "new-Gimp-user" ever read anything in the dialogue or attached notes. Unfortunately, it is usually click-and-wish

Quote:Perhaps it would be better if I changed the script so that by default the absolute pixel settings rather than the proportional settings are used? What do you reckon?

Well, some sort of clarification (edit: BT larger value = thinner line), your script, I leave it up you Wink

edit: or change default dialogue Brush Thickness type to BT pixels. That is less ambiguous. oh, not what expected.
Reply
#40
Quote:You have been around Gimp as long as me. Since when did "new-Gimp-user" ever read anything in the dialogue or attached notes. Unfortunately, it is usually click-and-wish

I have changed the default mode to use absolute pixel settings for both the wing length and the brush thickness on the basis that it is probably easier for people to understand - more intuitive? As you say few people read the manual except as a very last resort (of course we always read the manual first! - and if you believe that...)

I have updated the documentation pdf file to include a section on how to alter the default settings and to try to explain how the proportional mode works.

Link to the updated file:

http://programmer97.byethost10.com/Files/arrow.zip

(Rewriting the script in Python for GIMP V2.99.x would make it easy for the script to store the settings from session to session and thereby avoid the user having to edit the script - the problem is that V2.99.x isn't ready for serious use - most of my other Script-fu scripts fail with the GimpObjectArray unknown error)
Reply


Forum Jump: