It is currently 21 Jan 2021, 10:46

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Apply and Save/Load Preset Script for Layer Effects (Experimental)

Share your Python Fu Scripts/plug-ins for GIMP here
Krikor
Forum Member

Re: Apply and Save/Load Preset Script for Layer Effects (Experimental)

Post#41 by Krikor » 04 Jan 2021, 16:37


Hi Tim,

I always said and I say it again; "I love this feature on Gimp Learn": • Featuring Members' Images • :2_Thumbs:

Dionísio's image caught my attention when I looked at the images available in • Featuring Members' Images •, and so I ended up here.

I didn't remember this plugin or this topic anymore, so I had to reread it. I discovered that about 2 years ago it was impossible for me to use the plugin due to bugs. So I decided to try again, this time with a much more solid version of Gimp (less unstable).

Everything was going well.
I was able to create and load presets.
I managed to reproduce Dionísio's candle presets without any problem. :happy_purple:

It was then that when trying to reproduce the Nidhogg presets - RoboComp - available at https://www.gimplearn.net/viewtopic.php ... 551#p22551, the problems started. :fb_wow:

=========================================================================================================

Traceback (most recent call last):
File "C: \ Users \ ... \ lib \ gimp \ 2.0 \ python / gimpfu.py", line 741, in response
dialog.res = run_script (params)

File "C: \ Users \ ... \ lib \ gimp \ 2.0 \ python / gimpfu.py", line 362, in run_script
return apply (function, params)

File "C: \ Users \ ... \ layerfx_presets.py", line 1309, in python_tt_all_load
exec ("pdb.python_layerfx_outer_glow" + ogpresetvalues ​​)

File "<string>", line 1, in <module>
TypeError: unable to parse color string

======================================================================================================
I initially tested using the 'Load Preset Apply All' option

It seems that the problem would be associated with the use of the gradient with the Outer_glow option. (Just my guess)

► outer_glow.txt: RoboComp | (image, layer, 'FG to Transparent', 70.0, 0, 20.0, 23, 12.0, 8.0, False, False)

To confirm, I loaded each preset individually, and with the exception of the Outer_Glow preset, everyone could be played without problems.

I then decided to check the same preset with a small change:

From this:
►RoboComp | (image, layer, 'FG to Transparent', 70.0, 0, 20.0, 23, 12.0, 8.0, False, False)

For this:
► RoboComp002 | (image, layer, (206,40,40), 70.0, 0, 20.0, 23, 12.0, 8.0, False, False)

But it was only as far as I could keep testing the plugin. :fb_angry:

After the error appears:

\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\////////////////////////////////////////////////////
GIMP Error
Crashed plug-in: "layerfx_presets.py"
(C: \ Users \ ... \ layerfx_presets.py)

The dying plug-in may have messed up GIMP's internal state. You may want to save your images and restart GIMP to be on the safe side.
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\//////////////////////////////////////////////////////

I couldn't use the plugin anymore. I restarted Gimp once and nothing. :gaah:

It reminded me of what I had already reported in posts #23 and #24 two years ago. This time I didn't insist so much, I didn't restart the gimp again or reinstall the plugin again, nor restart Windows.

I don't know what is triggering this crash. But this is not normal.

Would it be possible to find out why this crash and make an updated version available?

Thank you very much in advance!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

tim
GL Blogger

Post#42 by tim » 04 Jan 2021, 17:29


Not sure why you're getting errors but it seems it's related to the layerfx.py version you have.
Did you get it from the archive (layerfx.py). I never know which layerfx works for which plug-in. But this plug-in's first post has a reference to layerfx.py so try to use that one and see if problem goes away.
aka Tin

         

Krikor
Forum Member

Post#43 by Krikor » 04 Jan 2021, 18:21


