It is currently Mon Jul 01, 2024 10:00 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: SOLVED Wrong version of script running due to folder locn confusion
PostPosted: Tue May 19, 2020 5:13 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
[Edit: jump to the end on this one. What I thought was an interaction-error with a script "that used to work, a long time ago" was in fact a problem with my cavalier attitude about script "versions" and "locations." Your wish to run vN may be frustrated by GIMP's finding vN-1--where you told it too!--and running that instead. Thanks to the helpful folks of GimpChat who toil on in the pattern of those good ones who've gone before and ahead.]

Hi, everyone,

(Handshakes, back-claps, all around.)

I'm working on a project and need to fill an area with grayscale bumps which will resemble treetops from above when interpreted as a heightmap. [Incidentally recommendations for how to do trees in this way so that the result looks like a natural tree canopy; i.e., neighbors' tops blending naturally into each other also cordially sought... My approach will be to make a number of randomly filled layers with differently spaced brush, change the dynamic range on each, and stack them all over a black layer with modes "Lighten only", and then Copying those Visible layers into one which, finally, is "Addition"ed onto a heightmap representing mountains. Intending to advantage myself of "Groups", I poke all the layers into a Group (set to "Addition") but setting the constituent layers to "Normal".]

I have successfully used both Ofnut's (excellent) Fill Brush to Density plug-in and RobA's (excellent) Random Density Map script successfully in the past, as well as the former most recently in GIMP 2.10.

