script to merge files into layers and set a layer mask - Printable Version +- Gimp-Forum.net (https://www.gimp-forum.net) +-- Forum: GIMP (https://www.gimp-forum.net/Forum-GIMP) +--- Forum: Extending the GIMP (https://www.gimp-forum.net/Forum-Extending-the-GIMP) +---- Forum: Scripting questions (https://www.gimp-forum.net/Forum-Scripting-questions) +---- Thread: script to merge files into layers and set a layer mask (/Thread-script-to-merge-files-into-layers-and-set-a-layer-mask) Pages:
1
2
|
RE: script to merge files into layers and set a layer mask - DanielDD - 09-25-2020 (09-25-2020, 03:07 PM)Ofnuts Wrote: On the SO example, the bit sys.path=['.']+sys.path; that you didn't copy adds the current directory (which is hopefully the one with the python script) to the Python path, so that the subsequent import finds it. The script DK_plugins is imported. When I change the name of the file DK_plugins.py, then I get the message Code: ImportError: No module named DK_plugins I found the problem: I have the script under C:\Users\Danie\AppData\Roaming\GIMP\2.10\plug-ins\DK-plugins\DK-plugins.py I copied the same script into the current directory and changed its name to "DK_plugins.py" (not the underscore). The registration stuff and "main()" was still in the script. I removed it, and then, it worked as espected. Daniel |