I used the version provided in the attachment to the first post (#1) - layerfx_presets (10) _and_altered_layerfx.zip. This attachment contains the layerfx_presets.py + layerfx.py plugins.

Ok I'll try using another version of layerfx.py and return with the results obtained.

Thanks Tim for returning!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

Krikor
Forum Member

Post#44 by Krikor » 04 Jan 2021, 18:41


tim wrote:
04 Jan 2021, 17:29
Not sure why you're getting errors but it seems it's related to the layerfx.py version you have.
Did you get it from the archive (layerfx.py). I never know which layerfx works for which plug-in. But this plug-in's first post has a reference to layerfx.py so try to use that one and see if problem goes away.
It didn't work.

I removed the layerfx.py plugin obtained in the .zip of post #1 (temporarily changed the plugin name - layerfx.bkppy)

I have another version of layerfx (see image).
LayerFXPresetMenuOff.png
Krikor - layerfx_preset menu off
LayerFXPresetMenuOff.png # (19.06 KiB) Viewed 793 times (Thumbnail | Recognize)
Now the layerfx_prest.py menus no longer display the options for saving or loading. The menu is simple.

It seems that the version contained in the attachment of post # 1 is necessary for the layerfx_preset to work
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

rich2005
GIMP Guru

Post#45 by rich2005 » 04 Jan 2021, 19:12


It looks to me that you still have duplicate versions of LayerFX maybe a layerfx.scm somewhere or yet another version of layerfx.py (edit. might be the way you re-named that old version try something like layerfx.py.bak instead)

The one you want is the most recent 'fix' LayerFX-2.10.py which together with layerfx_presets.py gives this.
01-layerfx-latest.jpg
01-layerfx-latest.jpg # (106.15 KiB) Viewed 788 times (Thumbnail | Recognize)
..and if you want just the regular menu, then a right click in the layers dock
02-layerfx.jpg
02-layerfx.jpg # (102.1 KiB) Viewed 788 times (Thumbnail | Recognize)
Just to confirm, although this is linux the only layerfx plugin installed is LayerFX-2.10.py which came from the gimpscripts.net collection.

Krikor
Forum Member

Post#46 by Krikor » 04 Jan 2021, 20:18


Hi rich2005,

On the possibility of duplicity:
I checked all the paths where there could be scripts and plugins being read by gimp. Edit - Preferences - Folders (plug-ins and Scripts)
I wrote them down.
... Preferences / Plug-ins
... lib / gimp / 2.0 / Plug-ins
... Preferences / old-plug-ins
... personal folder / Plugins

... Preferences / scripts
... share / gimp / 2.0 / scripts
... personal folder / scripts

I checked them all and found a .scm in my personal folder - Layer-FX-2.10 .scm

But there was no duplication (not at the moment), because when I removed the layerfx.py that was made available in the .zip file of post #1, only this Layer-FX-2.10 .scm and layerfx_presets were installed.

**In the beginning, when I installed the .zip from post #1 it actually ended up duplicating - although the plugin worked for several uses before crash)
Okay, I removed the .scm version.
I downloaded the py version at https://www.gimpscripts.net/search?q=layerfx.py

Now there is only this version downloaded from gimpscripts.net and the layerfx_presets version downloaded in post #1 (layerfx_presets (10) _and_altered_layerfx)

But now, in addition to the menu continuing to appear without the options for saving and loading presets, there is also no Layer-fx-2.10.py 9 plugin as it appeared before - see image in post # 44)
LayerFXPresetMenuOff002.png
Krikor - layerfx_preset off 002
LayerFXPresetMenuOff002.png # (20.3 KiB) Viewed 781 times (Thumbnail | Recognize)
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

rich2005
GIMP Guru

Post#47 by rich2005 » 05 Jan 2021, 10:35


I still advise a review of what and where you have everything installed. If happy that you just have LayerFX-2.10.py and layerfx_presets.py then just a suggestion, delete the pluginrc file in case any old settings are still in force.

A not so quick, four-and-a-half minutes demo. https://youtu.be/jexKHAM-atk

Krikor
Forum Member

Post#48 by Krikor » 05 Jan 2021, 13:48


Okay, I rechecked for duplicates.

Again I looked in all the folders indicated by Gimp in 'Edit - Preferences - Folders (plug-ins and Scripts)' - No duplicates.

I used the windows search to check for "layerfx", "layer_fx" and layer-fx "in folders and subfolders:
► C: \ Users \ ... \ Gimp-2.10.21_Portable-32-64bit-Win \ Gimp-2.10.21_Portable-32-64bit-Win
► C: \ Users \ ... \ ActiveScripts (where I have a folder for plugins and another for scripts)

No duplicates.

I ran the kp24 script to look for duplicates between the installed scripts:
================================================== =====
Test For Duplicate Scripts v1.8 Warning
Found 126 script files to check against

Test For Duplicate Scripts v1.8 Warning
There are 191 scripts to check

Test For Duplicate Scripts v1.8 Warning
Log file: C: \ Users \ ... \ Gimp-2.10.21_Portable-32-64bit-Win \ Gimp-2.10.21_Portable-32-64bit-Win \ Preferences \ .. \ duplicate_scripts.txt

Test For Duplicate Scripts v1.8 Warning
Finished. Found 0 duplicates in 191 scripts
================================================== =====

Search for duplicates without positive results.

2nd part:

I removed the LayerFX-2.10.py and layerfx_presets.py files from the plug-in installation folder.

I deleted the pluginrc file.

I restarted Gimp and checked the lack of layerfx in the expected locations.
I closed Gimp and reset only the LayerFX-2.10.py plugin in the plugin installation folder (I use the personal folder). I restarted Gimp and checked that the layerfx2.10 plugin was in the expected menus - OK

I closed Gimp and this time I replaced the layerfx_presets.py plug-in in the same folder where layerfx2.10.py was. (same personal folder). I restarted Gimp ... without change. :fb_sad:

The layerfx_presets menus (save and load presets) still do not appear. Only the simple menus of layerfx-2.10.py.

I closed Gimp, changed the plug-ins folder, from the personal folder (where I use my installed scripts / plug-ins) to the C: \ Users \ ... \ Gimp-2.10.21_Portable-32-64bit-Win \ Preferences \ plug-ins.
I restarted the gimp ... without change.

The strange thing is that at the beginning, I only had layerfx.scm, and when I installed the plugins available in the .ZIP of post #1, everything worked fine for some time.
I was able to run the layerfx_presets plugin by saving and loading presets and tested some made available by other users. Until there was a crash
. :?:

Even though I tried to reproduce this scenario - using these 3 initial filters, nothing changes, the menus of layerfx_presets insist on not wanting to appear.

Was there any other file besides pluginrc involved in this situation?

Was it perhaps the case of being called a shaman, a priest or a Buddhist monk to solve this case? :?

I'm without my laptop for now.
Later I will have it, and I will be able to check if using the scheme I have now (without using the layerfx available in the ZIP of post #1 and without using layerfx.scm) if the thing works without any bad surprises.

I liked the tip at https://youtu.be/jexKHAM-atk?t=118
"Don't have to delete that again just leave that until the next disaster" - 8-)

rich2005, thank you so much for your help!
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston

rich2005
GIMP Guru

Post#49 by rich2005 » 05 Jan 2021, 17:27


A samj portable gimp, I should have know from your previous posts.

I can still get it to work with the plugins in the preferences folder:
01-port.jpg
01-port.jpg # (93.4 KiB) Viewed 720 times (Thumbnail | Recognize)
..but what I think (might be) happening is the layerfx_presets plugin writes all those 'something'.txt text files when it loads. If it is not able to write the files then the plugin fails and does not load. Difficult to show in that portable gimp with no verbose mode.

Where do the 'something'.txt files end up ? Not easy to find with the usual windows tools, However it seems that "Gimp Portable..."\bin is the place. Not my idea of a suitable destination, but there you are.
02-port.jpg
02-port.jpg # (119.76 KiB) Viewed 720 times (Thumbnail | Recognize)
That is as far as I can go, I would check writing permissions to wherever you have Gimp installed.

Krikor
Forum Member

Post#50 by Krikor » 05 Jan 2021, 17:59


Hi rich2005,

I am now starting testing on my laptop. I've already removed all layerfx and deleted the pluginrc

You're right. Presets are stored in the Bin folder.

I didn't quite understand what you meant about "check writing permissions to wherever you have Gimp installed" - I thought that permissions were just for Linux.
"I feel that in both art and music, it's not the success that matters but the pleasure it gives you. Focus on the pleasure and the learning will come naturally." - Brian Weston


GIMP/GL:  Tutorials | Tips | Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  🡆 Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply New Topic
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 42 guests