However when I've tried Rob's Random Density Map, using a new layer, and indicating a grayscale "density map" in the dialog while leaving the other _3_ visible options (#points, border margin, bailout threshold) at their defaults, running it with "OK" results in an error message:

"Error: not enough arguments"

Donning a welding helmet to bumble around inside Rob's Scheme magic, I blindly sense vibrations that there might be other option settings which are not appearing in the Tool dialogue, like "Jitter."

I confess to first trying this with both layers poked into a "Layer Group", but afterward tried it with both free to the open sky, with the same error.

I also confess to not trying it in GIMP 2.8 because... <too lazy>.

But I would appreciate to know if it really works in GIMP 2.10, and what troubleshooting recommendations I ought to be following.

Oh hail. O & R--which is not to say O && R. (gives Roman salute)
--
Gr'mp

P.S. ALSO appreciated are suggestions for B&W "tree" brushes of the heightmap type.

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Last edited by gramp on Thu May 21, 2020 9:59 am, edited 1 time in total.

Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Tue May 19, 2020 10:12 pm  (#2) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Hi gramp. I have version 2 and it work on GIMP 2.10.18. on the bottom of this reply I posted the version 2.


Attachments:
random_density_map.scm [5.81 KiB]
Downloaded 92 times

_________________
https://www.deviantart.com/pocholo17
Image
Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Wed May 20, 2020 6:03 am  (#3) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Thanks, Pocholo.

I forgot to mention that I'm using v2.1, which I'll attach for good measure.

I should have thought to attach a screen shot too, for comparison, and I'll remedy that as well.


Attachments:
RandomDensityMap_Error.png
RandomDensityMap_Error.png [ 18.52 KiB | Viewed 2152 times ]
RandomDensityMap_Dialog.png
RandomDensityMap_Dialog.png [ 73.37 KiB | Viewed 2152 times ]
RMA_random_density_map_v2.1.scm [6.11 KiB]
Downloaded 82 times

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."
Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Wed May 20, 2020 9:34 am  (#4) 
Offline
GimpChat Member

Joined: Jul 28, 2018
Posts: 1196
Hi gramp. I downloaded the version V2.1 that you uploaded and it gave me a complete dialog with all the options. There is something is wrong, with either your GIMP or OS, your dialog is different and missing a few options. The script works as it should, this what I get on my end:

Image

_________________
https://www.deviantart.com/pocholo17
Image


Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Wed May 20, 2020 9:48 am  (#5) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
gramp be very careful that you don't have two versions of the script as one will overwrite the other when they are loaded.

BUT as the v2.1 version is effectively a completely different procedure it will register in the menu at /Filters/Map/Random Density Map v2.1... it should be obvious which is which, so you need to check you've put the .scm file in the correct place.
Attachment:
Untitled.png
Untitled.png [ 88.48 KiB | Viewed 2118 times ]

Kevin


Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Wed May 20, 2020 7:10 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
paynekj wrote:
gramp be very careful that you don't have two versions of the script as one will overwrite the other when they are loaded.
Kevin


While it's true I don't know exactly which (of v1, v2, v2.1) version actually is in play when I call it (via Filters->Map->RandomDensityMap), I at least tried to "control" the election by setting the "execute" bit on only the one I wanted. And I did try all three that way.

However now I'll "sequester" the versions outside the ".gimp-2.10/scripts/" folder before trying again to assure that only one CAN be chosen.

Thank you for the admonition.
--
David

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Wed May 20, 2020 7:17 pm  (#7) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Pocholo wrote:
Hi gramp. I downloaded the version V2.1 that you uploaded and it gave me a complete dialog with all the options. There is something is wrong, with either your GIMP or OS, your dialog is different and missing a few options. The script works as it should...


Pocholo, Thank You for subjecting yourself to a completely unproductive exercise to demonstrate this for me!

I have NO idea how either GIMP, or my OS, could have torqued itself into such a state; I fire up GIMP from the command-line and don't see much in the way of complaint when it loads (aside from the complaints that certain 2.x filter conventions spell doom for those filters in 3.x), and nothing helpful when RandomDensityMap fails.

I suppose the prognosis is to un/re install GIMP 2.10 in my current OS, Ubuntu 18.04 LTS.
--
David

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Thu May 21, 2020 7:03 am  (#8) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
Quote:
..I have NO idea how either GIMP, or my OS, could have torqued itself into such a state; I fire up GIMP from the command-line and don't see much in the way of complaint when it loads (aside from the complaints that certain 2.x filter conventions spell doom for those filters in 3.x), and nothing helpful when RandomDensityMap fails.

I suppose the prognosis is to un/re install GIMP 2.10 in my current OS, Ubuntu 18.04 LTS.


There is even less reason to re-install Gimp in linux than there is in Windows. Rarely does any good.

You are using random_density_map.scm version 1 - (any one interested can get it from here: viewtopic.php?f=11&t=530&start=10)

...but the filter you posted is version 2.1 Difference is easily seen in the dialog. Both versions can be installed, they both register individually in /Filters/Map

Attachment:
compare.jpg
compare.jpg [ 58.58 KiB | Viewed 2056 times ]


Using Gimp 2.10.14 / (k)ubuntu 18.04: A try out of version 1 does fail part way through. As far as I can tell it is the random location section. It does work with Gimp 2.8 Maybe it can be fixed by one of the clever guys but better to use the later version.

Back to your linux installation. Why the (on alfred) designation? Are you using a networked Gimp ?

However: Linux is provided with a search function. In a terminal try

find / -type f -iname "*random_density_map*.*"


Which (hopefully) will find the file(s) in your home folder. You might need to expand the search, this for example is my home + a data partition.

Attachment:
find.jpg
find.jpg [ 71.81 KiB | Viewed 2056 times ]


best of luck.

_________________
Image


Top
 Post subject: Re: Random Density Map script (RobA), in GIMP 2.10 (wrong #args?)
PostPosted: Thu May 21, 2020 9:53 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: Apr 20, 2011
Posts: 287
Location: Dane-ish Co., West Gonsin
Rich,

Thanks for identifying the version as 1.0.

@paynekj was dead-on in his suspicions that I had multiple copies of scripts. But I already knew that, I foolishly thought: I'm looking right at them.

Actually, I was looking at part of them--the IRRELEVANT ones! The ones that GIMP ACTUALLY registered at startup were in completely different directories/folders! (which I finally identified in Edit->Preferences->Folders->Scripts as:
~/.config/GIMP/2.10/scripts/ # individual user's
/usr/share/gimp/2.0/scripts/ # all-users'

Missing was the one I had lazily assumed was going to be identical to the 2.8 approach, and CREATED:
~/.gimp-2.10/scripts/

The upshot was that ANYTHING I did in the lattermost folder was ignored. And how long have I been running 2.10 under the mistaken impression that ~/.gimp-2.10/scripts/ mattered?

Hold a second, I only checked this AFTER reinstalling GIMP 2.10, which as you predicted didn't fix anything. I think it's probable that I had added MY lazy-made custom config directory to that list. That being likely, Kevin's warning about multiple scripts was still in play. Although I kept attempting to ISOLATE the v2.1 script to be the one found, several versions of Random Density Map were still being found in
~/.config/GIMP/2.10/scripts/
(NONE of which had an execute bit set btw, further nullifying one of my other assumptions) and v1 was front-and-center there, and being loaded.

Having re-arranged things (and I'll still probably replace ~/.gimp-2.10/ with a link to ~/.config/GIMP/2.10/) the v2.1 script (now the only one in ~/.config/GIMP/2.10/scripts/) upon Filters->Map->Random Density Map. (Hovering over that would prob. have shown me I was constantly launching v1, but who's got time to read, amirite? :^( )

Thank you all. I'll fix my subject title too.
--
GraMP

_________________
--
GraMP
"Once you sit on your glasses, the rest of getting old seems obvious."


Top
 Post subject: Re: SOLVED Wrong version of script running due to folder locn confusio
PostPosted: Thu May 21, 2020 11:23 am  (#10) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2436
Pleased you found the problem.

While the last time I had to program anything in anger, it was as a student and used punched card and line printers ;)

However a "maybe fix" of the original version 1 script for Gimp 2.10 Who knows, some one might prefer the 'number-of-points' rather than 'density' This with a clipboard-brush

Attachment:
script.jpg
script.jpg [ 154.38 KiB | Viewed 2025 times ]


No idea what the margin parameter does. Other than zero gives an error.

It is worth looking at the background for the script: https://www.cartographersguild.com/show ... php?t=2443


Attachments:
random_density_map_v1-for-2-10.zip [2.21 KiB]
Downloaded 71 times

_________________
Image
Top
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Error when running Set Colormap script

1

No new posts Attachment(s) Gimp Lambda Lib version 1.0.0 for Script-Fu

12

No new posts What am I doing wrong? [Solved]

3

No new posts Text Wrapping Wrong

7

No new posts Attachment(s) Wrong Print Size

3



* Login  



Powered by phpBB3 © phpBB Group