Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
script to merge files into layers and set a layer mask
#11
(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
Reply


Forum Jump: